summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-26 17:44:55 +0100
committerSam James <sam@gentoo.org>2023-10-26 17:47:26 +0100
commit2176c84971534872e4208debeb0e5944c139256a (patch)
treeb20e3df1e91ad639306c0b9a4af13c4a730f9ab6 /dev-util/valgrind
parentdev-util/valgrind: add 3.22.0_rc2 (diff)
downloadgentoo-2176c84971534872e4208debeb0e5944c139256a.tar.gz
gentoo-2176c84971534872e4208debeb0e5944c139256a.tar.bz2
gentoo-2176c84971534872e4208debeb0e5944c139256a.zip
dev-util/valgrind: improve -fno-control-flow-hardening filtering
Pass -fno-* if supported. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/valgrind-3.22.0_rc1.ebuild5
-rw-r--r--dev-util/valgrind/valgrind-3.22.0_rc2.ebuild1
-rw-r--r--dev-util/valgrind/valgrind-9999.ebuild1
3 files changed, 5 insertions, 2 deletions
diff --git a/dev-util/valgrind/valgrind-3.22.0_rc1.ebuild b/dev-util/valgrind/valgrind-3.22.0_rc1.ebuild
index 26eb51e592fd..88c666067ac9 100644
--- a/dev-util/valgrind/valgrind-3.22.0_rc1.ebuild
+++ b/dev-util/valgrind/valgrind-3.22.0_rc1.ebuild
@@ -85,7 +85,7 @@ src_configure() {
# Note: -fstack-protector-explicit is a no-op for Valgrind, no need to strip it
# -fstack-protector-strong See -fstack-protector (bug #620402)
# -m64 -mx32 for multilib-portage, bug #398825
- # -ggdb3 segmentation fault on startup
+ # -fharden-control-flow-redundancy: breaks runtime ('jump to the invalid address stated on the next line')
# -flto* fails to build, bug #858509
filter-flags -fomit-frame-pointer
filter-flags -fstack-protector
@@ -93,7 +93,8 @@ src_configure() {
filter-flags -fstack-protector-strong
filter-flags -m64 -mx32
filter-flags -fsanitize -fsanitize=*
- replace-flags -ggdb3 -ggdb2
+ filter-flags -fharden-control-flow-redundancy
+ append-cflags $(test-flags-CC -fno-harden-control-flow-redundancy)
filter-lto
if use amd64 || use ppc64; then
diff --git a/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild b/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild
index 7f177d462ac7..88c666067ac9 100644
--- a/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild
+++ b/dev-util/valgrind/valgrind-3.22.0_rc2.ebuild
@@ -94,6 +94,7 @@ src_configure() {
filter-flags -m64 -mx32
filter-flags -fsanitize -fsanitize=*
filter-flags -fharden-control-flow-redundancy
+ append-cflags $(test-flags-CC -fno-harden-control-flow-redundancy)
filter-lto
if use amd64 || use ppc64; then
diff --git a/dev-util/valgrind/valgrind-9999.ebuild b/dev-util/valgrind/valgrind-9999.ebuild
index 7f177d462ac7..88c666067ac9 100644
--- a/dev-util/valgrind/valgrind-9999.ebuild
+++ b/dev-util/valgrind/valgrind-9999.ebuild
@@ -94,6 +94,7 @@ src_configure() {
filter-flags -m64 -mx32
filter-flags -fsanitize -fsanitize=*
filter-flags -fharden-control-flow-redundancy
+ append-cflags $(test-flags-CC -fno-harden-control-flow-redundancy)
filter-lto
if use amd64 || use ppc64; then