diff mbox series

[v2,05/12] linux: override CC for the case CC is not GCC

Message ID 20190907094027.9537-6-romain.naour@smile.fr
State New
Headers show
Series Add the support for Clang cross-compiler | expand

Commit Message

Romain Naour Sept. 7, 2019, 9:40 a.m. UTC
Until now we provided only CROSS_COMPILE to the kernel
buildsystem to use our GCC cross-compiler. Internally,
the buildsystem defined CC=$(CROSS_COMPILE)gcc.

Since Clang can now be used as cross-compiler, Buildroot
may define in the future TARGET_CC to use clang instead
of GCC.

In order to build the kernel with the selected compiler,
make sure to define CC=$(TARGET_CC) in LINUX_MAKE_FLAGS.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Matt Weber <matthew.weber@rockwellcollins.com>
Cc: Valentin Korenblit <valentinkorenblit@gmail.com>
 linux/linux.mk | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/linux/linux.mk b/linux/linux.mk
index 29d2f0ee69..d381c96d85 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -128,6 +128,7 @@  LINUX_MAKE_FLAGS = \
+	CC="$(TARGET_CC)" \
 ifeq ($(BR2_REPRODUCIBLE),y)