summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-08-16 21:14:08 +0200
committerSam Ravnborg <sam@mars.ravnborg.org>2006-08-16 21:14:08 +0200
commitc9eca0b91015bc685c2f35a50efc63d73fdf943a (patch)
tree0922f5cbb51d2dfca8ff14df625beadf734ec269 /Makefile
parent9ee4e3365dd0dab4c1e02fe44dc08a223b826c72 (diff)
downloadlinux-3.10-c9eca0b91015bc685c2f35a50efc63d73fdf943a.tar.gz
linux-3.10-c9eca0b91015bc685c2f35a50efc63d73fdf943a.tar.bz2
linux-3.10-c9eca0b91015bc685c2f35a50efc63d73fdf943a.zip
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--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e71fefd220a..1589085e000 100644
--- a/Makefile
+++ b/Makefile
@@ -309,9 +309,6 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common
-# Force gcc to behave correct even for buggy distributions
-CFLAGS += $(call cc-option, -fno-stack-protector)
-
AFLAGS := -D__ASSEMBLY__
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -486,6 +483,8 @@ else
CFLAGS += -O2
endif
+include $(srctree)/arch/$(ARCH)/Makefile
+
ifdef CONFIG_FRAME_POINTER
CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
else
@@ -500,7 +499,8 @@ ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
endif
-include $(srctree)/arch/$(ARCH)/Makefile
+# Force gcc to behave correct even for buggy distributions
+CFLAGS += $(call cc-option, -fno-stack-protector)
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)