This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ 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 x86-linux to alpha-linux


On Thu, 2003-09-18 at 00:13, Nathan Kidd wrote:
> Dan Kegel wrote:
> > That's quite right.  I suppose I should add a cautionary note to
> > the crosstool doc laying out the issues Kai mentions, so newbies
> > know that their target may set constraints on tool versions.
> 
> Being a definite newbie in this area I'm now wondering about several cross
> compilers I've built for a product we have.
> 
> I'm targeting i386-pc-solaris2.6, sparc-sun-solaris2.5.1,
> powerpc-ibm-aix4.2.1.0 and i586-pc-linux-gnu.  Because I copied the libs
> and headers from the original hosts and I'm using C only (no C++) I have
> assumed that the backwards compatibility problems Kai described will not
> affect me, but is that safe to assume? 
You'd be safe against libc incompatibilies and inconsistencies between
build-host target-libc's (Those libc's being used by the cross-compiler)
and host libc's (Those being used natively on the cross-compilers's
target).

>  I did have to build glibc to build GCC (3.2),
If using the original target libs and headers there isn't any need to
using glibc. Esp. for non-gnu targets like Solaris and AIX, glibc is
meaningless.

>  but I have been under the impression that this was an internal
> compiler thing and wouldn't affect output binaries...?   
> 
> In summary I'm asking: If I use the hosts original libs and headers, and
> only use C (no C++) am I still going to be affected by backwards
> compatibility problems with the compiler/glibc
These are two issues:

* libc compatibility - If not changing them between builts, they don't
introduce any incompatibility.

* gcc compatibility: Different GCC's aren't necessarily compatible to
each other (esp. ABI changes). Upgrading a GCC to another version can
require to recompile everything having been previously compiled with
older versions. 
Using "C"-only dramatically reduces the likelihood of being hit by such
incompatibilities (Unlike using C++, the C++ ABI has changed with almost
each GCC release).

>  and thus should rather be using GCC 2.95 with an older glibc?
No, I don't see any reason for doing this.

Ralf



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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