[Buildroot] [PATCH 2/2] boost: context needs C++11

Thomas Petazzoni thomas.petazzoni at bootlin.com
Mon Aug 20 21:37:28 UTC 2018


Hello Fabrice,

On Mon, 20 Aug 2018 23:33:14 +0200, Fabrice Fontaine wrote:

> > I was about to apply, but... C++11 requires at least gcc 4.8 or 4.9
> >  
> That's not right, C++11 requires at least gcc 4.7 (see libcec, jsoncpp,
> poppler, yaml-cpp, ...)

OK. It in fact depends on which C++11 features you depend on, see
https://gcc.gnu.org/projects/cxx-status.html#cxx11. Some C++11 features
only got added in 4.8.

> > depending on the features being used, and I don't see any dependency on
> > a gcc version in the definition of BR2_PACKAGE_BOOST_CONTEXT.  
> 
> But you're right, we should update first patch to select
> BR2_PACKAGE_BOOST_THREAD if gcc version is lower than 4.7 (and not 4.8). I
> will send a v2.

Well, see above. C++11 support is not as clear-cut as: gcc < 4.7
doesn't have it, gcc >= 4.7 has it.

> > There are
> > also other Boost options that say they are related to C++11.
> >  
> I did not check if we should add -std=c++11 for those other boost options.
> At least, it does not cause any build failures but perhaps some features
> are wrongly disabled with some older versions of gcc.
> 
> >
> > Don't we have a problem with gcc 4.7 or older compilers ?
> >  
> std=c++11 works with gcc 4.7, I did not take time to test with older
> versions.

So what are you going to do ? Add std=c++11 unconditionally, without
knowing if this is going to be accepted by older gcc versions ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list