aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-07-16 08:02:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-16 14:42:32 -0400
commitbef5b54bd7bf8117c75cb943d64549134c6d9a1f (patch)
treee8b9d4e300882580dd7ffd560e7be160ccba3cd8 /Makefile
parentd25dc7fd4740decf4c66e2f17dbaa288448fabd5 (diff)
Fix MIPS cross-compile problem
Crosscompiling on a Fedora 9 machine running gcc 4.3.0 as its host compiler and gcc 3.4.6 for the mips-linux target results in the following build error: $ make malta_defconfig $ make cc1: error: unrecognized command line option "-fno-stack-protector" scripts/kconfig/conf -s arch/mips/Kconfig cc1: error: unrecognized command line option "-fno-stack-protector" The arch Makefile is included too late so the host compiler is feature tested, not the crosscompiler as intended and thus the Makefile applies adds -fno-stack-protector to crosscompiler's flags which fails for gcc 3.4.6. The bug was introduced by e06b8b98da071f7dd78fb7822991694288047df0 in 2.6.25; 35bb5b1e0e84cfa1a8906f7e6a77f391ff315791 did add more flags testing before the arch Makefile inclusion. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8a2a275be304..1564577bdc53 100644
--- a/Makefile
+++ b/Makefile
@@ -508,6 +508,8 @@ else
508KBUILD_CFLAGS += -O2 508KBUILD_CFLAGS += -O2
509endif 509endif
510 510
511include $(srctree)/arch/$(SRCARCH)/Makefile
512
511ifneq (CONFIG_FRAME_WARN,0) 513ifneq (CONFIG_FRAME_WARN,0)
512KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) 514KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
513endif 515endif
@@ -516,8 +518,6 @@ endif
516# Arch Makefiles may override this setting 518# Arch Makefiles may override this setting
517KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) 519KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
518 520
519include $(srctree)/arch/$(SRCARCH)/Makefile
520
521ifdef CONFIG_FRAME_POINTER 521ifdef CONFIG_FRAME_POINTER
522KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls 522KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
523else 523else