Re: cross compiling for x86_64

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

 



Andrew Haley wrote :
Indu Bhagat writes:
 >  I am trying to configure gcc for compiling some c,cpp and fortran
 > sources to x86_64 on my x86 machine using the following steps:
> > 1. Binutils-2.17 configuration and installation:
 >  2. After successful completion of step 1, gcc configuration and installation:
 >  3. After this, I proceeded with glibc, as I think one needs to have
 >  appropriate library support as well, to support cross compilation.
> OK, now you need to build gcc again, this time with glibc (not newlib) support.

The common rule is that the "appropriate library" is always the C library for the $target! For Red Hat's Linuces for instance it is that for the Red Hat Linux in question, not for instance that for some SuSE Linux or for some Debian or for some Ubuntu. And not a C library for some "totally self-made Linux" which the builder produces oneself purely from sources! If one doesn't know much, the safe bet is always the
original target stuff in the existing target case!

If some C library "version" for Linux like 'glibc-2.5' would be identical in every Linux/x86_64 distro, then it could be possible to just take any of the available ones... But in this case too the C library rebuild
would be quite weird choice...

Generally the choice to try to build the "target C library" during the GCC build sounds very weird.... A normal (and sane!) GCC builder doesn't try to invent ways to avoid having the target C library in '/lib', '/usr/lib' and '/usr/include' during the native GCC build. Neither one tries anything like that in a cross GCC build case but simply copies the existing target C library from the target system into its
appropriate places in the cross host system!

The required "know-how" is "how to copy" or "how to unpack install packages" and knowing what on earth is the place for the target libraries in a cross-compiler... Of course both skills are the prerequisites and both them can be learned by simply asking! Like asking on this "gcc-help" maillist...

I cannot understand why these trivialities weren't asked before starting these weird and unexpected "all prebuilt stuff is from ass" - thought influenced build steps.... It maybe is a nuisance for some people that so many Linux users require to start with a prebuilt distro, a GCC build from sources requires a prebuilt GCC etc., but not for the big majority! For quite many using a prebuilt hammer when producing a self-made hammer is totally acceptable... We can only wonder why so many are perfectly happy with a self-made native GCC which uses some "NIH"-brand glibc in '/lib', '/usr/lib' and '/usr/include'!



[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