[packages/tbb] upstream fix for incorrect build flag for !x86 targets

atler atler at pld-linux.org
Sun Jul 6 13:34:59 CEST 2025


commit 46bf3d3e3e11032e8235238f9b7051abb889103f
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Jul 6 13:33:39 2025 +0200

    upstream fix for incorrect build flag for !x86 targets

 non-x86-build.patch | 22 ++++++++++++++++++++++
 tbb.spec            |  2 ++
 2 files changed, 24 insertions(+)
---
diff --git a/tbb.spec b/tbb.spec
index 8e9f1f4..72bf1e5 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -25,6 +25,7 @@ Source3:	http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20So
 # Source3-md5:	1481cbd378f4964691046d0ba570b374
 Source4:	http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf
 # Source4-md5:	5bbdd1050c5dac5c1b782a6a98db0c46
+Patch0:		non-x86-build.patch
 URL:		http://www.threadingbuildingblocks.org/
 BuildRequires:	cmake >= 3.5
 BuildRequires:	hwloc-devel
@@ -99,6 +100,7 @@ Building Blocks (TBB).
 
 %prep
 %setup -q -n oneTBB-%{version}
+%patch -P0 -p1
 
 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
 
diff --git a/non-x86-build.patch b/non-x86-build.patch
new file mode 100644
index 0000000..3e42c0c
--- /dev/null
+++ b/non-x86-build.patch
@@ -0,0 +1,22 @@
+From 1036d1fd16ddd0bed0a9093f8ecf8f494e2c0f3e Mon Sep 17 00:00:00 2001
+From: Leon Marz <main at lmarz.org>
+Date: Tue, 1 Jul 2025 19:45:31 +0200
+Subject: [PATCH] Only enable fcf-protection on x86 based processors
+
+---
+ cmake/compilers/GNU.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
+index 4f55209142..d9eb1c4576 100644
+--- a/cmake/compilers/GNU.cmake
++++ b/cmake/compilers/GNU.cmake
+@@ -107,7 +107,7 @@ endif ()
+ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv)
+ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security
+     -fstack-protector-strong )
+-if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" AND NOT EMSCRIPTEN)
++if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
+     set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fcf-protection=full>)
+ endif ()
+ set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tbb.git/commitdiff/46bf3d3e3e11032e8235238f9b7051abb889103f



More information about the pld-cvs-commit mailing list