* [PATCH] boost: more elaborate and correct usage of GCC atomicity. [not found] <1256849813-10538-1-git-send-email-przemyslaw.wesolek@cs.put.poznan.pl> @ 2009-11-05 13:18 ` Przemyslaw Wesolek 2009-11-05 15:31 ` Koen Kooi 2009-11-05 14:58 ` [PATCH] boost: more elaborate and correct usage of GCC atomicity Przemyslaw Wesolek 1 sibling, 1 reply; 7+ messages in thread From: Przemyslaw Wesolek @ 2009-11-05 13:18 UTC (permalink / raw) To: openembedded-devel Signed-off-by: Przemyslaw Wesolek <przemyslaw.wesolek@cs.put.poznan.pl> --- This patch is based on upstream corrections spotted in 1.40 version. They allow to properly compile Boost on both <4.2 and >=4.2 GCC, for ARM machines. Applicable to both devel and stable. recipes/boost/boost_1.36.0.bb | 4 +++- recipes/boost/files/atomic_count_arm.patch | 11 +++++++++++ .../boost/files/atomic_count_gcc_atomicity.patch | 7 +++++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 recipes/boost/files/atomic_count_arm.patch diff --git a/recipes/boost/boost_1.36.0.bb b/recipes/boost/boost_1.36.0.bb index 140ab29..276ca9b 100644 --- a/recipes/boost/boost_1.36.0.bb +++ b/recipes/boost/boost_1.36.0.bb @@ -1,9 +1,11 @@ include boost-36.inc -PR = "r6" +PR = "r8" SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \ file://arm-intrinsics.patch;patch=1 \ + file://atomic_count_gcc_atomicity.patch;patch=1 \ + file://atomic_count_arm.patch;patch=1 \ " BJAM_OPTS = '${BJAM_TOOLS} \ diff --git a/recipes/boost/files/atomic_count_arm.patch b/recipes/boost/files/atomic_count_arm.patch new file mode 100644 index 0000000..1017ebc --- /dev/null +++ b/recipes/boost/files/atomic_count_arm.patch @@ -0,0 +1,11 @@ +--- boost_1_36_0/boost/detail/atomic_count.hpp.orig 2007-11-23 18:03:14.000000000 +0100 ++++ boost_1_36_0/boost/detail/atomic_count.hpp 2009-09-25 18:17:12.602907541 +0200 +@@ -101,7 +101,7 @@ + + # include <boost/detail/atomic_count_win32.hpp> + +-#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) ++#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( __arm__ ) && !defined( __armel__ ) + + # include <boost/detail/atomic_count_sync.hpp> + diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch b/recipes/boost/files/atomic_count_gcc_atomicity.patch index 7d08e73..3b09a8a 100644 --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp =================================================================== --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:45.000000000 +0200 +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:55.000000000 +0200 -@@ -17,7 +17,7 @@ +@@ -17,7 +17,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // --#include <bits/atomicity.h> ++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402 +#include <ext/atomicity.h> ++#else + #include <bits/atomicity.h> ++#endif namespace boost { -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: more elaborate and correct usage of GCC atomicity. 2009-11-05 13:18 ` [PATCH] boost: more elaborate and correct usage of GCC atomicity Przemyslaw Wesolek @ 2009-11-05 15:31 ` Koen Kooi 2009-11-05 16:01 ` Przemyslaw Wesolek 0 siblings, 1 reply; 7+ messages in thread From: Koen Kooi @ 2009-11-05 15:31 UTC (permalink / raw) To: openembedded-devel On 05-11-09 14:18, Przemyslaw Wesolek wrote: > > Signed-off-by: Przemyslaw Wesolek<przemyslaw.wesolek@cs.put.poznan.pl> > --- > > This patch is based on upstream corrections spotted in 1.40 version. > They allow to properly compile Boost on both<4.2 and>=4.2 GCC, for > ARM machines. > > Applicable to both devel and stable. Your patch seems to be based on an old (as in: the day before yesterday) snapshot of OE. I added a different set of patches which do almost the same, but keep proper atomic ops for armv6 and armv7a, while yours would fall back to emulated atomic ops for all arm platforms. regards, Koen > > > recipes/boost/boost_1.36.0.bb | 4 +++- > recipes/boost/files/atomic_count_arm.patch | 11 +++++++++++ > .../boost/files/atomic_count_gcc_atomicity.patch | 7 +++++-- > 3 files changed, 19 insertions(+), 3 deletions(-) > create mode 100644 recipes/boost/files/atomic_count_arm.patch > > diff --git a/recipes/boost/boost_1.36.0.bb b/recipes/boost/boost_1.36.0.bb > index 140ab29..276ca9b 100644 > --- a/recipes/boost/boost_1.36.0.bb > +++ b/recipes/boost/boost_1.36.0.bb > @@ -1,9 +1,11 @@ > include boost-36.inc > > -PR = "r6" > +PR = "r8" > > SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \ > file://arm-intrinsics.patch;patch=1 \ > + file://atomic_count_gcc_atomicity.patch;patch=1 \ > + file://atomic_count_arm.patch;patch=1 \ > " > > BJAM_OPTS = '${BJAM_TOOLS} \ > diff --git a/recipes/boost/files/atomic_count_arm.patch b/recipes/boost/files/atomic_count_arm.patch > new file mode 100644 > index 0000000..1017ebc > --- /dev/null > +++ b/recipes/boost/files/atomic_count_arm.patch > @@ -0,0 +1,11 @@ > +--- boost_1_36_0/boost/detail/atomic_count.hpp.orig 2007-11-23 18:03:14.000000000 +0100 > ++++ boost_1_36_0/boost/detail/atomic_count.hpp 2009-09-25 18:17:12.602907541 +0200 > +@@ -101,7 +101,7 @@ > + > + # include<boost/detail/atomic_count_win32.hpp> > + > +-#elif defined( __GNUC__ )&& ( __GNUC__ * 100 + __GNUC_MINOR__>= 401 ) > ++#elif defined( __GNUC__ )&& ( __GNUC__ * 100 + __GNUC_MINOR__>= 401 )&& !defined( __arm__ )&& !defined( __armel__ ) > + > + # include<boost/detail/atomic_count_sync.hpp> > + > diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch b/recipes/boost/files/atomic_count_gcc_atomicity.patch > index 7d08e73..3b09a8a 100644 > --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch > +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch > @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp > =================================================================== > --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:45.000000000 +0200 > +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:55.000000000 +0200 > -@@ -17,7 +17,7 @@ > +@@ -17,7 +17,11 @@ > // http://www.boost.org/LICENSE_1_0.txt) > // > > --#include<bits/atomicity.h> > ++#if __GNUC__ * 100 + __GNUC_MINOR__>= 402 > +#include<ext/atomicity.h> > ++#else > + #include<bits/atomicity.h> > ++#endif > > namespace boost > { ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: more elaborate and correct usage of GCC atomicity. 2009-11-05 15:31 ` Koen Kooi @ 2009-11-05 16:01 ` Przemyslaw Wesolek 2009-11-05 16:41 ` Koen Kooi 0 siblings, 1 reply; 7+ messages in thread From: Przemyslaw Wesolek @ 2009-11-05 16:01 UTC (permalink / raw) To: openembedded-devel Koen Kooi wrote: > Your patch seems to be based on an old (as in: the day before yesterday) > snapshot of OE. I added a different set of patches which do almost the > same, but keep proper atomic ops for armv6 and armv7a, while yours would > fall back to emulated atomic ops for all arm platforms. Great. But I see that my change: >> diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch >> b/recipes/boost/files/atomic_count_gcc_atomicity.patch >> index 7d08e73..3b09a8a 100644 >> --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch >> +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch >> @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp >> =================================================================== >> --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp >> 2008-05-01 20:43:45.000000000 +0200 >> +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 >> 20:43:55.000000000 +0200 >> -@@ -17,7 +17,7 @@ >> +@@ -17,7 +17,11 @@ >> // http://www.boost.org/LICENSE_1_0.txt) >> // >> >> --#include<bits/atomicity.h> >> ++#if __GNUC__ * 100 + __GNUC_MINOR__>= 402 >> +#include<ext/atomicity.h> >> ++#else >> + #include<bits/atomicity.h> >> ++#endif >> >> namespace boost >> { is still applicable. Shell I post a patch for this issue separately? Przemek ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: more elaborate and correct usage of GCC atomicity. 2009-11-05 16:01 ` Przemyslaw Wesolek @ 2009-11-05 16:41 ` Koen Kooi 2009-11-05 19:12 ` [PATCH] boost: corrected atomicity.h include for GCC<4.2 Przemyslaw Wesolek 0 siblings, 1 reply; 7+ messages in thread From: Koen Kooi @ 2009-11-05 16:41 UTC (permalink / raw) To: openembedded-devel On 05-11-09 17:01, Przemyslaw Wesolek wrote: > Koen Kooi wrote: >> Your patch seems to be based on an old (as in: the day before yesterday) >> snapshot of OE. I added a different set of patches which do almost the >> same, but keep proper atomic ops for armv6 and armv7a, while yours would >> fall back to emulated atomic ops for all arm platforms. > > Great. But I see that my change: > >>> diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch >>> b/recipes/boost/files/atomic_count_gcc_atomicity.patch >>> index 7d08e73..3b09a8a 100644 >>> --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch >>> +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch >>> @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp >>> =================================================================== >>> --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp >>> 2008-05-01 20:43:45.000000000 +0200 >>> +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 >>> 20:43:55.000000000 +0200 >>> -@@ -17,7 +17,7 @@ >>> +@@ -17,7 +17,11 @@ >>> // http://www.boost.org/LICENSE_1_0.txt) >>> // >>> >>> --#include<bits/atomicity.h> >>> ++#if __GNUC__ * 100 + __GNUC_MINOR__>= 402 >>> +#include<ext/atomicity.h> >>> ++#else >>> + #include<bits/atomicity.h> >>> ++#endif >>> >>> namespace boost >>> { > > is still applicable. Shell I post a patch for this issue separately? Yes please :) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] boost: corrected atomicity.h include for GCC<4.2 2009-11-05 16:41 ` Koen Kooi @ 2009-11-05 19:12 ` Przemyslaw Wesolek 2009-11-08 22:37 ` Przemyslaw Wesolek 0 siblings, 1 reply; 7+ messages in thread From: Przemyslaw Wesolek @ 2009-11-05 19:12 UTC (permalink / raw) To: openembedded-devel This patch is based on upstream correction spotted in 1.40 version. They allow to properly compile Boost on both <4.2 and >=4.2 GCC. With GCC 4.2 some headers were changed (see [1]). This patch uses appropriate header based on GCC version, so allows compilation on both versions of GCC API. This change affects boost 1.33 and 1.36. Upstream version 1.34 has hard-coded change to the new header, so this patch don't apply. Applicable to both devel and stable. [1] http://gcc.gnu.org/onlinedocs/libstdc++/manual/api.html#api.rel_420 Signed-off-by: Przemyslaw Wesolek <przemyslaw.wesolek@cs.put.poznan.pl> --- .../boost/files/atomic_count_gcc_atomicity.patch | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch b/recipes/boost/files/atomic_count_gcc_atomicity.patch index 7d08e73..3b09a8a 100644 --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp =================================================================== --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:45.000000000 +0200 +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:55.000000000 +0200 -@@ -17,7 +17,7 @@ +@@ -17,7 +17,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // --#include <bits/atomicity.h> ++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402 +#include <ext/atomicity.h> ++#else + #include <bits/atomicity.h> ++#endif namespace boost { -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] boost: corrected atomicity.h include for GCC<4.2 2009-11-05 19:12 ` [PATCH] boost: corrected atomicity.h include for GCC<4.2 Przemyslaw Wesolek @ 2009-11-08 22:37 ` Przemyslaw Wesolek 0 siblings, 0 replies; 7+ messages in thread From: Przemyslaw Wesolek @ 2009-11-08 22:37 UTC (permalink / raw) To: openembedded-devel Can I ask for commit? Przemek ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] boost: more elaborate and correct usage of GCC atomicity. [not found] <1256849813-10538-1-git-send-email-przemyslaw.wesolek@cs.put.poznan.pl> 2009-11-05 13:18 ` [PATCH] boost: more elaborate and correct usage of GCC atomicity Przemyslaw Wesolek @ 2009-11-05 14:58 ` Przemyslaw Wesolek 1 sibling, 0 replies; 7+ messages in thread From: Przemyslaw Wesolek @ 2009-11-05 14:58 UTC (permalink / raw) To: openembedded-devel This patch is based on upstream corrections spotted in 1.40 version. They allow to properly compile Boost on both <4.2 and >=4.2 GCC, for ARM machines. First, correct include is made on ARM machines, atomic_count_gcc.hpp instead of atomic_count_sync.hpp. Second, with GCC 4.2 some headers were changed (see [1]). This patch uses appropriate header based on GCC version, so allows compilation on both versions of GCC API. This change also affects -- in a good way -- boost 1.33 recipe. Version 1.34 had hard-coded change to the new header so this patch don't apply. Applicable to both devel and stable. [1] http://gcc.gnu.org/onlinedocs/libstdc++/manual/api.html#api.rel_420 Signed-off-by: Przemyslaw Wesolek <przemyslaw.wesolek@cs.put.poznan.pl> --- recipes/boost/boost_1.36.0.bb | 4 +++- recipes/boost/files/atomic_count_arm.patch | 11 +++++++++++ .../boost/files/atomic_count_gcc_atomicity.patch | 7 +++++-- 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 recipes/boost/files/atomic_count_arm.patch diff --git a/recipes/boost/boost_1.36.0.bb b/recipes/boost/boost_1.36.0.bb index 140ab29..276ca9b 100644 --- a/recipes/boost/boost_1.36.0.bb +++ b/recipes/boost/boost_1.36.0.bb @@ -1,9 +1,11 @@ include boost-36.inc -PR = "r6" +PR = "r8" SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \ file://arm-intrinsics.patch;patch=1 \ + file://atomic_count_gcc_atomicity.patch;patch=1 \ + file://atomic_count_arm.patch;patch=1 \ " BJAM_OPTS = '${BJAM_TOOLS} \ diff --git a/recipes/boost/files/atomic_count_arm.patch b/recipes/boost/files/atomic_count_arm.patch new file mode 100644 index 0000000..1017ebc --- /dev/null +++ b/recipes/boost/files/atomic_count_arm.patch @@ -0,0 +1,11 @@ +--- boost_1_36_0/boost/detail/atomic_count.hpp.orig 2007-11-23 18:03:14.000000000 +0100 ++++ boost_1_36_0/boost/detail/atomic_count.hpp 2009-09-25 18:17:12.602907541 +0200 +@@ -101,7 +101,7 @@ + + # include <boost/detail/atomic_count_win32.hpp> + +-#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) ++#elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) && !defined( __arm__ ) && !defined( __armel__ ) + + # include <boost/detail/atomic_count_sync.hpp> + diff --git a/recipes/boost/files/atomic_count_gcc_atomicity.patch b/recipes/boost/files/atomic_count_gcc_atomicity.patch index 7d08e73..3b09a8a 100644 --- a/recipes/boost/files/atomic_count_gcc_atomicity.patch +++ b/recipes/boost/files/atomic_count_gcc_atomicity.patch @@ -2,12 +2,15 @@ Index: boost_1_33_1/boost/detail/atomic_count_gcc.hpp =================================================================== --- boost_1_33_1.orig/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:45.000000000 +0200 +++ boost_1_33_1/boost/detail/atomic_count_gcc.hpp 2008-05-01 20:43:55.000000000 +0200 -@@ -17,7 +17,7 @@ +@@ -17,7 +17,11 @@ // http://www.boost.org/LICENSE_1_0.txt) // --#include <bits/atomicity.h> ++#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402 +#include <ext/atomicity.h> ++#else + #include <bits/atomicity.h> ++#endif namespace boost { -- 1.6.3.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-08 22:38 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1256849813-10538-1-git-send-email-przemyslaw.wesolek@cs.put.poznan.pl> 2009-11-05 13:18 ` [PATCH] boost: more elaborate and correct usage of GCC atomicity Przemyslaw Wesolek 2009-11-05 15:31 ` Koen Kooi 2009-11-05 16:01 ` Przemyslaw Wesolek 2009-11-05 16:41 ` Koen Kooi 2009-11-05 19:12 ` [PATCH] boost: corrected atomicity.h include for GCC<4.2 Przemyslaw Wesolek 2009-11-08 22:37 ` Przemyslaw Wesolek 2009-11-05 14:58 ` [PATCH] boost: more elaborate and correct usage of GCC atomicity Przemyslaw Wesolek
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.