diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 16:44:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-05 16:44:49 -0500 |
commit | b285e0b78464f9a15a5095ac1dd5458ee7938714 (patch) | |
tree | 26076bcd4e26087bf7abc1a1c0d7053c4ae1c801 | |
parent | c11eef21aa119a41fa210b9693f2346997885bcf (diff) | |
parent | 69ee0b3522428a07ff1765446d631ecc7da6ae0f (diff) |
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,) | |||
528 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) | 528 | KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) |
529 | 529 | ||
530 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments | 530 | # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments |
531 | KBUILD_CPPFLAGS += $(CPPFLAGS) | 531 | # But warn user when we do so |
532 | KBUILD_AFLAGS += $(AFLAGS) | 532 | warn-assign = \ |
533 | KBUILD_CFLAGS += $(CFLAGS) | 533 | $(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)") |
534 | |||
535 | ifneq ($(KCPPFLAGS),) | ||
536 | $(call warn-assign,CPPFLAGS) | ||
537 | KBUILD_CPPFLAGS += $(KCPPFLAGS) | ||
538 | endif | ||
539 | ifneq ($(KAFLAGS),) | ||
540 | $(call warn-assign,AFLAGS) | ||
541 | KBUILD_AFLAGS += $(KAFLAGS) | ||
542 | endif | ||
543 | ifneq ($(KCFLAGS),) | ||
544 | $(call warn-assign,CFLAGS) | ||
545 | KBUILD_CFLAGS += $(KCFLAGS) | ||
546 | endif | ||
534 | 547 | ||
535 | # Use --build-id when available. | 548 | # Use --build-id when available. |
536 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | 549 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ |