Re: Using C++11
- From: Murray Cumming <murrayc murrayc com>
- To: Chris Vine <chris cvine freeserve co uk>
- Cc: gtkmm-list gnome org
- Subject: Re: Using C++11
- Date: Tue, 30 Jun 2015 12:22:38 +0200
On Tue, 2015-06-30 at 12:06 +0200, Murray Cumming wrote:
And would you agree that Ubuntu (for instance) will have to do the
same thing when C++11 (--std=c++11) becomes the default in g++ 6,
when they use g++ 6?
No. Assuming gcc-6 still provides libstdc++ with both ABIs (my
guess
is that gcc will do so for a considerable number of releases), then
it
would depend on whether ubuntu chooses to use the new ABI instead of
the old one for its C++ binaries.
Isn't Ubuntu likely to make the same choice that Fedora has made, at
least at some point?
Or is Fedora just doing this (using the C++11 libstdc++ API) because
they really like C++11 and want to make the C++11 experience as good
as
possible?
It looks like Ubuntu does plan to use gcc 5 in Ubuntu 15.10 (in
development now):
http://summit.ubuntu.com/uos-1505/meeting/22506/gcc-5-update-for-1510/
though it's currently still using gcc 4.9.2:
http://packages.ubuntu.com/search?suite=wily&keywords=gcc
The plan isn't clear to me, but they are maybe going to try doing
parallel-installs of all the affected libraries, though that seems
unmanageable to me:
http://pad.ubuntu.com/uos-1505-gcc-5-update-for-1510
These are the meeting notes. If you can't log in to see that, here's a
copy/paste of part of the current contents:
"
== libstdc++ ABI transition ===
* libstdc++ doesn't change the soname, provides a dual ABI
* having objects with both ABIs in a process is doomed to fail.
* libraries depending on libstdc++ may need to change their ABI
How to see:
* build the library with GCC 5
* if the library exports some __cxx11 symbols, it may be
incompatible,
if these are symbols which form part of the public API
* To be conservative, you want to assume that the library is
incompatible.
* If the library is incompatible, rename the package, append "c++11" to
the name of the package.
* Instead of renaming, support ABI coexistence like libstdc++ (maybe
some upstreams will do that)
* To build code with gcc-5 which is compatible with the old ABI, define
the macro
_GLIBCXX_USE_CXX11_ABI to 0 before including any C++ standard library
headers.
Should only be used for leaf packages, not for libraries as a last
resort.
"
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]