summaryrefslogtreecommitdiff
path: root/arch/powerpc/boot
diff options
context:
space:
mode:
authorBill Wendling <morbo@google.com>2020-11-20 14:40:33 -0800
committerMichael Ellerman <mpe@ellerman.id.au>2020-11-26 22:05:43 +1100
commit215fadfe87259f38418ec78744796f099092fff1 (patch)
tree9c1dac5514736d61927eec5e5e14f373e8588dfb /arch/powerpc/boot
parent4c078c86b4a466db221a08d423c2eae9332c2641 (diff)
powerpc/boot: Use clang when CC is clang
The gcc compiler may not be available if CC is clang. Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201120224034.191382-3-morbo@google.com
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r--arch/powerpc/boot/Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index f8ce6d2dde7b..68a7534454cd 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -21,7 +21,11 @@
all: $(obj)/zImage
ifdef CROSS32_COMPILE
+ifdef CONFIG_CC_IS_CLANG
+ BOOTCC := $(CROSS32_COMPILE)clang
+else
BOOTCC := $(CROSS32_COMPILE)gcc
+endif
BOOTAR := $(CROSS32_COMPILE)ar
else
BOOTCC := $(CC)