diff mbox series

[oe,meta-oe,3/3] tbb: Update to 2017 Update 6

Message ID 20170606145026.4204-3-raj.khem@gmail.com
State Accepted
Commit 637470014f5a5e7c7ba48db9f738516268ed5566
Headers show
Series None | expand

Commit Message

Khem Raj June 6, 2017, 2:50 p.m. UTC
Fix build with musl and security flags turned on

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

---
 meta-oe/recipes-support/tbb/tbb.bb                 | 19 +++++++----
 ...mallinfo-is-glibc-specific-API-mark-it-so.patch | 37 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 7 deletions(-)
 create mode 100644 meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch

-- 
2.13.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-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb.bb
index d8eb1c2f3..bad9481f7 100644
--- a/meta-oe/recipes-support/tbb/tbb.bb
+++ b/meta-oe/recipes-support/tbb/tbb.bb
@@ -6,18 +6,21 @@  DESCRIPTION = "Parallelism library for C++ - runtime files \
 HOMEPAGE = "http://threadingbuildingblocks.org/"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
-PRDATE = "20170118"
-PV = "${PRDATE}"
-SRC_URI = "https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb2017_${PRDATE}oss_src.tgz \
+PRDATE = "20170412"
+BRANCH = "tbb_2017"
+SRCREV = "a2cfdfe946933cbe38bffe1d8086ae36f06691a3"
+PV = "${PRDATE}+${SRCPV}"
+SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \
            file://cross-compile.patch \
-           file://tbb.pc"
-SRC_URI[md5sum] = "26baa6fbcc8f03ee45c0641b91d9588a"
-SRC_URI[sha256sum] = "48bb526287fa8b4e7d1e1b2ba9e5fb9c3e372b497772c06ef9ccd7f93f344e74"
+           file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
+           file://tbb.pc \
+"
 
-S = "${WORKDIR}/tbb2017_${PRDATE}oss/"
+S = "${WORKDIR}/git"
 
 COMPILER ?= "gcc"
 COMPILER_toolchain-clang = "clang"
+
 do_compile() {
     oe_runmake compiler=${COMPILER} arch=${HOST_ARCH} runtime=cc4
 }
@@ -37,3 +40,5 @@  do_install() {
 # ...
 # | make[1]: *** [concurrent_queue.o] Error 1
 ARM_INSTRUCTION_SET = "arm"
+SECURITY_CFLAGS_append = " -fPIC"
+
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch b/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch
new file mode 100644
index 000000000..7e66945fa
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0001-mallinfo-is-glibc-specific-API-mark-it-so.patch
@@ -0,0 +1,37 @@ 
+From 6b2b136caa68912d77ffe26143cd3da768b9ef80 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 3 Jun 2017 08:39:37 -0700
+Subject: [PATCH] mallinfo() is glibc specific API mark it so
+
+Helps compiling with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/tbbmalloc/proxy.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp
+index 5ef279d..06c4872 100644
+--- a/src/tbbmalloc/proxy.cpp
++++ b/src/tbbmalloc/proxy.cpp
+@@ -185,6 +185,7 @@ int mallopt(int /*param*/, int /*value*/) __THROW
+     return 1;
+ }
+ 
++#ifdef __GLIBC__
+ struct mallinfo mallinfo() __THROW
+ {
+     struct mallinfo m;
+@@ -192,6 +193,7 @@ struct mallinfo mallinfo() __THROW
+ 
+     return m;
+ }
++#endif
+ 
+ #if __ANDROID__
+ // Android doesn't have malloc_usable_size, provide it to be compatible
+-- 
+2.13.0
+