This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: Using libstdc++.so with a newer version of glibc without recompiling


On 7 March 2013 09:23,  <Heiko.Papenfuss@uniserv.com> wrote:
> Hi,
>
> I have a question regarding the dependency of libstdc++.so.6 on libc.so.6:
>
> If changing the underlying glibc version libc.so.6 is pointing to to a
> higher version (e.g. from libc-2.4.so to libc-2.7.so), is it expected that
> the libstdc++.so.6 will still work correctly when used by a program? Or is
> it necessary to recompile GCC under the new glibc and all our with this
> new GCC as well?

The libstdc++.so.6 will still work, glibc is also backwards compatible.

You might not be able to use the older GCC with the newer glibc
headers to compile new programs though, because GCC configures itself
based on the glibc headers present at the time when GCC is built. If
you later change glibc then GCC's C++ headers may be incompatible with
the new glibc headers.  If that happens you'd need to rebuild the same
GCC version against the new glibc.


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