This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cross-compiling to ancient platforms...


Alexander, All,

On Monday 21 January 2013 Alexander Prokhorov wrote:
> I am trying to use crosstools to set up the build platform which will 
> allow to build highly compatible executables and libraries. The target 
> platform is a RHEL4(update2) and similar platforms, cause such old stuff 
> is widely used on the different cluster supercomputers. Specifically I 
> need to set up cross-compiling environment with eglibc 2.3 and for 
> kernel 2.6.9. (although I hope to use quite a modern gcc/g++ version). 
> Unfortunately 'ct-ng menuconfig' does not allow to specify such an old 
> versions of both eglibc and kernel. Is there a way or well-known 
> practice how to do that?

Indeed, crosstool-NG is focused on using not-too-old versions.

If you need older versions than the one provided, you can set:

    Paths and misc options  --->
        [*] Try features marked as EXPERIMENTAL
        ()  Directory containing custom source components

Enter here the location where you will have (manually) extracted the
versions you want to use. Eg:

        (/some/place)  Directory containing custom source components

You will have to provide:

    /some/place/linux    (which contains the linux version you want to use)
    /some/place/gcc      (ditto for gcc)

And so on for the other components, if the version you want to use is
not listed in ct-ng menuconfig.

The support for these 'custom' source locations is already present in
crosstool-NG 1.17.0, except for (e)glibc, which still has a few issues,
and is not even in the repository yet. I hope to have this committed
before next release, but the planning is tight.

But if you want to use custom versions, you are almost on your own,
especially if those versions are very old (although some people on the
list may be interested, but there's no guarantee).

I would anyway recommend that you use versions of the same era, that is,
use a glibc, kernel, binutils and gcc versions that were released at about
the same time; do not try to use recent binutils or gcc with older glibc
or kernel headers (or any mix of old/recent versions), it's a recipe
for some weird failures, that no one will be interested to track down.

Also, kernel 2.6.9 can *not* export its headers for use by userland. That
capability only came circa 2.6.18 at the earliest, and was only stable
since 2.6.20-something. You may find Mariusz Mazur's linux-libc-headers
usefull, although they've long been deprecated and unmaintained:
    http://ep09.pld-linux.org/~mmazur/linux-libc-headers/

Also, crostool-NG was not initially designed to generate toolchains for
existing systems, but rather for building systems from scratch. That it
works at all when targetting existing systems is just happenstance. YMMV.

If you really want to have binary-compatibility with an existing (RHEL4)
distro, I'd suggest you set up a build environment using the toolchain
from that distro (eg. using a chroot, a VM, an LXC-container, whatever).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]