diff mbox series

[oe,meta-oe,1/3] stressapptest: Fix build with libc++

Message ID 20190617052440.18958-1-raj.khem@gmail.com
State Accepted
Commit 36fcb1a8d1fcabcfd8bbd6772c6f2837799b8ec3
Headers show
Series [oe,meta-oe,1/3] stressapptest: Fix build with libc++ | expand

Commit Message

Khem Raj June 17, 2019, 5:24 a.m. UTC
when using libc++ instead of libstdc++, __gnu_cxx namespace
is not available

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 .../stressapptest/libcplusplus-compat.patch   | 28 +++++++++++++++++++
 .../stressapptest/stressapptest_1.0.9.bb      |  4 ++-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-benchmark/stressapptest/stressapptest/libcplusplus-compat.patch

-- 
2.22.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-benchmark/stressapptest/stressapptest/libcplusplus-compat.patch b/meta-oe/recipes-benchmark/stressapptest/stressapptest/libcplusplus-compat.patch
new file mode 100644
index 0000000000..f5e7da359d
--- /dev/null
+++ b/meta-oe/recipes-benchmark/stressapptest/stressapptest/libcplusplus-compat.patch
@@ -0,0 +1,28 @@ 
+Fix compile on sytems using libc++ instead of libstdc++
+
+libc++ does not really implement __gnu_cxx namespace and it
+compiles fine without this namespace, therefore detect libc++
+and if it is used them exclude this namespace 
+
+See https://github.com/stressapptest/stressapptest/issues/47
+
+Fixes
+
+./sattypes.h:33:17: error: expected namespace name
+using namespace __gnu_cxx; //NOLINT
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- stressapptest-1.0.9.orig/src/sattypes.h
++++ stressapptest-1.0.9/src/sattypes.h
+@@ -30,7 +30,9 @@
+ #include "stressapptest_config_android.h"  // NOLINT
+ #else
+ #include "stressapptest_config.h"  // NOLINT
++#ifndef _LIBCPP_VERSION
+ using namespace __gnu_cxx;  //NOLINT
++#endif  // _LIBCPP_VERSION
+ #endif  // __ANDROID__
+ using namespace std;
+
diff --git a/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb b/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
index 3e5748a3a1..679201c528 100644
--- a/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
+++ b/meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb
@@ -9,7 +9,9 @@  SECTION = "benchmark"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ea9d559f985fb4834317d8ed6b9e58"
 
-SRC_URI = "https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz"
+SRC_URI = "https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz \
+           file://libcplusplus-compat.patch \
+          "
 
 SRC_URI[md5sum] = "d3a526c174c049dd7a1068dc74a62be2"
 SRC_URI[sha256sum] = "2ba470587ad4f6ae92057d427c3a2a2756e5f10bd25cd91e62eaef55a40b30a1"