lkml.org 
[lkml]   [2008]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MIPS toolchain
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


\
 
 \ /
  Last update: 2008-07-16 17:25    [W:0.239 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site