* [Buildroot] [PATCH] [RFC] package/boost: Boost.Atomic needs atomic intrinsics
@ 2022-12-05 12:54 Michael Nosthoff via buildroot
2022-12-05 17:19 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-12-05 12:54 UTC (permalink / raw)
To: buildroot
From: Michael <buildroot@heine.tech>
similar to previous problems with nios2 and not-available atomic ints
the build for Boost.Atomics also fails for ARC Targets which don't
have the ATOMICS_EXT flag set.
according to [0] "Boost.Atomic has a hard requirement of the native
atomic operations on bytes". The same tests mentioned there fail for
ARC.
so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc.
Fixes:
http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493
[0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
I'm not 100% sure if BR2_ARC_ATOMIC_EXT is the correct
flag to use. I'm open to suggestions for better ways and what to
propagate to dependent packages.
---
package/boost/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/boost/Config.in b/package/boost/Config.in
index b99b01f22e..e012f5050f 100644
--- a/package/boost/Config.in
+++ b/package/boost/Config.in
@@ -19,6 +19,7 @@ if BR2_PACKAGE_BOOST
config BR2_PACKAGE_BOOST_ATOMIC
bool "boost-atomic"
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+ depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
help
C++11-style atomic<>.
--
2.37.1 (Apple Git-137.1)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] [RFC] package/boost: Boost.Atomic needs atomic intrinsics
2022-12-05 12:54 [Buildroot] [PATCH] [RFC] package/boost: Boost.Atomic needs atomic intrinsics Michael Nosthoff via buildroot
@ 2022-12-05 17:19 ` Thomas Petazzoni via buildroot
2022-12-05 20:14 ` Michael Nosthoff via buildroot
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-12-05 17:19 UTC (permalink / raw)
To: Michael Nosthoff via buildroot
On Mon, 5 Dec 2022 13:54:22 +0100
Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
> From: Michael <buildroot@heine.tech>
>
> similar to previous problems with nios2 and not-available atomic ints
> the build for Boost.Atomics also fails for ARC Targets which don't
> have the ATOMICS_EXT flag set.
>
> according to [0] "Boost.Atomic has a hard requirement of the native
> atomic operations on bytes". The same tests mentioned there fail for
> ARC.
>
> so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc.
>
> Fixes:
> http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493
>
> [0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348
>
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
I wish it would be this simple, but this new "depends on" needs to be
propagated to all places where BR2_PACKAGE_BOOST_ATOMIC is selected.
Aka:
package/boost/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
package/boost/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
package/domoticz/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
package/gnuradio/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
package/libcpprestsdk/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
package/log4cxx/Config.in: select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_GCC_AT_LEAST_7
package/uhd/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
And of course, if there's anything that selects those options, the new
depends on should be propagated to them again.
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] [RFC] package/boost: Boost.Atomic needs atomic intrinsics
2022-12-05 17:19 ` Thomas Petazzoni via buildroot
@ 2022-12-05 20:14 ` Michael Nosthoff via buildroot
0 siblings, 0 replies; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-12-05 20:14 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Michael Nosthoff via buildroot
Hi Thomas,
On Monday, December 05, 2022 18:19 CET, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> On Mon, 5 Dec 2022 13:54:22 +0100
> Michael Nosthoff via buildroot <buildroot@buildroot.org> wrote:
>
> > From: Michael <buildroot@heine.tech>
> >
> > similar to previous problems with nios2 and not-available atomic ints
> > the build for Boost.Atomics also fails for ARC Targets which don't
> > have the ATOMICS_EXT flag set.
> >
> > according to [0] "Boost.Atomic has a hard requirement of the native
> > atomic operations on bytes". The same tests mentioned there fail for
> > ARC.
> >
> > so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc.
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493
> >
> > [0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348
> >
> > Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
>
> I wish it would be this simple, but this new "depends on" needs to be
> propagated to all places where BR2_PACKAGE_BOOST_ATOMIC is selected.
>
> Aka:
>
> package/boost/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
> package/boost/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
> package/domoticz/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
> package/gnuradio/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
> package/libcpprestsdk/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
> package/log4cxx/Config.in: select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_GCC_AT_LEAST_7
> package/uhd/Config.in: select BR2_PACKAGE_BOOST_ATOMIC
>
> And of course, if there's anything that selects those options, the new
> depends on should be propagated to them again.
I'm aware of these dependencies. That's why I submitted this RFC Patch because I wanted to be sure to
use the right dependency before going through all those packages. (I guess you missed my "below the commit
message" part).
Does it make sense to add
depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
to all those packages or is there something "smarter"?
Would it make sense to group it with the dependency on
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS and add something like
BR2_PACKAGE_BOOST_ATOMIC_ARCH_SUPPORT?
Regards,
Michael
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-05 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 12:54 [Buildroot] [PATCH] [RFC] package/boost: Boost.Atomic needs atomic intrinsics Michael Nosthoff via buildroot
2022-12-05 17:19 ` Thomas Petazzoni via buildroot
2022-12-05 20:14 ` Michael Nosthoff via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox