[lsb-discuss] LSB, GCC versions C++11 and libstdc++

Mats Wichmann mats at wichmann.us
Wed Feb 27 14:48:55 UTC 2013


On 02/27/2013 03:39 AM, Dallman, John wrote:
>> There are two issues with gcc 4.7 support.  The first is compatibility
>> with the compiler itself; the second is the addition of new features
>> supported in the 4.7 version of the standard library.
>>
>> As Mats has mentioned, support for those new libstdc++ features is a
>> fairly major project.  It's on our list for LSB 5.0, but could be
>> postponed, depending on other issues.
> 
> So, to make sure I understand this properly:
> 
> If you don't use C++11 features (this is most reliably avoided by using an
> explicit option for an older C++ standard, such as "-std=c++98") then you can
> build LSB-compliant applications to LSB 4.0 or LSB 3.1 standards using GCC
> 4.7.2 or later. Such applications will work on any Linux that's compliant
> with the LSB version you used.
> 
> If you do use C++11 features, you can't build LSB-compliant applications at
> present. This will become possible with the LSB version that supports C++11,
> which will also require GCC 4.7.2 or later C++ run-times. That LSB version
> is currently planned to be LSB 5.0, but the C++11 support could be postponed.
> 
> Is that correct?


It seems pretty accurate.  There's some stuff LSB has to capture and
write about here, because the LSB headers will not have the extensive
feature test macro setup that the glibc headers do, that would allow you
to select between one compilation environment or another.  The idea
originally was that LSB would be "exactly one thing", so you don't pick
and choose from among USE_BSD, USE_GNU, various POSIX levels, various
ISO-C levels, various ISO-C++ levels, etc; you would target exactly what
that version of LSB describes.  Of course a lot of years (12+) and a lot
of versions of LSB (which map onto different sets of external stuff) and
a lot of versions of GCC have gone by, and I'm not sure how a developer
would figure all of it out.  You've asked some good questions and I hope
someone will set out to document those and some of the stuff I've just
noted.





More information about the lsb-discuss mailing list