Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Mar 2012 18:50:38 +0000
From:      David Chisnall <theraven@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   C++ ABI library switching
Message-ID:  <47F86CED-DE0E-47A0-93E8-93D35E89F9F3@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hello the list,

I am currently working on making it possible to switch C++ ABI library.  =
We currently ship one of these in FreeBSD 9.0 (libsupc++), and will =
hopefully ship two (libsupc++ and libcxxrt) in 9.1 and one (libstdc++) =
in 10.

Currently, libc++ dynamically links to libcxxrt, libstdc++ statically =
links to libsupc++.  I would like to make us build libsupc++ as a .so =
and link libstdc++.so with -Wl,-f,libsupc++.so.1.  This makes it an =
auxiliary filter so, if libsupc++.so.1 exists, it will be used in place =
of the internal version.  This preserves ABI compatibility and allows us =
to switch between libcxxrt and libsupc++ with a libmap.conf entry, =
making it easy for users of 9.1 to test the libstdc++ and libcxxrt =
combination.

With this done, it's then possible to link both libstdc++ and libc++ =
into the same program, making the transition from libstdc++ to libc++ =
relatively painless (everything still needs recompiling, but it doesn't =
all need recompiling at the same time).  For 10.0, we can then ship a =
COMPAT version of libstdc++ that is linked against libcxxrt by default.

Any objections / suggestions of better approaches?

David=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47F86CED-DE0E-47A0-93E8-93D35E89F9F3>