* [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/
@ 2022-04-28 1:26 99% Sam James
0 siblings, 0 replies; 1+ results
From: Sam James @ 2022-04-28 1:26 UTC (permalink / raw
To: gentoo-commits
commit: 5ace694ca2a1bd0f49996845f9122569fd9b6c18
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 28 01:23:52 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 28 01:23:52 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ace694c
dev-cpp/tbb: add flag stripping patch
Otherwise breaks with e.g. -Werror=format-security in *FLAGS.
Bug: https://github.com/oneapi-src/oneTBB/pull/716
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../tbb/files/tbb-2021.5.0-flags-stripping.patch | 27 ++++++++++++++++++++++
dev-cpp/tbb/tbb-2021.5.0-r1.ebuild | 2 ++
2 files changed, 29 insertions(+)
diff --git a/dev-cpp/tbb/files/tbb-2021.5.0-flags-stripping.patch b/dev-cpp/tbb/files/tbb-2021.5.0-flags-stripping.patch
new file mode 100644
index 000000000000..4252ea446423
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2021.5.0-flags-stripping.patch
@@ -0,0 +1,27 @@
+https://github.com/oneapi-src/oneTBB/pull/716
+
+From 9595b9699ae6863d1e0cf770a89728eafcaf8845 Mon Sep 17 00:00:00 2001
+From: Christoph Erhardt <github@sicherha.de>
+Date: Wed, 5 Jan 2022 15:13:32 +0100
+Subject: [PATCH] Fix overeager stripping of compile flag
+
+The existing regex strips all occurrences of the given string from
+`${CMAKE_CXX_FLAGS}`, regardless of whether it is just a substring of a
+flag. For instance, `-Werror=format-security` gets truncated to
+`=format-security`.
+
+The new regex makes sure that only whole words get replaced.
+
+Signed-off-by: Christoph Erhardt <github@sicherha.de>
+--- a/cmake/utils.cmake
++++ b/cmake/utils.cmake
+@@ -18,7 +18,7 @@ macro(tbb_remove_compile_flag flag)
+ set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_OPTIONS ${_tbb_compile_options})
+ unset(_tbb_compile_options)
+ if (CMAKE_CXX_FLAGS)
+- string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
++ string(REGEX REPLACE "(^|[ \t\r\n]+)${flag}($|[ \t\r\n]+)" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+ endif()
+ endmacro()
+
+
diff --git a/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild b/dev-cpp/tbb/tbb-2021.5.0-r1.ebuild
index aa3f0e7c26e2..8c4c5a5883a4 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
+
+ "${FILESDIR}"/${PN}-2021.5.0-flags-stripping.patch
)
src_configure() {
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-04-28 1:26 99% [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/ Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox