Trouble cross compiling for powerpc

Josh Boyer jwboyer at fedoraproject.org
Fri Jan 30 13:14:20 UTC 2015


On Fri, Jan 30, 2015 at 8:01 AM, Paul Bolle <pebolle at tiscali.nl> wrote:
> I'm having trouble cross compiling on an up-to-date x64_64 F20 machine.
>
> make CROSS_COMPILE=powerpc64-linux-gnu- ARCH=powerpc drivers/dma/ppc4xx/adma.o
>   CHK     include/config/kernel.release
>   CHK     include/generated/uapi/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CC      drivers/dma/ppc4xx/adma.o
> {standard input}: Assembler messages:
> {standard input}:4475: Error: junk at end of line: `1'
> {standard input}:4616: Error: junk at end of line: `1'
> {standard input}:4626: Error: junk at end of line: `1'
> {standard input}:4649: Error: junk at end of line: `1'
> make[1]: *** [drivers/dma/ppc4xx/adma.o] Error 1
> make: *** [drivers/dma/ppc4xx/adma.o] Error 2

You're using a 64-bit compiler to build something that only works on a
32-bit machine.  It uses DCRs, which are even more specific to
powerpc4xx.  Are you trying to build a kernel that works on ppc4xx?
If not, just turn the driver off.

> make CROSS_COMPILE=powerpc64-linux-gnu- ARCH=powerpc CFLAGS_adma.o="-S" drivers/dma/ppc4xx/adma.o
>   CHK     include/config/kernel.release
>   CHK     include/generated/uapi/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CC      drivers/dma/ppc4xx/adma.o
>
> sed -n -e "4475p; 4616p; 4626p; 4649p" drivers/dma/ppc4xx/adma.o
>         mfcr 10,1
>         mfcr 10,1
>         mfcr 10,1
>         mfcr 10,1
>
> Anyone else seeing this? Is powerpc64-linux-gnu-gcc choking on the
> assembler it generates itself, or am I doing something wrong?

Probably depends on a lot of various factors.  Like how the compiler
was built and what flags are being passed.  Using V=1 would get you
the full gcc invocation.

josh


More information about the kernel mailing list