diff options
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/tbb/tbb.bb | 1 | ||||
-rw-r--r-- | meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch | 57 |
2 files changed, 58 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb.bb b/meta-oe/recipes-support/tbb/tbb.bb index bad9481f7..f87010401 100644 --- a/meta-oe/recipes-support/tbb/tbb.bb +++ b/meta-oe/recipes-support/tbb/tbb.bb | |||
@@ -13,6 +13,7 @@ PV = "${PRDATE}+${SRCPV}" | |||
13 | SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \ | 13 | SRC_URI = "git://github.com/01org/tbb;branch=${BRANCH} \ |
14 | file://cross-compile.patch \ | 14 | file://cross-compile.patch \ |
15 | file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \ | 15 | file://0001-mallinfo-is-glibc-specific-API-mark-it-so.patch \ |
16 | file://0002-linux-Fix-gcc-version-check.patch \ | ||
16 | file://tbb.pc \ | 17 | file://tbb.pc \ |
17 | " | 18 | " |
18 | 19 | ||
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 new file mode 100644 index 000000000..9824b61e9 --- /dev/null +++ b/meta-oe/recipes-support/tbb/tbb/0002-linux-Fix-gcc-version-check.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From aee098f1bf0511c6b5544de3170a9e8b51673b60 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pierre Le Magourou <plemagourou@softbankrobotics.com> | ||
3 | Date: Tue, 23 Jan 2018 15:25:50 +0100 | ||
4 | Subject: [PATCH] linux.gcc: Fix cross compilation error. | ||
5 | |||
6 | When cross compiling on linux with gcc, the host gcc was used instead of | ||
7 | the cross gcc to set compilation flags according to gcc version. | ||
8 | |||
9 | When the cross gcc was in version 5.X and the host gcc in version 7.X, | ||
10 | tbb was compiled with the -flifetime-dse=1 flag that does not exist on | ||
11 | gcc 5.X. | ||
12 | --- | ||
13 | build/linux.gcc.inc | 10 +++++----- | ||
14 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc | ||
17 | index 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 | -- | ||
56 | 2.15.1 | ||
57 | |||