[PATCH] powerpc: enforce a non-spe kernel build even on broken compilers

Nate Case ncase at xes-inc.com
Wed Oct 15 09:35:44 EST 2008


On Tue, 2008-10-14 at 16:23 -0500, Kumar Gala wrote:
> Why does -mno-spe work?
> 
>  From my gcc-4.3 info pages:
> 
> `-mspe=YES/NO'
>       This option has been deprecated.  Use `-mspe' and `-mno-spe'
>       instead.
> 
> > +KBUILD_CFLAGS += $(call cc-option,-mabi=no-spe)
> 
> is the -mabi=no-spe really needed?

My guess is that the -mabi=no-spe was the real key of what made it work
for him.  I went through the same thing with my toolchain.

You do need -mabi=no-spe if your toolchain defaults to -mabi=spe like
mine does.  I know that the more generic toolchains out there
(CodeSourcery, ELDK) default to -mabi=no-spe, so in that case it would
not be necessary.

I don't know what generated instructions are actually to blame, but I do
know that if you compile certain programs with "-mno-spe -mabi=spe" vs.
"-mno-spe -mabi=no-spe", the results will differ.  In the case of the
kernel, you'll get a bunch of "SPE used in kernel" messages with the
"-mno-spe -mabi=spe" combination.

- Nate Case <ncase at xes-inc.com>




More information about the Linuxppc-dev mailing list