diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-08-16 15:14:08 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-08-16 15:14:08 -0400 |
commit | c9eca0b91015bc685c2f35a50efc63d73fdf943a (patch) | |
tree | 0922f5cbb51d2dfca8ff14df625beadf734ec269 /Makefile | |
parent | 9ee4e3365dd0dab4c1e02fe44dc08a223b826c72 (diff) |
kbuild: correct assingment to CFLAGS with CROSS_COMPILE
Some architectures change $CC in arch/$(ARCH)/Makefile
mips is one example.
That have impact on what options are supported by gcc so move all
$(call cc-option, ...) after include of arch specific Makefile.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -309,9 +309,6 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | |||
309 | 309 | ||
310 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 310 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
311 | -fno-strict-aliasing -fno-common | 311 | -fno-strict-aliasing -fno-common |
312 | # Force gcc to behave correct even for buggy distributions | ||
313 | CFLAGS += $(call cc-option, -fno-stack-protector) | ||
314 | |||
315 | AFLAGS := -D__ASSEMBLY__ | 312 | AFLAGS := -D__ASSEMBLY__ |
316 | 313 | ||
317 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 314 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
@@ -486,6 +483,8 @@ else | |||
486 | CFLAGS += -O2 | 483 | CFLAGS += -O2 |
487 | endif | 484 | endif |
488 | 485 | ||
486 | include $(srctree)/arch/$(ARCH)/Makefile | ||
487 | |||
489 | ifdef CONFIG_FRAME_POINTER | 488 | ifdef CONFIG_FRAME_POINTER |
490 | CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) | 489 | CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) |
491 | else | 490 | else |
@@ -500,7 +499,8 @@ ifdef CONFIG_DEBUG_INFO | |||
500 | CFLAGS += -g | 499 | CFLAGS += -g |
501 | endif | 500 | endif |
502 | 501 | ||
503 | include $(srctree)/arch/$(ARCH)/Makefile | 502 | # Force gcc to behave correct even for buggy distributions |
503 | CFLAGS += $(call cc-option, -fno-stack-protector) | ||
504 | 504 | ||
505 | # arch Makefile may override CC so keep this after arch Makefile is included | 505 | # arch Makefile may override CC so keep this after arch Makefile is included |
506 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 506 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |