summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/tbb
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-04-10 08:19:49 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-09 17:45:01 -0700
commit681555bf55ae02c6efaf4fd3e65c53dda1095131 (patch)
treeaea78554afa60b0db9844b1a3caf4c66478af4e9 /meta-oe/recipes-support/tbb
parent061cb505ee357c9319c1a85098ce8aab1cf99e81 (diff)
downloadmeta-openembedded-681555bf55ae02c6efaf4fd3e65c53dda1095131.tar.gz
tbb: upgrade 2017 -> 2020.2
* Remove patches that are not needed anymore and fix the recipe to point to new source location. * Remove the compilation tweaks that don't seem to be required anymore. * Include a patch to fix builds on musl. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/tbb')
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch57
-rw-r--r--meta-oe/recipes-support/tbb/tbb/GLIBC-PREREQ-is-not-defined-on-musl.patch42
-rw-r--r--meta-oe/recipes-support/tbb/tbb/cross-compile.patch62
-rw-r--r--meta-oe/recipes-support/tbb/tbb/tbb.pc4
-rw-r--r--meta-oe/recipes-support/tbb/tbb_2020.2.bb (renamed from meta-oe/recipes-support/tbb/tbb.bb)17
5 files changed, 80 insertions, 102 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
deleted file mode 100644
index 9824b61e9..000000000
--- a/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From aee098f1bf0511c6b5544de3170a9e8b51673b60 Mon Sep 17 00:00:00 2001
2From: Pierre Le Magourou <plemagourou@softbankrobotics.com>
3Date: Tue, 23 Jan 2018 15:25:50 +0100
4Subject: [PATCH] linux.gcc: Fix cross compilation error.
5
6When cross compiling on linux with gcc, the host gcc was used instead of
7the cross gcc to set compilation flags according to gcc version.
8
9When the cross gcc was in version 5.X and the host gcc in version 7.X,
10tbb was compiled with the -flifetime-dse=1 flag that does not exist on
11gcc 5.X.
12---
13 build/linux.gcc.inc | 10 +++++-----
14 1 file changed, 5 insertions(+), 5 deletions(-)
15
16diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
17index 5c1889c..a4d6698 100644
18--- a/build/linux.gcc.inc
19+++ b/build/linux.gcc.inc
20@@ -41,29 +41,29 @@ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
21 C_FLAGS = $(CPLUS_FLAGS)
22
23 # gcc 4.2 and higher support OpenMP
24-ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
25+ifneq (,$(shell $(CC) -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
26 OPENMP_FLAG = -fopenmp
27 endif
28
29 # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them
30-ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[8-9]|[5-9])"))
31+ifneq (,$(shell $(CC) -dumpversion | egrep "^(4\.[8-9]|[5-9])"))
32 RTM_KEY = -mrtm
33 endif
34
35 # gcc 4.0 and later have -Wextra that is used by some our customers.
36-ifneq (,$(shell gcc -dumpversion | egrep "^([4-9])"))
37+ifneq (,$(shell $(CC) -dumpversion | egrep "^([4-9])"))
38 TEST_WARNING_KEY += -Wextra
39 endif
40
41 # gcc 5.0 and later have -Wsuggest-override option
42 # enable it via a pre-included header in order to limit to C++11 and above
43-ifneq (,$(shell gcc -dumpversion | egrep "^([5-9])"))
44+ifneq (,$(shell $(CC) -dumpversion | egrep "^([5-9])"))
45 INCLUDE_TEST_HEADERS = -include $(tbb_root)/src/test/harness_preload.h
46 endif
47
48 # gcc 6.0 and later have -flifetime-dse option that controls
49 # elimination of stores done outside the object lifetime
50-ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
51+ifneq (,$(shell $(CC) -dumpversion | egrep "^([6-9])"))
52 # keep pre-contruction stores for zero initialization
53 DSE_KEY = -flifetime-dse=1
54 endif
55--
562.15.1
57
diff --git a/meta-oe/recipes-support/tbb/tbb/GLIBC-PREREQ-is-not-defined-on-musl.patch b/meta-oe/recipes-support/tbb/tbb/GLIBC-PREREQ-is-not-defined-on-musl.patch
new file mode 100644
index 000000000..6f28f6f3a
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/GLIBC-PREREQ-is-not-defined-on-musl.patch
@@ -0,0 +1,42 @@
1From 27956d4c5fb615098231cebfb8eef11057639d3c Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sun, 8 Dec 2019 18:14:38 +0100
4Subject: [PATCH] src/tbbmalloc/proxy.cpp: __GLIBC_PREREQ is not defined on
5 musl
6
7Do not call __GLIBC_PREREQ if it is not defined otherwise build will
8fail on musl
9
10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
11
12Upstream-Status: Submitted [https://github.com/oneapi-src/oneTBB/pull/203]
13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 src/tbbmalloc/proxy.cpp | 6 ++++--
17 1 file changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/src/tbbmalloc/proxy.cpp b/src/tbbmalloc/proxy.cpp
20index d96ae7a0..709ae839 100644
21--- a/src/tbbmalloc/proxy.cpp
22+++ b/src/tbbmalloc/proxy.cpp
23@@ -24,7 +24,8 @@
24 // of aligned_alloc as required by new C++ standard, this makes it hard to
25 // redefine aligned_alloc here. However, running on systems with new libc
26 // version, it still needs it to be redefined, thus tricking system headers
27-#if defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
28+#if defined(__GLIBC_PREREQ)
29+#if !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
30 // tell <cstdlib> that there is no aligned_alloc
31 #undef _GLIBCXX_HAVE_ALIGNED_ALLOC
32 // trick <stdlib.h> to define another symbol instead
33@@ -32,7 +33,8 @@
34 // Fix the state and undefine the trick
35 #include <cstdlib>
36 #undef aligned_alloc
37-#endif // defined(__GLIBC_PREREQ)&&!__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
38+#endif // defined(__GLIBC_PREREQ)
39+#endif // !__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
40 #endif // __linux__ && !__ANDROID__
41
42 #include "proxy.h"
diff --git a/meta-oe/recipes-support/tbb/tbb/cross-compile.patch b/meta-oe/recipes-support/tbb/tbb/cross-compile.patch
index d54b307ee..36578543f 100644
--- a/meta-oe/recipes-support/tbb/tbb/cross-compile.patch
+++ b/meta-oe/recipes-support/tbb/tbb/cross-compile.patch
@@ -1,39 +1,35 @@
1Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> 1Author: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
2 2
3Upstream-Status: unsuitable 3Upstream-Status: unsuitable
4--- 4---
5 build/linux.gcc.inc | 5 +++--
6 1 file changed, 3 insertions(+), 2 deletions(-)
7 5
8Index: tbb2017_20170118oss/build/linux.gcc.inc 6diff --git a/build/linux.clang.inc b/build/linux.clang.inc
9=================================================================== 7index fe9b5c98..b0dcd68b 100644
10--- tbb2017_20170118oss.orig/build/linux.gcc.inc 8--- a/build/linux.clang.inc
11+++ tbb2017_20170118oss/build/linux.gcc.inc 9+++ b/build/linux.clang.inc
12@@ -32,8 +32,9 @@ DYLIB_KEY = -shared 10@@ -12,8 +12,8 @@
13 EXPORT_KEY = -Wl,--version-script, 11 # See the License for the specific language governing permissions and
14 LIBDL = -ldl 12 # limitations under the License.
15 13
16-CPLUS = g++ 14-CPLUS ?= clang++
17-CONLY = gcc 15-CONLY ?= clang
18+CPLUS = $(CXX) 16+CPLUS ?= $(CXX)
19+CONLY = $(CC) 17+CONLY ?= $(CC)
20+CPLUS_FLAGS = $(CXXFLAGS) 18 COMPILE_ONLY = -c -MMD
21 LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY) 19 PREPROC_ONLY = -E -x c++
22 LIBS += -lpthread -lrt 20 INCLUDE_KEY = -I
23 LINK_FLAGS = -Wl,-rpath-link=. -rdynamic 21diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
24Index: tbb2017_20170118oss/build/linux.clang.inc 22index d820c15d..62c76afd 100644
25=================================================================== 23--- a/build/linux.gcc.inc
26--- tbb2017_20170118oss.orig/build/linux.clang.inc 24+++ b/build/linux.gcc.inc
27+++ tbb2017_20170118oss/build/linux.clang.inc 25@@ -12,8 +12,8 @@
28@@ -31,8 +31,9 @@ DYLIB_KEY = -shared 26 # See the License for the specific language governing permissions and
29 EXPORT_KEY = -Wl,--version-script, 27 # limitations under the License.
30 LIBDL = -ldl
31 28
32-CPLUS = clang++ 29-CPLUS ?= g++
33-CONLY = clang 30-CONLY ?= gcc
34+CPLUS = $(CXX) 31+CPLUS ?= $(CXX)
35+CONLY = $(CC) 32+CONLY ?= $(CC)
36+CPLUS_FLAGS = $(CXXFLAGS) 33 COMPILE_ONLY = -c -MMD
37 LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY) 34 PREPROC_ONLY = -E -x c++
38 LIBS += -lpthread -lrt 35 INCLUDE_KEY = -I
39 LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
diff --git a/meta-oe/recipes-support/tbb/tbb/tbb.pc b/meta-oe/recipes-support/tbb/tbb/tbb.pc
index 644b64fbf..4f9da1140 100644
--- a/meta-oe/recipes-support/tbb/tbb/tbb.pc
+++ b/meta-oe/recipes-support/tbb/tbb/tbb.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include
5 5
6Name: Threading Building Blocks 6Name: Threading Building Blocks
7Description: Intel's parallelism library for C++ 7Description: Intel's parallelism library for C++
8URL: http://www.threadingbuildingblocks.org/ 8URL: https://software.intel.com/en-us/tbb
9Version: 3.0+r018 9Version: 2020.2
10Libs: -L${libdir} -ltbb 10Libs: -L${libdir} -ltbb
11Cflags: -I${includedir} 11Cflags: -I${includedir}
diff --git a/meta-oe/recipes-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb_2020.2.bb
index 911139b0d..2f9fd7f58 100644
--- a/meta-oe/recipes-support/tbb/tbb.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2020.2.bb
@@ -3,27 +3,26 @@ DESCRIPTION = "Parallelism library for C++ - runtime files \
3 performance without having to be a threading expert. It represents a \ 3 performance without having to be a threading expert. It represents a \
4 higher-level, task-based parallelism that abstracts platform details \ 4 higher-level, task-based parallelism that abstracts platform details \
5 and threading mechanism for performance and scalability." 5 and threading mechanism for performance and scalability."
6HOMEPAGE = "http://threadingbuildingblocks.org/" 6HOMEPAGE = "https://software.intel.com/en-us/tbb"
7LICENSE = "Apache-2.0" 7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" 8LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
9PRDATE = "20170412" 9BRANCH = "tbb_2020"
10BRANCH = "tbb_2017" 10SRCREV = "60b7d0a78f8910976678ba63a19fdaee22c0ef65"
11SRCREV = "a2cfdfe946933cbe38bffe1d8086ae36f06691a3" 11SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \
12PV = "${PRDATE}+${SRCPV}"
13SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \
14 file://cross-compile.patch \ 12 file://cross-compile.patch \
15 file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \ 13 file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \
16 file://0002-linux-Fix-gcc-version-check.patch \ 14 file://GLIBC-PREREQ-is-not-defined-on-musl.patch \
17 file://tbb.pc \ 15 file://tbb.pc \
18" 16"
19 17
20S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
19PE = "1"
21 20
22COMPILER ?= "gcc" 21COMPILER ?= "gcc"
23COMPILER_toolchain-clang = "clang" 22COMPILER_toolchain-clang = "clang"
24 23
25do_compile() { 24do_compile() {
26 oe_runmake compiler=${COMPILER} arch=${HOST_ARCH} runtime=cc4 25 oe_runmake compiler=${COMPILER} arch=${HOST_ARCH}
27} 26}
28 27
29do_install() { 28do_install() {
@@ -44,5 +43,3 @@ do_install() {
44# ... 43# ...
45# | make[1]: *** [concurrent_queue.o] Error 1 44# | make[1]: *** [concurrent_queue.o] Error 1
46ARM_INSTRUCTION_SET = "arm" 45ARM_INSTRUCTION_SET = "arm"
47SECURITY_CFLAGS_append = " -fPIC"
48