Re: Cross-compiler builds but results fail in crt1.o ...?

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

 



On Fri, 2012-04-13 at 09:20 +0300, Kai Ruottu wrote:
> - one produces GNU binutils and GCC hosted (--host=) for the required
>    $host and targeted (--target=) for the required $target, pointing to
>    the place of the installed target libraries, $sysroot, via
>    '--with-sysroot=' in their configure
> 
> - one uses the existing base C library (in this case glibc) made for
>    the $target system, installed into the chosen $sysroot, with all the
>    other existing target libraries, X11, Gnome etc made for the $target

OK let me give more detail.

I actually am building a single cross-compiler toolkit, but I'm using it
with multiple different sysroots.  They're all GNU/Linux Intel, but
using different versions.  I don't want to have to rebuild the compiler
specifically for each different sysroot: I want to have one compiler
instance and provide different --sysroot values to generate output for
different targets.

My understanding (maybe I'm wrong!) is that this is possible and
supported.

As for the sysroots, those are well-defined.  I don't actually build
them myself, I take them either from real systems or by extracting them
from RPM or DEB packages, put them into a correctly-formed rooted
directory structure, then just tar them up and store the various tar
files.  When I want to cross-compile for that sysroot I unpack the tar,
point the compiler at it with --sysroot, and away it goes.  Not having
to rebuild the cross-compiler for each individual sysroot saves me a LOT
of time, effort, and storage.  I've been doing this for 5+ years and
it's always worked... until now.

I am a bit fortunate in that my targets are more like embedded systems:
they are glibc-based but use a limited set of system libraries (no
X/Gnome/Qt/etc. for example).  I do need to link some 3rdparty libraries
which are C++ but everything I need from the sysroot (as far as I'm
aware) is simple C.

I do link stuff I build with --static-libgcc and static libstdc++ (GCC
4.2.4 doesn't implement the --static-libstdc++ flag so I have to fake
that) to avoid worrying about compatible versions of compiler-specific
libraries.  FWIW I've tried this particular link both with and without
these flags but get the same behavior.  It appears to be related to
incompatible crt1.o or something?  But this worked before... so... very
confusing.



[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