diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-06 00:44:49 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-06 00:44:49 +0300 |
commit | b285e0b78464f9a15a5095ac1dd5458ee7938714 (patch) | |
tree | 26076bcd4e26087bf7abc1a1c0d7053c4ae1c801 | |
parent | c11eef21aa119a41fa210b9693f2346997885bcf (diff) | |
parent | 69ee0b3522428a07ff1765446d631ecc7da6ae0f (diff) | |
download | linux-b285e0b78464f9a15a5095ac1dd5458ee7938714.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild:
kbuild: do not pick up CFLAGS from the environment
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -528,9 +528,22 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments -KBUILD_CPPFLAGS += $(CPPFLAGS) -KBUILD_AFLAGS += $(AFLAGS) -KBUILD_CFLAGS += $(CFLAGS) +# But warn user when we do so +warn-assign = \ +$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)") + +ifneq ($(KCPPFLAGS),) + $(call warn-assign,CPPFLAGS) + KBUILD_CPPFLAGS += $(KCPPFLAGS) +endif +ifneq ($(KAFLAGS),) + $(call warn-assign,AFLAGS) + KBUILD_AFLAGS += $(KAFLAGS) +endif +ifneq ($(KCFLAGS),) + $(call warn-assign,CFLAGS) + KBUILD_CFLAGS += $(KCFLAGS) +endif # Use --build-id when available. LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ |