* [Buildroot] [PATCH 1/2] boost: revert b20c5ca3b8c5b180a6ee87556d0c87d474e86cde
@ 2018-08-20 16:55 Fabrice Fontaine
2018-08-20 16:55 ` [Buildroot] [PATCH 2/2] boost: context needs C++11 Fabrice Fontaine
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2018-08-20 16:55 UTC (permalink / raw)
To: buildroot
mutex is available on gcc <= 4.7.x, the issue is that boost does not
correctly detect it because -std=c++11 is missing
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/boost/Config.in | 1 -
1 file changed, 1 deletion(-)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index 965d198ebf..beddc8280c 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -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.
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] boost: context needs C++11
2018-08-20 16:55 [Buildroot] [PATCH 1/2] boost: revert b20c5ca3b8c5b180a6ee87556d0c87d474e86cde Fabrice Fontaine
@ 2018-08-20 16:55 ` Fabrice Fontaine
2018-08-20 20:50 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2018-08-20 16:55 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/boost/boost.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/boost/boost.mk b/package/boost/boost.mk
index 14f6162003..a09dd3cf45 100644
--- a/package/boost/boost.mk
+++ b/package/boost/boost.mk
@@ -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
--
2.14.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] boost: context needs C++11
2018-08-20 16:55 ` [Buildroot] [PATCH 2/2] boost: context needs C++11 Fabrice Fontaine
@ 2018-08-20 20:50 ` Thomas Petazzoni
2018-08-20 21:01 ` Bernd Kuhls
2018-08-20 21:33 ` Fabrice Fontaine
0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-08-20 20:50 UTC (permalink / raw)
To: buildroot
Hello,
On Mon, 20 Aug 2018 18:55:55 +0200, Fabrice Fontaine wrote:
> 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
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/boost/boost.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/boost/boost.mk b/package/boost/boost.mk
> index 14f6162003..a09dd3cf45 100644
> --- a/package/boost/boost.mk
> +++ b/package/boost/boost.mk
> @@ -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
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] boost: context needs C++11
2018-08-20 20:50 ` Thomas Petazzoni
@ 2018-08-20 21:01 ` Bernd Kuhls
2018-08-20 21:33 ` Fabrice Fontaine
1 sibling, 0 replies; 6+ messages in thread
From: Bernd Kuhls @ 2018-08-20 21:01 UTC (permalink / raw)
To: buildroot
Am Mon, 20 Aug 2018 22:50:58 +0200 schrieb Thomas Petazzoni:
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] boost: context needs C++11
2018-08-20 20:50 ` Thomas Petazzoni
2018-08-20 21:01 ` Bernd Kuhls
@ 2018-08-20 21:33 ` Fabrice Fontaine
2018-08-20 21:37 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Fabrice Fontaine @ 2018-08-20 21:33 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Le lun. 20 ao?t 2018 ? 22:51, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
a ?crit :
> Hello,
>
> On Mon, 20 Aug 2018 18:55:55 +0200, Fabrice Fontaine wrote:
> > 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
> >
> > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> > ---
> > package/boost/boost.mk | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/package/boost/boost.mk b/package/boost/boost.mk
> > index 14f6162003..a09dd3cf45 100644
> > --- a/package/boost/boost.mk
> > +++ b/package/boost/boost.mk
> > @@ -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
>
That's not right, C++11 requires at least gcc 4.7 (see libcec, jsoncpp,
poppler, yaml-cpp, ...)
> 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.
> 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.
>
>
> 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.
>
> 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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2/2] boost: context needs C++11
2018-08-20 21:33 ` Fabrice Fontaine
@ 2018-08-20 21:37 ` Thomas Petazzoni
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-08-20 21:37 UTC (permalink / raw)
To: buildroot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-08-20 21:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-20 16:55 [Buildroot] [PATCH 1/2] boost: revert b20c5ca3b8c5b180a6ee87556d0c87d474e86cde Fabrice Fontaine
2018-08-20 16:55 ` [Buildroot] [PATCH 2/2] boost: context needs C++11 Fabrice Fontaine
2018-08-20 20:50 ` Thomas Petazzoni
2018-08-20 21:01 ` Bernd Kuhls
2018-08-20 21:33 ` Fabrice Fontaine
2018-08-20 21:37 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox