More crosstool-0.42-glibc-2.4-gcc-4.1.0-nptl

Michael K. Edwards m.k.edwards@gmail.com
Thu Apr 27 07:49:00 GMT 2006


Greetings from a new crossgcc subscriber!

The attached patch (for crosstool 0.42) is a variation on Martin Guy's
ARM EABI / NPTL/TLS patch (posted April 18).  It has some additional
fixes for things I ran into when building the C++ cross-compiler and
Linux 2.6.16.11, optimized for a particular core (arm926ej-s).  The
patch does alter one or two extraneous things (for instance, I go
directly to passive FTP when fetching files), so inspect it before
applying; a cleaner copy will follow once I've handled a couple of
other issues (notably big-endian support).

I have included earm.config, earm.dat, and latest.dat in the patch.  I
haven't actually tested the ARM binaries that it builds, because I'm
interested in big-endian.  It is perhaps still worth posting now
because it works around a few general issues:

  passing multiple flags to --enable-cxx-flags
  compile-time tests that break the linux header bootstrapping for glibc
  building NPTL glibc on a non-TLS build host
  build breakage on binutils 2.16.92

A few words about using crosstool on an ancient host OS:

Make sure that you have quite recent versions of gcc and binutils
installed on your development host; they are needed not only to
compile the tools but also to fake some of the steps involved in
massaging the kernel headers, so they need to match the cross
configuration in a couple of respects (notably
--enable-threads=posix).  This may require a couple of rounds of
upgrading if your dev host OS is old; I climbed from gcc 3.2 to 3.3.6
to 4.1.0 with a couple of iterations on binutils-2.16.92 and gcc-4.1.0
to get the threading right.  These native tools should be in your PATH
ahead of whatever came with your operating system.

You will also need include/linux, include/asm-arm, and
include/asm-generic from a current Linux kernel.  It is probably
possible to place them in a compiler-specific include path with a
symlink from asm to asm-arm, but I simply moved /usr/include/linux and
/usr/include/arm out of the way and copied the lot to /usr/include,
renaming asm-arm to asm.  They had been at least partially configured
along the way, so I wound up with a link from asm/arch to
arch-integrator (a convenient dummy configuration for which a qemu
target is available), plus the following in linux/version.h:

#define UTS_RELEASE "2.6.16.11"
#define LINUX_VERSION_CODE 132624
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

That seems to be sufficient for crosstool to boostrap glibc headers;
you can probably restore the native OS copies once your toolchain
works.

Cheers,
- Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crosstool-0.42.patch
Type: application/octet-stream
Size: 66153 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20060427/6b2f8fb4/attachment.obj>
-------------- next part --------------
--
For unsubscribe information see http://sourceware.org/lists.html#faq


More information about the crossgcc mailing list