boost: revert b20c5ca3b8c5b180a6ee87556d0c87d474e86cde
PATCH 1/2 boost: revert b20c5ca3b8c5b180a6ee87556d0c87d474e86cde
mutex is available on gcc <= 4.7.x, the issue is that boost does not correctly detect it because -std=c++11 is missing
--- package/boost/Config.in | 1 - 1 file changed, 1 deletion(-)
package/boost/Config.in +0 -1
@@ -83,7 +83,6 @@ config BR2_PACKAGE_BOOST_CONTEXT bool "boost-context" depends on BR2_PACKAGE_BOOST_CONTEXT_ARCH_SUPPORTS depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 - select BR2_PACKAGE_BOOST_THREAD if !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 help C++11 context switching library.
Signature · 1 line
2.14.1
PATCH 2/2 boost: context needs C++11
Without this flag, mutex is not always correctly detected with gcc 4.x or 5.x. As a result, boost_thread is wrongly selected by boost_context.
Fixes:
- http://autobuild.buildroot.net/results/fb046c04fe18bec973d120e4ab33971f32ba5769
- http://autobuild.buildroot.net/results/99f1a255b78a973faeb8bf3b94d78efc54426a8b
--- package/boost/boost.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/boost/boost.mk +5 -0
@@ -61,6 +61,11 @@ else BOOST_FLAGS += --without-icu endif +# boost-context needs C++11 +ifeq ($(BR2_PACKAGE_BOOST_CONTEXT),y) +BOOST_TARGET_CXXFLAGS += -std=c++11 +endif + ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) BOOST_DEPENDENCIES += bzip2 zlib endif
Signature · 1 line
2.14.1
PATCH 2/2 boost: context needs C++11
Hello,
Quoted 17 lines · Fabrice Fontaine
Without this flag, mutex is not always correctly detected with gcc 4.x or 5.x. As a result,
boost_threadis wrongly selected byboost_context.Fixes:
- http://autobuild.buildroot.net/results/fb046c04fe18bec973d120e4ab33971f32ba5769
- http://autobuild.buildroot.net/results/99f1a255b78a973faeb8bf3b94d78efc54426a8bSigned-off-by Fabrice Fontaine <[email protected]>--- package/boost/boost.mk | 5 +++++ 1 file changed, 5 insertions(+)package/boost/boost.mk +0
-0
package/boost/boost.mk else · line 67
Quoted 7 lines
package/boost/boost.mk +4
-0@@ -61,6 +61,11 @@ else BOOST_FLAGS += --without-icu endif +# boost-context needs C++11 +ifeq ($(BR2_PACKAGE_BOOST_CONTEXT),y) +BOOST_TARGET_CXXFLAGS += -std=c++11 +endif
I was about to apply, but... C++11 requires at least gcc 4.8 or 4.9 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. There are also other Boost options that say they are related to C++11.
Don't we have a problem with gcc 4.7 or older compilers ?
https://git.buildroot.org/buildroot/tree/support/config-fragments/autobuild/powerpc-ctng_e500v2-linux-gnuspe.config
has a 4.7 compiler.
I'm not sure we have a gcc 4.6 compiler. Perhaps we should add that to the autobuilders.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/2 boost: context needs C++11
Am Mon, 20 Aug 2018 22:50:58 +0200 schrieb Thomas Petazzoni:
Quoted 2 lines
I'm not sure we have a gcc 4.6 compiler. Perhaps we should add that to the autobuilders.
Hi Thomas,
sounds good, and while being at it do we have a gcc-8.2 toolchain and another glibc-2.28-based toolchain for the autobuilders as well?
Regards, Bernd
PATCH 2/2 boost: context needs C++11
In reply to Thomas PetazzoniDear Thomas,
Le lun. 20 ao?t 2018 ? 22:51, Thomas Petazzoni <[email protected]> a ?crit :
Quoted 25 lines
Hello,
Quoted 5 lines · Fabrice Fontaine
Without this flag, mutex is not always correctly detected with gcc 4.x or 5.x. As a result,
boost_threadis wrongly selected byboost_context.Fixes:
-http://autobuild.buildroot.net/results/fb046c04fe18bec973d120e4ab33971f32ba5769
Quoted 1 line
-
http://autobuild.buildroot.net/results/99f1a255b78a973faeb8bf3b94d78efc54426a8b
Quoted 14 lines
Signed-off-by Fabrice Fontaine <[email protected]>--- package/boost/boost.mk | 5 +++++ 1 file changed, 5 insertions(+)package/boost/boost.mk +0
-0@@ -61,6 +61,11 @@ else BOOST_FLAGS += --without-icu endif
Quoted 7 lines
package/boost/boost.mk else · line 67
Quoted 4 lines
package/boost/boost.mk +4
-0+# boost-context needs C++11 +ifeq ($(BR2_PACKAGE_BOOST_CONTEXT),y) +BOOST_TARGET_CXXFLAGS += -std=c++11 +endifI 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, ...)
Quoted 2 lines
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.
Quoted 3 lines
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.
Quoted 3 lines
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.
Quoted 9 lines
https://git.buildroot.org/buildroot/tree/support/config-fragments/autobuild/powerpc-ctng_e500v2-linux-gnuspe.config
has a 4.7 compiler.I'm not sure we have a gcc 4.6 compiler. Perhaps we should add that to
the autobuilders.
Yes, it's a good idea.
Quoted 8 lines
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering
https://bootlin.com
Best Regards,
Fabrice
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180820/69f4d010/attachment.html>
PATCH 2/2 boost: context needs C++11
Hello Fabrice,
Quoted 4 lines · Fabrice Fontaine
Quoted 2 lines
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.
Quoted 6 lines
Quoted 2 lines
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_THREADif 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.
Quoted 8 lines
Quoted 3 lines
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.
Quoted 1 line
Quoted 4 lines
Quoted 2 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com