commit:     3e439610e839494912b61a69c1620f8552f57c6c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  9 05:45:42 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov  9 05:46:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e439610

dev-lang/ruby: only pass -fno-ipa-modref for GCC

Only GCC has the flag (Clang doesn't) but we only want to apply it
for GCC to begin with, even if for some reason Clang did have it.

Bug: https://bugs.gentoo.org/965095
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ruby/ruby-3.2.9-r1.ebuild  | 4 ++--
 dev-lang/ruby/ruby-3.3.10-r1.ebuild | 4 ++--
 dev-lang/ruby/ruby-3.4.7-r1.ebuild  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-lang/ruby/ruby-3.2.9-r1.ebuild 
b/dev-lang/ruby/ruby-3.2.9-r1.ebuild
index ff2d1813f81d..59616e51fd44 100644
--- a/dev-lang/ruby/ruby-3.2.9-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.2.9-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 RUST_OPTIONAL="yes"
 
-inherit autotools flag-o-matic multiprocessing rust
+inherit autotools flag-o-matic multiprocessing toolchain-funcs rust
 
 MY_P="${PN}-$(ver_cut 1-3)"
 
@@ -166,7 +166,7 @@ src_configure() {
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
        # Workaround for bug #965095 (gcc PR122610)
-       append-flags -fno-ipa-modref
+       tc-is-gcc && append-flags -fno-ipa-modref
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

diff --git a/dev-lang/ruby/ruby-3.3.10-r1.ebuild 
b/dev-lang/ruby/ruby-3.3.10-r1.ebuild
index 5fddb27da5f2..841f5541fd29 100644
--- a/dev-lang/ruby/ruby-3.3.10-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.3.10-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 RUST_OPTIONAL="yes"
 
-inherit autotools flag-o-matic multiprocessing rust
+inherit autotools flag-o-matic multiprocessing toolchain-funcs rust
 
 MY_P="${PN}-$(ver_cut 1-3)"
 
@@ -162,7 +162,7 @@ src_configure() {
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
        # Workaround for bug #965095 (gcc PR122610)
-       append-flags -fno-ipa-modref
+       tc-is-gcc && append-flags -fno-ipa-modref
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

diff --git a/dev-lang/ruby/ruby-3.4.7-r1.ebuild 
b/dev-lang/ruby/ruby-3.4.7-r1.ebuild
index c339549096a1..6205af5aa2ab 100644
--- a/dev-lang/ruby/ruby-3.4.7-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.4.7-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 RUST_OPTIONAL="yes"
 
-inherit autotools flag-o-matic multiprocessing rust
+inherit autotools flag-o-matic multiprocessing toolchain-funcs rust
 
 MY_P="${PN}-$(ver_cut 1-3)"
 
@@ -176,7 +176,7 @@ src_configure() {
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
        # Workaround for bug #965095 (gcc PR122610)
-       append-flags -fno-ipa-modref
+       tc-is-gcc && append-flags -fno-ipa-modref
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

Reply via email to