diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-08-20 14:38:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-08-20 14:38:48 +0100 |
commit | dd45cee79a4c905271356e96af531293b62c429b (patch) | |
tree | badf99f89a2e65ae16720e8c67fad03183873dd0 /sys-devel/mold/files | |
parent | 32fc5f4a2c2017f1f9c628fab9dcb5a54c3e6f03 (diff) |
gentoo auto-resync : 20:08:2022 - 14:38:48
Diffstat (limited to 'sys-devel/mold/files')
-rw-r--r-- | sys-devel/mold/files/mold-1.4.1-tbb-flags-stripping.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys-devel/mold/files/mold-1.4.1-tbb-flags-stripping.patch b/sys-devel/mold/files/mold-1.4.1-tbb-flags-stripping.patch new file mode 100644 index 000000000000..58cfca04132e --- /dev/null +++ b/sys-devel/mold/files/mold-1.4.1-tbb-flags-stripping.patch @@ -0,0 +1,28 @@ +https://github.com/oneapi-src/oneTBB/pull/716 +https://bugs.gentoo.org/865837 + +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/third-party/tbb/cmake/utils.cmake ++++ b/third-party/tbb/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() + + |