versioning C++ includes
Benjamin Kosnik
bkoz@redhat.com
Tue Jun 25 10:16:00 GMT 2002
Currently, g++/libstdc++ installs files in:
(prefix)/include/g++-v3
It's done this for some time. Although this does work, there are a
couple of problems with the current approach:
1) People who think they are using gcc-3 and libstdc++-v3 because of
the '-v3' parts of the above install directory in older compilers,
including gcc-2.96, gcc-2.95.x, etc. This has been a constant,
low-level annoyance for years.
2) Adding and especially removing C++ include files in a common
(prefix) directory results in versioning problems, aptly summarized
by the __basic_file problems that were reported my multiple people
during the gcc-3.0.x to gcc-3.1.x upgrade process.
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.
Here's my suggestion:
Future g++/libstdc++ installs files in:
(prefix)/include/c++/VERSION
Where version is the release number.
This matches java's clearly named language-orientated installation
directories, and the
(prefix)/lib/gcc-lib/(target)/VERSION/include
bits from gcc.
Thoughts? I'll start working on implementing the above, and wait for
additional input.
-benjamin
More information about the Libstdc++
mailing list