* Re: MIPS toolchain
[not found] ` <487DD559.3020802@movial.fi>
@ 2008-07-16 12:02 ` Ralf Baechle
2008-07-16 15:19 ` Geert Uytterhoeven
2008-07-16 19:22 ` Kyle McMartin
0 siblings, 2 replies; 3+ messages in thread
From: Ralf Baechle @ 2008-07-16 12:02 UTC (permalink / raw)
To: Linus Torvalds, linux-stable, Dmitri Vorobiev, Sam Ravnborg,
Andrew Morton
Cc: linux-mips, linux-kernel, Andi Kleen
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>
diff --git a/Makefile b/Makefile
index bfde079..312fcaa 100644
--- a/Makefile
+++ b/Makefile
@@ -509,6 +509,8 @@ else
KBUILD_CFLAGS += -O2
endif
+include $(srctree)/arch/$(SRCARCH)/Makefile
+
ifneq (CONFIG_FRAME_WARN,0)
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif
@@ -517,8 +519,6 @@ endif
# Arch Makefiles may override this setting
KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
-include $(srctree)/arch/$(SRCARCH)/Makefile
-
ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: MIPS toolchain
2008-07-16 12:02 ` MIPS toolchain Ralf Baechle
@ 2008-07-16 15:19 ` Geert Uytterhoeven
2008-07-16 19:22 ` Kyle McMartin
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2008-07-16 15:19 UTC (permalink / raw)
To: Ralf Baechle, Michael Schmitz
Cc: Linus Torvalds, linux-stable, Dmitri Vorobiev, Sam Ravnborg,
Andrew Morton, Linux/MIPS Development, Linux Kernel Development,
Andi Kleen, Linux/m68k
On Wed, 16 Jul 2008, Ralf Baechle wrote:
> 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>
>
> diff --git a/Makefile b/Makefile
> index bfde079..312fcaa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -509,6 +509,8 @@ else
> KBUILD_CFLAGS += -O2
> endif
>
> +include $(srctree)/arch/$(SRCARCH)/Makefile
> +
> ifneq (CONFIG_FRAME_WARN,0)
> KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
> endif
> @@ -517,8 +519,6 @@ endif
> # Arch Makefiles may override this setting
> KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
>
> -include $(srctree)/arch/$(SRCARCH)/Makefile
> -
> ifdef CONFIG_FRAME_POINTER
> KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
> else
Thank you!
Michael Schmitz also saw this problem, but we never found what caused
it...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MIPS toolchain
2008-07-16 12:02 ` MIPS toolchain Ralf Baechle
2008-07-16 15:19 ` Geert Uytterhoeven
@ 2008-07-16 19:22 ` Kyle McMartin
1 sibling, 0 replies; 3+ messages in thread
From: Kyle McMartin @ 2008-07-16 19:22 UTC (permalink / raw)
To: Ralf Baechle
Cc: Linus Torvalds, linux-stable, Dmitri Vorobiev, Sam Ravnborg,
Andrew Morton, linux-mips, linux-kernel, Andi Kleen
On Wed, Jul 16, 2008 at 01:02:24PM +0100, Ralf Baechle wrote:
> +include $(srctree)/arch/$(SRCARCH)/Makefile
> +
> ifneq (CONFIG_FRAME_WARN,0)
> KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
> endif
> @@ -517,8 +519,6 @@ endif
> # Arch Makefiles may override this setting
> KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
>
> -include $(srctree)/arch/$(SRCARCH)/Makefile
> -
> ifdef CONFIG_FRAME_POINTER
> KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
Cool, this explains something I saw with a crossbuild as well, but never
had time to debug.
r, Kyle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-16 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <487DA40C.6010405@movial.fi>
[not found] ` <20080716104533.GA7198@linux-mips.org>
[not found] ` <487DD559.3020802@movial.fi>
2008-07-16 12:02 ` MIPS toolchain Ralf Baechle
2008-07-16 15:19 ` Geert Uytterhoeven
2008-07-16 19:22 ` Kyle McMartin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox