public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/
Date: Thu, 28 Apr 2022 01:26:44 +0000 (UTC)	[thread overview]
Message-ID: <1651109032.5ace694ca2a1bd0f49996845f9122569fd9b6c18.sam@gentoo> (raw)

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() {


             reply	other threads:[~2022-04-28  1:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  1:26 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-14 22:39 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/, dev-cpp/tbb/files/ James Le Cuirot
2023-04-28  0:47 Sam James
2022-11-19  3:19 Sam James
2022-02-07  4:01 Sam James
2022-01-20 12:36 Sam James
2022-01-16  6:45 Sam James
2020-03-18 17:04 Guilherme Amadio
2017-02-01 21:38 Matthias Maier
2015-09-20 10:15 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1651109032.5ace694ca2a1bd0f49996845f9122569fd9b6c18.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox