[oe] cross-compiling for x86_64

Patrick Ohly Patrick.Ohly at gmx.de
Sat Dec 30 15:12:48 UTC 2006


Hi all,

I have had some time over the holidays to investigate this again and
have come up with patches that solves the problem for me. I'm attaching
them in the hope that someone else will find them useful and/or commit
them on dev.

Note that I have only patched the packages that were picked up by the
current "generic" distro - some of the changes will probably also need
to be done to other .bb files. I have also intentionally not updated any
PR variables to avoid conflicts.

On Sat, 2006-11-11 at 20:24 +0100, Patrick Ohly wrote:
> Here's a summary of the problems I had:
>       * glibc-initial-2.3.2+cvs20040726-r22: generic bits/wordsize.h and
>         bits/endian.h is used instead of the x86_64 ones

Failed differently for me now (something about NTPL requiring TLS), but
instead of investigating further I simply changed
gcc-cross-initial_4.1.1.bb to not depend on libc-initial. This is
already how it works for 'arm', 'armeb', 'mips', 'mipsel'.

If there is a particular reason why the initial libc should be needed
for x86_64, then I haven't noticed it.

>       * glibc-intermediate-2.5-r2: asm-x86_64 header files not found
>       * glibc-intermediate-2.5-r2: config-name.h not created by
>         configure although it is needed
>       * glibc-intermediate-2.5-r2: #error "__NR_pread and __NR_pread64
>         both defined???"

All caused by linux-libc-headers_2.6.18.bb not installing the
asm-i386/x86_64 directories which are referenced by the asm include
files depending on the current compiler flags. Along the same line
compiler.h also had to be installed explicitly because it was missing
otherwise.

Finally gcc-cross-initial_4.1.1.bb failed to stage the compiler shared
objects because the gcc make system insists on installing them in
<libdir>/../lib64 and the .bb file expects them in <libdir> (code came
from gcc-package-cross.inc).

With those changes I was able to compile the normal glibc and some other
packages. I have not tested whether any of these results actually run
anywhere, ATM my main goal is to just verify that compilation in 64 bit
mode works.

-- 
Bye, Patrick Ohly
--  
Patrick.Ohly at gmx.de
http://www.estamos.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-cross-initial_4.1.1.bb.patch
Type: text/x-patch
Size: 953 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20061230/89219507/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-package-cross.inc.patch
Type: text/x-patch
Size: 1468 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20061230/89219507/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-libc-headers_2.6.18.bb.patch
Type: text/x-patch
Size: 2027 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20061230/89219507/attachment-0008.bin>


More information about the Openembedded-devel mailing list