Re: Building a Linux->AIX crosscompiler -- problem with libgcc_s.a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Torsten Schlabach wrote:
Terve Kai!

Sorry for the typos, I was writing this out of the top of my head and I was tired then.

Reading your two posts, are you saying this could be a bug in the GCC sources?
More likely a "feature", the 'libc.a' for the $target should be used, not that for the $host, but in a native GCC these are just the same and when the default GCC type for each "system" target is the native GCC, the GCC build may that the target's 'libc.a' is in the
'/usr/lib' :(

To answer your questions:

> What on earth "first stage gcc"?

I understand that the idea of building a cross-compiler would be:

1. Build a cross-binutils for the target platform.
2. Build some kind of cross-gcc for the target platform.
This "some kind of" GCC is the final GCC !
3. Use that cross-gcc (in some howtos referred to as 1st-stage GCC) to build a glibc for the target platform.
The C library being used by the produced GCC is the proprietary AIX C library in this case. What else it could be? The compiler produces objects (with the target 'as') for AIX and then links them with the standard functions in the target's 'libc', with the target's startups, 'crt*.o' etc. Glibc doesn't support AIX at all AFAIK, so you cannot produce glibc for this target :(

4. Re-build GCC with itself.
As one more "code red" practice for new recruits, producing first a native GCC from just the aimed GCC sources and then using this "just same GCC version" to compile the final cross GCC, maybe could be motivated :) And then this "rebuild with itself" requirement would be filled... But the corporals and sergeants of GCC haven't yet invented this extra "practice for the dummies" :)
Are you saying I need a AIX C library on my Linux host system in order to be able to build a Linux hosted cross-compiler for AIX? Why?

The AIX headers are tried to be fixed for GCC, the AIX libraries are checked for the available functions... The target C library being present during the GCC build is one of the prerequisites! The complicated "code red" practices only try to avoid this when producing one's own custom C library is required, no "prebuilt suitable target C library" is accepted in these puritan methods. The "final GCC" build however has that (self-made) C library present when building...

> I didn't use the '--with-sysroot=$sysroot' to point to the
> (unexisting) AIX5.3 C library...

What is that business? Would you have a pointer to dome f* manual I could use to educate myself? Even if the AIX C library is not freely available, I could get a hold of one, but what would I have to do with it?
Putting it below some thought-out $sysroot and pointing to it using '--with-sysroot=$sysroot' when configuring binutils and GCC could be a good idea! My suggestion for this would be the '/opt/host-$target', '/opt/host-rs6000-ibm-aix5.3' in this case, to tell that the stuff below it is for the 'rs6000-ibm-aix5.3' host, not for the native host... After doing this, the target C library should be found from that $sysroot/usr/include', '$sysroot/usr/lib' etc. when required....


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux