[OE-core] [PATCH 8/8] boost: Fix build on soft-float ABI arm systems

Khem Raj raj.khem at gmail.com
Mon Feb 1 05:08:29 UTC 2016


We get errors like
./boost/test/execution_monitor.hpp:490:27: error: 'FE_DIVBYZERO' was not
declared in this scope
     BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,

on musl, rightly because FPU is not used on soft-float
systems

Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 .../recipes-support/boost/boost/consider-hardfp.patch | 19 +++++++++++++++++++
 meta/recipes-support/boost/boost_1.60.0.bb            |  1 +
 2 files changed, 20 insertions(+)
 create mode 100644 meta/recipes-support/boost/boost/consider-hardfp.patch

diff --git a/meta/recipes-support/boost/boost/consider-hardfp.patch b/meta/recipes-support/boost/boost/consider-hardfp.patch
new file mode 100644
index 0000000..66808a6
--- /dev/null
+++ b/meta/recipes-support/boost/boost/consider-hardfp.patch
@@ -0,0 +1,19 @@
+When using soft-float, on ARM we should not expect the FE_* symbols
+
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+Upstream-Status: Pending
+
+Index: boost_1_60_0/boost/test/execution_monitor.hpp
+===================================================================
+--- boost_1_60_0.orig/boost/test/execution_monitor.hpp
++++ boost_1_60_0/boost/test/execution_monitor.hpp
+@@ -484,7 +484,8 @@ enum masks {
+     BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
+ 
+     BOOST_FPE_ALL       = MCW_EM,
+-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG)
++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
++    || defined(__ARM_PCS)
+     BOOST_FPE_ALL       = 1,
+ #else
+     BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
diff --git a/meta/recipes-support/boost/boost_1.60.0.bb b/meta/recipes-support/boost/boost_1.60.0.bb
index e7b91dc..4d824c8 100644
--- a/meta/recipes-support/boost/boost_1.60.0.bb
+++ b/meta/recipes-support/boost/boost_1.60.0.bb
@@ -4,4 +4,5 @@ include boost.inc
 SRC_URI += "\
     file://arm-intrinsics.patch \
     file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \
+    file://consider-hardfp.patch \
 "
-- 
2.7.0




More information about the Openembedded-core mailing list