Trouble cross compiling for powerpc

Josh Boyer jwboyer at fedoraproject.org
Fri Jan 30 13:33:59 UTC 2015


On Fri, Jan 30, 2015 at 8:27 AM, Paul Bolle <pebolle at tiscali.nl> wrote:
> On Fri, 2015-01-30 at 08:14 -0500, Josh Boyer wrote:
>> 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.
>
> I see. ppc32 is dead and buried for Fedora, isn't it?

Yep.  Even when it was alive, Fedora didn't support ppc4xx as it's a
very special snowflake of ppc.

>> Are you trying to build a kernel that works on ppc4xx?
>> If not, just turn the driver off.
>
> I'm only cleaning up some (surprise!) Kconfig cruft that happens to be
> found in drivers/dma/ppc4xx/adma.c. And I didn't want to submit this
> eyeball tested only.

OK.

>> > 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.
>
> So does drivers/dma/ppc4xx/.adma.o.cmd, doesn't it? But, either way, I

Oh, yeah.

> guess I'll just have to submit this untested and let the powerpc
> maintainers decide whether that's worth the risk. (I seem to remember
> that I removed support for an entire powerpc board, or whatever, without
> build testing and no one started to bark. Maybe I'll be that lucky this
> time too.)

As the former upstream ppc4xx maintainer, feel free to CC me on your
patch.  The entire sub-arch is fairly dead now, so I don't think there
will be many issues.

josh


More information about the kernel mailing list