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: libstdc++ : shared lib names


On 18 April 2012 00:42, Oleg Smolsky wrote:
> Hey all, I have a question about running multiple compilers concurrently on
> a single OS. Here is what I do:
> ?- configure gcc 4.7.0 with --prefix=/work/tools/gcc47
> ?- build and install
> ?- reference /work/tools/gcc47/lib64 in /etc/ld.so.conf.d/gcc47-x86_64.conf
>
> This, however, forces the new version of libstdc++.so onto binaries that are
> built with the system compiler. Normally that works, but we have just hit an
> issue where std::stringstream::tellg() returns a different value after
> extracting an "int". (the system compiler is ?4.4.5 20110214 (Red Hat
> 4.4.5-6))

That's a bug in the old version's stringstream that was fixed.

If you recompiled the old binaries with -D_GLIBCXX_EXTERN_TEMPLATE=0
then the instantiation in libstdc++.so wouldn't be used, but that's
not a very practical solution.

> So, is there a way to build gcc and force a bump in the .so version? This
> way I could keep environments completely distinct when using shared libs
> (the issue goes away when statically linking the runtime)

Using --enable-symvers=gnu-versioned-namespace will bump the soname
(as well as moving all entities in namespace std to the inline
namespace std::__v7)


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