Revert "intel-tbb: Update to 2021.5.0"
This reverts commit 942c0b893d.
We already have package for this called "tbb". If it is needed then users should
be ported to it instead.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
_realname=intel-tbb
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=2021.5.0
|
||||
pkgver=2020.3
|
||||
pkgrel=1
|
||||
epoch=1
|
||||
pkgdesc='High level abstract threading library (mingw-w64)'
|
||||
@@ -16,42 +16,76 @@ arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
url='https://www.threadingbuildingblocks.org/'
|
||||
license=('Apache')
|
||||
source=(${_realname}-${pkgver}.tar.gz::https://github.com/intel/tbb/archive/refs/tags/v${pkgver}.tar.gz
|
||||
source=(${_realname}-${pkgver}.tar.gz::https://github.com/intel/tbb/archive/v${pkgver}.tar.gz
|
||||
"tbb-cmake-config.patch"
|
||||
"mingw-strict-ansi-back.patch")
|
||||
sha256sums=('e5b57537c741400cf6134b428fc1689a649d7d38d9bb9c1b6d64f092ea28178a'
|
||||
'6530687a7f2f27f79fd519c11e57844f23c07a9cb11dddcf48897491bcecc98f'
|
||||
'48321d6276e6e3bc81e2d4c5b5d6a27b2389dadef3b4c50de9582ab5d2029133')
|
||||
"tbb-dont-set-crt-version-for-ucrt.patch"
|
||||
"tbb-clang.patch")
|
||||
sha256sums=('ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3'
|
||||
'f5aa6bb43a69a46a0cec4d2b3e84e7e6e102b3becd1b58d496e8ee035829dc85'
|
||||
'a24719087f206fccccb032e26e3c684d2281da6bfe24e7cd69681493c800ad3a'
|
||||
'329c17c66fa11422b4402017943a8ca83c208c003fc5a769904b4149152300ab')
|
||||
|
||||
prepare () {
|
||||
cd ${srcdir}/oneTBB-${pkgver}
|
||||
patch -p1 -i ${srcdir}/tbb-cmake-config.patch
|
||||
patch -p1 -i ${srcdir}/mingw-strict-ansi-back.patch
|
||||
patch -p1 -i ${srcdir}/tbb-dont-set-crt-version-for-ucrt.patch
|
||||
|
||||
if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
|
||||
patch -p1 -i ${srcdir}/tbb-clang.patch
|
||||
fi
|
||||
}
|
||||
|
||||
build() {
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
cd ${srcdir}/oneTBB-${pkgver}
|
||||
|
||||
sed -i "s|OUTPUT_KEY = -o #|OUTPUT_KEY = -Wl,--out-implib,lib\$(BUILDING_LIBRARY).a -o #|g" build/windows.gcc.inc
|
||||
echo "CPLUS_FLAGS += -mrtm" >> build/windows.gcc.inc # makes test cases pass
|
||||
|
||||
if test "${MINGW_CHOST}" = "x86_64-w64-mingw32"
|
||||
then
|
||||
parch=intel64
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
parch=ia32
|
||||
fi
|
||||
|
||||
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
|
||||
mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
|
||||
|
||||
unset LDFLAGS
|
||||
mingw32-make arch=${parch} tbb_os=windows runtime=mingw compiler=gcc stdver=c++11
|
||||
|
||||
mkdir build-cmake && cd build-cmake
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
-G"MSYS Makefiles" \
|
||||
${extra_config} \
|
||||
-DTBB_TEST=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
../oneTBB-${pkgver}
|
||||
-DINSTALL_DIR=${srcdir}/oneTBB-${pkgver}/build-cmake \
|
||||
-DSYSTEM_NAME=Windows \
|
||||
-DTBB_VERSION_FILE=${srcdir}/oneTBB-${pkgver}/include/tbb/tbb_stddef.h \
|
||||
-DINC_REL_PATH=../../../include \
|
||||
-DLIB_REL_PATH=../../../lib \
|
||||
-DBIN_REL_PATH=../../../bin \
|
||||
-P ${srcdir}/oneTBB-${pkgver}/cmake/tbb_config_installer.cmake
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/build-${MINGW_CHOST}
|
||||
make DESTDIR=${pkgdir} install
|
||||
cd ${srcdir}/oneTBB-${pkgver}
|
||||
|
||||
if test "${MINGW_CHOST}" = "x86_64-w64-mingw32"
|
||||
then
|
||||
parch=intel64
|
||||
else
|
||||
parch=ia32
|
||||
fi
|
||||
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/include
|
||||
cp -a include/tbb "${pkgdir}${MINGW_PREFIX}"/include
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/bin
|
||||
#install -m755 build/windows_${parch}_gcc_mingw_debug/*.dll "${pkgdir}${MINGW_PREFIX}"/bin
|
||||
install -m755 build/windows_${parch}_gcc_mingw_release/*.dll "${pkgdir}${MINGW_PREFIX}"/bin
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/lib
|
||||
#install -m755 build/windows_${parch}_gcc_mingw_debug/*.a "${pkgdir}${MINGW_PREFIX}"/lib
|
||||
install -m755 build/windows_${parch}_gcc_mingw_release/*.a "${pkgdir}${MINGW_PREFIX}"/lib
|
||||
|
||||
install -Dm644 ${srcdir}/oneTBB-${pkgver}/LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
|
||||
# Install cmake files
|
||||
install -d "${pkgdir}${MINGW_PREFIX}"/lib/cmake/tbb
|
||||
install -m644 build-cmake/TBBConfig.cmake "${pkgdir}${MINGW_PREFIX}"/lib/cmake/tbb/
|
||||
install -m644 build-cmake/TBBConfigVersion.cmake "${pkgdir}${MINGW_PREFIX}"/lib/cmake/tbb/
|
||||
}
|
||||
|
||||
27
mingw-w64-intel-tbb/tbb-clang.patch
Normal file
27
mingw-w64-intel-tbb/tbb-clang.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/build/windows.gcc.inc b/build/windows.gcc.inc
|
||||
index eef1c1b8..ed82791e 100644
|
||||
--- a/build/windows.gcc.inc
|
||||
+++ b/build/windows.gcc.inc
|
||||
@@ -59,7 +59,7 @@ TEST_WARNING_KEY = -Wextra -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtu
|
||||
WARNING_SUPPRESS = -Wno-parentheses -Wno-uninitialized -Wno-non-virtual-dtor
|
||||
DYLIB_KEY = -shared
|
||||
LIBDL =
|
||||
-EXPORT_KEY = -Wl,--version-script,
|
||||
+EXPORT_KEY = -Wl,--output-def=
|
||||
LIBS = -lpsapi
|
||||
BIGOBJ_KEY = -Wa,-mbig-obj
|
||||
|
||||
@@ -77,13 +77,6 @@ ifeq (ok,$(call detect_js,/minversion gcc 4.8))
|
||||
RTM_KEY = -mrtm
|
||||
endif
|
||||
|
||||
-# gcc 6.0 and later have -flifetime-dse option that controls
|
||||
-# elimination of stores done outside the object lifetime
|
||||
-ifeq (ok,$(call detect_js,/minversion gcc 6.0))
|
||||
- # keep pre-contruction stores for zero initialization
|
||||
- DSE_KEY = -flifetime-dse=1
|
||||
-endif
|
||||
-
|
||||
ifeq ($(cfg), release)
|
||||
CPLUS_FLAGS = -g -O2
|
||||
endif
|
||||
@@ -1,25 +1,35 @@
|
||||
--- oneTBB-2021.5.0/cmake/config_generation.cmake.orig 2022-05-13 15:38:42.367469900 +0300
|
||||
+++ oneTBB-2021.5.0/cmake/config_generation.cmake 2022-05-13 15:40:14.968844600 +0300
|
||||
@@ -89,9 +89,9 @@
|
||||
--- oneTBB-2020.2/cmake/TBBInstallConfig.cmake.orig 2020-05-06 13:57:21.567903800 +0300
|
||||
+++ oneTBB-2020.2/cmake/TBBInstallConfig.cmake 2020-05-06 14:00:04.566313500 +0300
|
||||
@@ -111,9 +111,9 @@
|
||||
# Expand TBB_LIB_REL_PATH here in IMPORTED_IMPLIB property and
|
||||
# redefine it with TBB_DLL_REL_PATH value to properly fill IMPORTED_LOCATION property in TBBConfig.cmake.in template.
|
||||
# redefine it with TBB_BIN_REL_PATH value to properly fill IMPORTED_LOCATION property in TBBConfig.cmake.in template.
|
||||
set(TBB_IMPLIB_RELEASE "
|
||||
- IMPORTED_IMPLIB_RELEASE \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}.lib\"")
|
||||
+ IMPORTED_IMPLIB_RELEASE \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}.dll.a\"")
|
||||
- IMPORTED_IMPLIB_RELEASE \"\${CMAKE_CURRENT_LIST_DIR}/${TBB_LIB_REL_PATH}/\${_tbb_component}.lib\"")
|
||||
+ IMPORTED_IMPLIB_RELEASE \"\${CMAKE_CURRENT_LIST_DIR}/${TBB_LIB_REL_PATH}/lib\${_tbb_component}.dll.a\"")
|
||||
set(TBB_IMPLIB_DEBUG "
|
||||
- IMPORTED_IMPLIB_DEBUG \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}_debug.lib\"")
|
||||
+ IMPORTED_IMPLIB_DEBUG \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}d.dll.a\"")
|
||||
set(TBB_LIB_REL_PATH ${TBB_DLL_REL_PATH})
|
||||
- IMPORTED_IMPLIB_DEBUG \"\${CMAKE_CURRENT_LIST_DIR}/${TBB_LIB_REL_PATH}/\${_tbb_component}_debug.lib\"")
|
||||
+ IMPORTED_IMPLIB_DEBUG \"\${CMAKE_CURRENT_LIST_DIR}/${TBB_LIB_REL_PATH}/lib\${_tbb_component}_debug.dll.a\"")
|
||||
set(TBB_LIB_REL_PATH ${TBB_BIN_REL_PATH})
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported OS name: ${tbb_system_name}")
|
||||
--- oneTBB-2020.2/cmake/TBBMakeConfig.cmake.orig 2020-05-06 13:59:23.701848600 +0300
|
||||
+++ oneTBB-2020.2/cmake/TBBMakeConfig.cmake 2020-05-06 14:01:43.382845200 +0300
|
||||
@@ -91,15 +91,15 @@
|
||||
|
||||
if (tbb_gen_cfg_HANDLE_SUBDIRS)
|
||||
--- oneTBB-2021.5.0/src/tbb/CMakeLists.txt.orig 2022-05-13 16:00:17.804666400 +0300
|
||||
+++ oneTBB-2021.5.0/src/tbb/CMakeLists.txt 2022-05-13 16:00:59.259080300 +0300
|
||||
@@ -123,7 +123,7 @@
|
||||
if (tbb_MK_CONFIG_FOR_SOURCE)
|
||||
set(TBB_IMPLIB_RELEASE "
|
||||
- IMPORTED_IMPLIB_RELEASE \"${tbb_MK_TBB_RELEASE_DIR}/\${_tbb_component}.lib\"")
|
||||
+ IMPORTED_IMPLIB_RELEASE \"${tbb_MK_TBB_RELEASE_DIR}/lib\${_tbb_component}.dll.a\"")
|
||||
set(TBB_IMPLIB_DEBUG "
|
||||
- IMPORTED_IMPLIB_DEBUG \"${tbb_MK_TBB_DEBUG_DIR}/\${_tbb_component}_debug.lib\"")
|
||||
+ IMPORTED_IMPLIB_DEBUG \"${tbb_MK_TBB_DEBUG_DIR}/lib\${_tbb_component}_debug.dll.a\"")
|
||||
else()
|
||||
set(TBB_IMPLIB_RELEASE "
|
||||
- IMPORTED_IMPLIB_RELEASE \"\${_tbb_root}/lib/\${_tbb_arch_subdir}/\${_tbb_compiler_subdir}/\${_tbb_component}.lib\"")
|
||||
+ IMPORTED_IMPLIB_RELEASE \"\${_tbb_root}/lib/\${_tbb_arch_subdir}/\${_tbb_compiler_subdir}/lib\${_tbb_component}.dll.a\"")
|
||||
set(TBB_IMPLIB_DEBUG "
|
||||
- IMPORTED_IMPLIB_DEBUG \"\${_tbb_root}/lib/\${_tbb_arch_subdir}/\${_tbb_compiler_subdir}/\${_tbb_component}_debug.lib\"")
|
||||
+ IMPORTED_IMPLIB_DEBUG \"\${_tbb_root}/lib/\${_tbb_arch_subdir}/\${_tbb_compiler_subdir}/lib\${_tbb_component}_debug.dll.a\"")
|
||||
endif()
|
||||
|
||||
tbb_install_target(tbb)
|
||||
|
||||
-if (WIN32)
|
||||
+if (MSVC)
|
||||
# Create a copy of target linker file (tbb<ver>[_debug].lib) with legacy name (tbb[_debug].lib)
|
||||
# to support previous user experience for linkage.
|
||||
install(FILES
|
||||
# Note: multiline variable
|
||||
|
||||
13
mingw-w64-intel-tbb/tbb-dont-set-crt-version-for-ucrt.patch
Normal file
13
mingw-w64-intel-tbb/tbb-dont-set-crt-version-for-ucrt.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/build/windows.gcc.inc b/build/windows.gcc.inc
|
||||
index eef1c1b8..cbf4d581 100644
|
||||
--- a/build/windows.gcc.inc
|
||||
+++ b/build/windows.gcc.inc
|
||||
@@ -95,7 +95,7 @@ CPLUS_FLAGS += -DUSE_WINTHREAD
|
||||
CPLUS_FLAGS += -D_WIN32_WINNT=$(_WIN32_WINNT)
|
||||
|
||||
# MinGW specific
|
||||
-CPLUS_FLAGS += -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads
|
||||
+CPLUS_FLAGS += -DMINGW_HAS_SECURE_API=1 -msse -mthreads
|
||||
|
||||
CONLY = gcc
|
||||
debugger = gdb
|
||||
Reference in New Issue
Block a user