diff options
Diffstat (limited to 'dev-cpp/tbb')
-rw-r--r-- | dev-cpp/tbb/files/tbb-2021.5.0-x86-mwaitpkg.patch | 43 | ||||
-rw-r--r-- | dev-cpp/tbb/tbb-2021.5.0-r1.ebuild | 2 |
2 files changed, 45 insertions, 0 deletions
diff --git a/dev-cpp/tbb/files/tbb-2021.5.0-x86-mwaitpkg.patch b/dev-cpp/tbb/files/tbb-2021.5.0-x86-mwaitpkg.patch new file mode 100644 index 000000000000..83f119a9acd3 --- /dev/null +++ b/dev-cpp/tbb/files/tbb-2021.5.0-x86-mwaitpkg.patch @@ -0,0 +1,43 @@ +https://github.com/oneapi-src/oneTBB/pull/609 +https://github.com/oneapi-src/oneTBB/issues/370 +https://bugs.gentoo.org/842762 + +From 542a27fa1cfafaf76772e793549d9f4d288d03a9 Mon Sep 17 00:00:00 2001 +From: Ilya Isaev <ilya.isaev@intel.com> +Date: Fri, 8 Oct 2021 10:18:16 +0300 +Subject: [PATCH] Detect 32 bit x86 systems while adding -mwaitpkg option + +Signed-off-by: Ilya Isaev <ilya.isaev@intel.com> +--- a/cmake/compilers/Clang.cmake ++++ b/cmake/compilers/Clang.cmake +@@ -44,7 +44,7 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag) + endif() + + # Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors +-if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") ++if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>) + endif() + +--- a/cmake/compilers/GNU.cmake ++++ b/cmake/compilers/GNU.cmake +@@ -36,7 +36,7 @@ if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER) + endif() + + # Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors +-if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") ++if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>) + endif() + +--- a/cmake/compilers/MSVC.cmake ++++ b/cmake/compilers/MSVC.cmake +@@ -72,7 +72,7 @@ if (TBB_WINDOWS_DRIVER) + endif() + + if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|IntelLLVM)") +- if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") ++ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") + set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg) + endif() + set(TBB_OPENMP_NO_LINK_FLAG TRUE) diff --git a/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild b/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild index 8c4c5a5883a4..4235949bb77b 100644 --- a/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild +++ b/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild @@ -32,6 +32,8 @@ PATCHES=( "${FILESDIR}"/${PN}-2021.5.0-musl-mallinfo.patch # musl again, should be in.. 2022? "${FILESDIR}"/${PN}-2021.5.0-musl-setcontext.patch + # should be in.. 2022? + "${FILESDIR}"/${PN}-2021.5.0-x86-mwaitpkg.patch "${FILESDIR}"/${PN}-2021.5.0-flags-stripping.patch ) |