summaryrefslogtreecommitdiff
path: root/recipes/boost
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-11-04 22:03:23 +0100
committerKoen Kooi <koen@openembedded.org>2009-11-04 22:03:23 +0100
commit3a26240e09072ec125f80e3a0131080265a2fac7 (patch)
tree1c8facb86ebefb65c59dd071f5fe2b0f104bd8c3 /recipes/boost
parenta0afb38137e89893bcd31b3a617cf60b0ed3cd9c (diff)
boost 1.36: various ARM fixups:
* changed intrinsics patch to work for armv6 and armv7a * disabled atomic ops for arm versions <6 * fix associated build damage * pass in correct gcc version
Diffstat (limited to 'recipes/boost')
-rw-r--r--recipes/boost/boost-36.inc2
-rw-r--r--recipes/boost/boost_1.36.0.bb5
-rw-r--r--recipes/boost/files/01-no-serialization-test.patch12
-rw-r--r--recipes/boost/files/02-atomic-count-pthreads-on-arm.patch17
-rw-r--r--recipes/boost/files/03-exception-clone-destructor-fix.patch12
-rw-r--r--recipes/boost/files/arm-intrinsics.patch6
6 files changed, 49 insertions, 5 deletions
diff --git a/recipes/boost/boost-36.inc b/recipes/boost/boost-36.inc
index 4bd065f13a..1200e9a5a6 100644
--- a/recipes/boost/boost-36.inc
+++ b/recipes/boost/boost-36.inc
@@ -128,7 +128,7 @@ BJAM_OPTS = '${BJAM_TOOLS} \
do_configure_prepend() {
cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
- echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
+ echo "using gcc : $(${CXX} -dumpversion) : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;" >> ${S}/tools/build/v2/user-config.jam
}
do_compile() {
diff --git a/recipes/boost/boost_1.36.0.bb b/recipes/boost/boost_1.36.0.bb
index 140ab290ba..898d1b1603 100644
--- a/recipes/boost/boost_1.36.0.bb
+++ b/recipes/boost/boost_1.36.0.bb
@@ -1,9 +1,12 @@
include boost-36.inc
-PR = "r6"
+PR = "r7"
SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \
file://arm-intrinsics.patch;patch=1 \
+ file://01-no-serialization-test.patch;patch=1 \
+ file://02-atomic-count-pthreads-on-arm.patch;patch=1 \
+ file://03-exception-clone-destructor-fix.patch;patch=1 \
"
BJAM_OPTS = '${BJAM_TOOLS} \
diff --git a/recipes/boost/files/01-no-serialization-test.patch b/recipes/boost/files/01-no-serialization-test.patch
new file mode 100644
index 0000000000..f1c9ca8572
--- /dev/null
+++ b/recipes/boost/files/01-no-serialization-test.patch
@@ -0,0 +1,12 @@
+diff -purN orig/libs/serialization/build/Jamfile.v2 boost_1_36_0/libs/serialization/build/Jamfile.v2
+--- orig/libs/serialization/build/Jamfile.v2 2008-09-11 18:45:03.000000000 -0400
++++ boost_1_36_0/libs/serialization/build/Jamfile.v2 2008-09-11 18:45:40.000000000 -0400
+@@ -8,7 +8,7 @@
+
+ project boost/serialization
+ : source-location ../src
+- : requirements <dependency>../../config/test/all//BOOST_NO_STD_LOCALE
++ : requirements
+ <conditional>@include-spirit
+ ;
+
diff --git a/recipes/boost/files/02-atomic-count-pthreads-on-arm.patch b/recipes/boost/files/02-atomic-count-pthreads-on-arm.patch
new file mode 100644
index 0000000000..c6f2e19685
--- /dev/null
+++ b/recipes/boost/files/02-atomic-count-pthreads-on-arm.patch
@@ -0,0 +1,17 @@
+diff -purN orig/boost/detail/atomic_count.hpp boost_1_36_0/boost/detail/atomic_count.hpp
+--- orig/boost/detail/atomic_count.hpp 2008-09-12 11:48:45.000000000 -0400
++++ boost_1_36_0/boost/detail/atomic_count.hpp 2008-09-12 14:36:33.000000000 -0400
+@@ -93,6 +93,13 @@ typedef long atomic_count;
+
+ # include <boost/detail/atomic_count_pthreads.hpp>
+
++#elif defined(BOOST_HAS_PTHREADS) && defined(__arm__) && !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_6J__)
++
++// MLC: need this on ARM, otherwise it'll attempt to use atomic_count_sync,
++// which has no ARM implementation.
++# define BOOST_AC_USE_PTHREADS
++# include <boost/detail/atomic_count_pthreads.hpp>
++
+ #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) )
+
+ # include <boost/detail/atomic_count_gcc_x86.hpp>
diff --git a/recipes/boost/files/03-exception-clone-destructor-fix.patch b/recipes/boost/files/03-exception-clone-destructor-fix.patch
new file mode 100644
index 0000000000..d78759b5e3
--- /dev/null
+++ b/recipes/boost/files/03-exception-clone-destructor-fix.patch
@@ -0,0 +1,12 @@
+diff -purN orig/boost/exception/enable_current_exception.hpp boost_1_36_0/boost/exception/enable_current_exception.hpp
+--- orig/boost/exception/enable_current_exception.hpp 2008-09-12 11:48:45.000000000 -0400
++++ boost_1_36_0/boost/exception/enable_current_exception.hpp 2008-09-12 15:13:06.000000000 -0400
+@@ -96,6 +96,8 @@ boost
+ *be1 = *be2;
+ }
+
++ ~exception_clone() throw() { }
++
+ private:
+
+ detail::atomic_count mutable count_;
diff --git a/recipes/boost/files/arm-intrinsics.patch b/recipes/boost/files/arm-intrinsics.patch
index 860b6df67c..1f1eed684a 100644
--- a/recipes/boost/files/arm-intrinsics.patch
+++ b/recipes/boost/files/arm-intrinsics.patch
@@ -5,7 +5,7 @@ diff -Nurd boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp boost_1_36_0.arm
void operator++()
{
-+#ifdef __ARM_ARCH_7A__
++#if defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_6J__)
+ int v1, tmp;
+ asm volatile ("1: \n\t"
+ "ldrex %0, %1 \n\t"
@@ -22,7 +22,7 @@ diff -Nurd boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp boost_1_36_0.arm
long operator--()
{
-+#ifdef __ARM_ARCH_7A__
++#if defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_6J__)
+ int v1, tmp;
+ asm volatile ("1: \n\t"
+ "ldrex %0, %1 \n\t"
@@ -40,7 +40,7 @@ diff -Nurd boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp boost_1_36_0.arm
operator long() const
{
-+#if __ARM_ARCH_7A__
++#if defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_6J__)
+ return value_;
+#else
return __sync_fetch_and_add( &value_, 0 );