CONFIG_CC_IS_CLANG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Masahiro,
I was looking into sprucing up Kbuild for improved LLD support.  One
thing I was curious about was the different checks for clang in the
top level Makefile.

How come a change like:
diff --git a/Makefile b/Makefile
index 3142e67d03f1..525b3fef7d27 100644
--- a/Makefile
+++ b/Makefile
@@ -489,7 +489,7 @@ ifneq ($(KBUILD_SRC),)
  $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
 endif

-ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
+ifdef CONFIG_CC_IS_CLANG
 ifneq ($(CROSS_COMPILE),)
 CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
 GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))


doesn't work?  It's odd that later on in the top level Makefile, we
have that kind of check.  I was hoping to do something similar for
LLD, but it seems that the config options are not defined for that
particular make target?  Does this have to do with config-targets?

-- 
Thanks,
~Nick Desaulniers



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux