Re: Creating GCC/libstdc++ toolchain to create most compatible binaries

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

 



On Tue, 2014-05-06 at 23:55 +0200, Jonas Müller wrote:
> - Use an ancient x86_64 glibc setup, something like glibc 2.3 should
> do the job
> - Use the most ancient libstdc++ still yielding a libstdc++.so.6 (i.e.
> libstdc++ from GCC 3.4.0)
> - Use the most advanced GCC which is 4.9.0 currently (without its
> included libstdc++), to gain the most out of modern optimization
> techniques

I'm not an expert on ABI issues but it seems unlikely to me that this
will be a successful strategy.

> Is this practically possible? I've tried using a CentOS 4.9 based

Personally I wouldn't bother with anything before CentOS 5.0, but YMMV.
It's trivial to do this with the modern GCC, just add --sysroot=<path>
to your toolchain invocations, where <path> is the path of the root of a
copy of the system headers and libraries you want to compile against.

> In such a case, I might as well just -static-libstdc++.

That is the right answer.  You can consider adding -static-libgcc as
well.

> I'm really trying to create a binary that does not require any
> dragging along or statically linking to libstdc++.

Why not?  If you're going to statically link against boost, gmp, etc.
then why not libstdc++ as well?  It's far and away the simplest and most
reliable solution to your problem.





[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