public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: News item regarding c++98 vs c++11
@ 2014-10-19 22:53 Anthony G. Basile
  2014-10-19 22:57 ` Jeroen Roovers
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Anthony G. Basile @ 2014-10-19 22:53 UTC (permalink / raw
  To: Gentoo Development

Hi everyone,

I debated about whether to write a news item about c++11 abi. Usually 
our news items are about some change which requires user intervention.  
But this is just precautionary.  With more packages needing c++11 
because of source changes, we may want to inform users about breakage at 
the ABI level in case they do something like add -std=c++11 to their 
global CXXFLAGS.

Let me know if you think its worth sending out and/or any other suggestions.


Title: GCC 4.7 Introduces New c++11 ABI
Author: Anthony G. Basile <blueness@gentoo.org>
Content-Type: text/plain
Posted: 2014-10-20
Revision: 1
News-Item-Format: 1.0
Display-If-Installed: >=sys-devel/gcc-4.7.0
Display-If-Keyword: amd64
Display-If-Keyword: arm
Display-If-Keyword: mips
Display-If-Keyword: ppc
Display-If-Keyword: ppc64
Display-If-Keyword: x86
Display-If-Keyword: amd64-fbsd
Display-If-Keyword: x86-fbsd

GCC 4.7 introduced the new experimental 2011 ISO C++ standard [1], along 
with
its GNU variant.  This new standard is not the default in GCC 4.7, 4.8 
or 4.9,
the default is still gnu++98, but it can be enabled by passing -std=c++11 or
-std=gnu++11 to CXXFLAGS.

Users that wish to try c++11 should exercise caution because it is not
ABI-compatible with c++98.  Thus linking c++98 and c++11 objects is 
likely to
cause breakage.  For packages which are self-contained and do not link 
against
any libraries written in C++, there is no problem.  However, switching 
to c++11
and then building packages which link against any of the numerous 
libraries still
in the older ABI, can lead to a crippled system.

This is a precautionary news item and the typical user need not do anything.
However, as c++11 gains in popularity and the number of packages using it
increase, it is important that users understand these precautions.

For an ABI compliance checker, and more information about C++ ABIs, see 
[2].

Ref.
[1] http://www.stroustrup.com/C++11FAQ.html
[2] http://ispras.linuxbase.org/index.php/ABI_compliance_checker

-- 
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail    : blueness@gentoo.org
GnuPG FP  : 1FED FAD9 D82C 52A5 3BAB  DC79 9384 FA6E F52D 4BBA
GnuPG ID  : F52D4BBA



^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-10-26 11:18 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-19 22:53 [gentoo-dev] RFC: News item regarding c++98 vs c++11 Anthony G. Basile
2014-10-19 22:57 ` Jeroen Roovers
2014-10-19 22:59   ` Anthony G. Basile
2014-10-20  4:59     ` [gentoo-dev] " Duncan
2014-10-20 11:54       ` Anthony G. Basile
2014-10-19 23:08 ` [gentoo-dev] " Alex Xu
2014-10-20 11:30   ` Anthony G. Basile
2014-10-20  6:36 ` Luca Barbato
2014-10-20  8:23   ` Alexander Berntsen
2014-10-20 10:58     ` Anthony G. Basile
2014-10-20 13:47       ` [gentoo-dev] " Martin Vaeth
2014-10-20 15:10         ` Rich Freeman
2014-10-20 18:35       ` [gentoo-dev] " Ian Stakenvicius
2014-10-20 19:49         ` Anthony G. Basile
2014-10-20 19:50           ` Anthony G. Basile
2014-10-21  8:45         ` [gentoo-dev] " Martin Vaeth
2014-10-21 14:25           ` Mike Gilbert
2014-10-21 17:09             ` "Paweł Hajdan, Jr."
2014-10-21 20:16             ` Martin Vaeth
2014-10-24 14:31               ` Anthony G. Basile
2014-10-24 15:10                 ` Alex Xu
2014-10-24 15:31                 ` "Paweł Hajdan, Jr."
2014-10-24 17:29                   ` Anthony G. Basile
2014-10-25  9:32                     ` "Paweł Hajdan, Jr."
2014-10-26 11:19                       ` Anthony G. Basile
2014-10-20 16:21 ` [gentoo-dev] " "Paweł Hajdan, Jr."
2014-10-20 19:42   ` Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox