Thread (14 messages) flat view 14 messages, 4 authors, 2018-05-10

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

From: Segher Boessenkool <hidden>
Date: 2018-05-10 13:10:25
Also in: linux-kbuild

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?
And, why is that wrong?


Segher

+ifdef CONFIG_PPC32
+# These options will be overridden by any -mcpu option that comes
+# later on the command line, but they are needed to set a sane
+# 32-bit cpu target for the 64-bit cross compiler.
+KBUILD_CFLAGS		+= -mcpu=powerpc
+KBUILD_AFLAGS		+= -mcpu=powerpc
+endif
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help