瀏覽代碼

fix some packages (#1064)

* try fix tbb

* revert libomp
Hoildkv 3 年之前
父節點
當前提交
1f5d13e72f
共有 3 個文件被更改,包括 42 次插入3 次删除
  1. 0 1
      packages/l/libomp/xmake.lua
  2. 39 0
      packages/t/tbb/patches/2021.5.0/i386.patch
  3. 3 2
      packages/t/tbb/xmake.lua

+ 0 - 1
packages/l/libomp/xmake.lua

@@ -7,7 +7,6 @@ package("libomp")
     add_versions("10.0.1", "d19f728c8e04fb1e94566c8d76aef50ec926cd2f95ef3bf1e0a5de4909b28b44")
     add_versions("11.1.0", "d187483b75b39acb3ff8ea1b7d98524d95322e3cb148842957e9b0fbb866052e")
     add_versions("12.0.1", "60fe79440eaa9ebf583a6ea7f81501310388c02754dbe7dc210776014d06b091")
-    add_versions("13.0.1", "6b79261371616c31fea18cd3ee1797c79ee38bcaf8417676d4fa366a24c96b4f")
 
     add_deps("cmake")
 

+ 39 - 0
packages/t/tbb/patches/2021.5.0/i386.patch

@@ -0,0 +1,39 @@
+diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
+index bb7401e34..d551d3be2 100644
+--- 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()
+ 
+diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
+index 86958e3a8..fee1c3bc2 100644
+--- 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()
+ 
+diff --git a/cmake/compilers/MSVC.cmake b/cmake/compilers/MSVC.cmake
+index acf0952cf..2d2c29a6f 100644
+--- 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)

+ 3 - 2
packages/t/tbb/xmake.lua

@@ -25,6 +25,7 @@ package("tbb")
         add_versions("2021.5.0", "e5b57537c741400cf6134b428fc1689a649d7d38d9bb9c1b6d64f092ea28178a")
 
         add_patches("2021.2.0", path.join(os.scriptdir(), "patches", "2021.2.0", "gcc11.patch"), "181511cf4878460cb48ac0531d3ce8d1c57626d698e9001a0951c728fab176fb")
+        add_patches("2021.5.0", path.join(os.scriptdir(), "patches", "2021.5.0", "i386.patch"), "1a1c11724839cf98b1b8f4d415c0283ec7719c330b11503c578739eb02889ec0")
 
         if is_plat("macosx") then
             add_configs("compiler", {description = "Compiler used to compile tbb." , default = "clang", type = "string", values = {"clang", "gcc", "icc", "cl", "icl", "[others]"}})
@@ -50,7 +51,7 @@ package("tbb")
             if package:version():le("2021.4") and package:is_plat("mingw") then
                 raise("mingw build is not supported in this version")
             end
-            local configs = {"-DTBB_TEST=OFF"}
+            local configs = {"-DTBB_TEST=OFF", "-DTBB_STRICT=OFF"}
             table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
             import("package.tools.cmake").install(package, configs)
         else
@@ -76,7 +77,7 @@ package("tbb")
 
     on_install("windows", function (package)
         if package:version():ge("2021.0") then
-            local configs = {"-DTBB_TEST=OFF"}
+            local configs = {"-DTBB_TEST=OFF", "-DTBB_STRICT=OFF"}
             table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
             import("package.tools.cmake").install(package, configs)
         else