[PATCH v2 1/5] powerpc/kbuild: set default generic machine type for 32-bit compile

Nicholas Piggin npiggin at gmail.com
Thu May 10 23:24:40 AEST 2018


On Thu, 10 May 2018 08:10:03 -0500
Segher Boessenkool <segher at kernel.crashing.org> wrote:

> On Thu, May 10, 2018 at 03:16:55PM +1000, Nicholas Piggin wrote:
> > The 64-bit toolchain uses the wrong ISA variant for compiling 32-bit
> > kernels, eve with -m32. Set -mcpu=powerpc which is the generic 32-bit
> > powerpc machine type and scheduling model. 32-bit platforms and CPUs
> > can override this with -mcpu= options that come later on the command
> > line.
> > 
> > This fixes a lot of build failures due to incompatible assembly when
> > compiling 32-bit kernel with 64-bit toolchain.  
> 
> So what ISA is set for gas without this patch?  With what GCC version?

I'm not sure, how do I find that out?

> And, why is that wrong?

Some 32-bit platforms and CPU types do not provide -mcpu, so I assume
for 32-bit toolchains that must result in the "powerpc" machine. With
64-bit toolchains 

arch/powerpc/mm/hash_low_32.S:353: Error: missing operand

Which is,

        tlbie   r4

Is that v2.06?

Thanks,
Nick


More information about the Linuxppc-dev mailing list