This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: versioning C++ includes
On Tue, Jun 25, 2002 at 10:11:42AM -0700, Benjamin Kosnik wrote:
>
> 3) At this point, the libstdc++.so binary is versioned. With similarly
> versioned headers, the library ABI could be fully controlled, and a
> lot of the patches that have been queued by Phil and Paolo could go
> in.
>
> Because of this, I consider the status quo something that can be improved.
> ...
> Thoughts? I'll start working on implementing the above, and wait for
> additional input.
I like this idea a lot. There's more to do to make it work, though.
We should incorporate the ABI version -- that portion of the release
version whose ABI is frozen, "3.1" for now -- into the library name
itself, so that programs compiled with different compiler versions
can run on the same machine. (This is similar to what is done in
Debian to avoid what some call "RPM hell".)
An alternative is to add a versioned "--rpath" directory, e.g.
"$prefix/lib/$abiversion/libstdc++.so". This has the advantage that
it gives others a place to put libraries built with the same-version
compiler and library . Without such a directory, others (also) have
to incorporate the compiler version into their library name to be
able to have programs built with different compilers using the
correct version of the corresponding library.
Nathan Myers
ncm at cantrip dot org