Ubuntu kernel 4.7 and 4.8 on ppc64el: Cross compilation issue
Andy Whitcroft
apw at canonical.com
Thu Aug 25 17:06:50 UTC 2016
On Thu, Aug 25, 2016 at 10:25:51AM -0300, Breno Leitao wrote:
> Hello kernel team,
>
> I found a problem on Ubuntu kernel version 4.7 and 4.8 from kernel
> mainline PPA (~kernel-ppa/mainline) that is happening on ppc64el
> port.
>
> I found that, starting at version 4.7, there is an issue with the
> cross-compilation process, as showed:
>
> ➜ ~ dpkg -S /usr/src/linux-headers-4.8.0-040800rc3-generic/scripts/dtc/dtc.o
> linux-headers-4.8.0-040800rc3-generic: /usr/src/linux-headers-4.8.0-040800rc3-generic/scripts/dtc/dtc.o
> ➜ ~ file /usr/src/linux-headers-4.8.0-040800rc3-generic/scripts/dtc/dtc.o
> /usr/src/linux-headers-4.8.0-040800rc3-generic/scripts/dtc/dtc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
> ➜ ~ uname -a
> Linux 1610 4.8.0-040800rc3-generic #201608212032 SMP Mon Aug 22 01:21:51 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux
>
> Looking at the log, I see:
>
> -- dchroot -c yakkety-amd64 --directory=/home/kernel/COD/linux -- /bin/bash
> I: [yakkety-amd64-2bcf8cf2-911e-433c-805c-d10a6933743b chroot] Running command: “/bin/bash”
> dpkg-architecture: warning: specified GNU system type powerpc64le-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
>
> Somehow, the dhcroot is using an amd64 other than a ppc64el image to get
> things built.
Hmm, well the primary binaries are being made correctly as far as I can tell:
/lib/modules/4.8.0-040800rc3-generic/kernel/sound/usb/line6/snd-usb-line6.ko:
ELF 64-bit LSB relocatable, 64-bit PowerPC or cisco 7500, version 1
(SYSV), BuildID[sha1]=b3eb6e0a6eb130800b99734e54d82daef5b40289, not stripped
The power specific binaries are also correct:
/usr/src/linux-headers-4.8.0-040800rc3-generic/arch/powerpc/lib/mem_64.o
ELF 64-bit LSB relocatable, 64-bit PowerPC or cisco 7500, version 1
(SYSV), not stripped
It is the pieces in the script directory which are X86, and that is
probabally expected as these are cross compiles and these are things
built using HOSTCC:
/usr/src/linux-headers-4.8.0-040800rc3-generic/scripts/dtc/dtc.o:
ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Other than for building out of tree modules this should have no
noticible effect.
Do you have a use case that is hitting these or is it just something you
noticed?
-apw
More information about the kernel-team
mailing list