commit:     8cd3b643c72e58b9889ad28f5dac94b5468d58b6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 16 14:59:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 16 15:02:01 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cd3b643

dev-lang/ruby: fix passing -std=gnu17

We have to do it in CFLAGS, not C{,XX}FLAGS, otherwise Clang complains. Also,
pass it consistently for now.

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

 dev-lang/ruby/ruby-3.2.6-r4.ebuild | 7 +++----
 dev-lang/ruby/ruby-3.2.7.ebuild    | 7 +++----
 dev-lang/ruby/ruby-3.2.8.ebuild    | 7 +++----
 dev-lang/ruby/ruby-3.3.7-r1.ebuild | 3 +++
 dev-lang/ruby/ruby-3.3.8.ebuild    | 9 ++-------
 dev-lang/ruby/ruby-3.4.2.ebuild    | 3 +++
 dev-lang/ruby/ruby-3.4.3.ebuild    | 3 +--
 dev-lang/ruby/ruby-3.4.4.ebuild    | 9 ++-------
 8 files changed, 20 insertions(+), 28 deletions(-)

diff --git a/dev-lang/ruby/ruby-3.2.6-r4.ebuild 
b/dev-lang/ruby/ruby-3.2.6-r4.ebuild
index 6344b359b053..6d1a46a3cc03 100644
--- a/dev-lang/ruby/ruby-3.2.6-r4.ebuild
+++ b/dev-lang/ruby/ruby-3.2.6-r4.ebuild
@@ -156,6 +156,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
+       # Avoid a compile error with certain USE flag combinations when
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
@@ -168,10 +171,6 @@ src_configure() {
                # set and socks library is present, so need to unset
                # SOCKS_SERVER in that case.
                unset SOCKS_SERVER
-
-               # The socks code has a function prototype without parameters,
-               # bug #945502
-               append-cflags -std=gnu17
        fi
 
        # Increase GC_MALLOC_LIMIT if set (default is 8000000)

diff --git a/dev-lang/ruby/ruby-3.2.7.ebuild b/dev-lang/ruby/ruby-3.2.7.ebuild
index bd3db2dd42a1..6a1e06d695ae 100644
--- a/dev-lang/ruby/ruby-3.2.7.ebuild
+++ b/dev-lang/ruby/ruby-3.2.7.ebuild
@@ -157,6 +157,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
+       # Avoid a compile error with certain USE flag combinations when
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
@@ -169,10 +172,6 @@ src_configure() {
                # set and socks library is present, so need to unset
                # SOCKS_SERVER in that case.
                unset SOCKS_SERVER
-
-               # The socks code has a function prototype without parameters,
-               # bug #945502
-               append-cflags -std=gnu17
        fi
 
        # Increase GC_MALLOC_LIMIT if set (default is 8000000)

diff --git a/dev-lang/ruby/ruby-3.2.8.ebuild b/dev-lang/ruby/ruby-3.2.8.ebuild
index ed72e0287128..c43cff6afaed 100644
--- a/dev-lang/ruby/ruby-3.2.8.ebuild
+++ b/dev-lang/ruby/ruby-3.2.8.ebuild
@@ -164,6 +164,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
+       # Avoid a compile error with certain USE flag combinations when
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
@@ -176,10 +179,6 @@ src_configure() {
                # set and socks library is present, so need to unset
                # SOCKS_SERVER in that case.
                unset SOCKS_SERVER
-
-               # The socks code has a function prototype without parameters,
-               # bug #945502
-               append-cflags -std=gnu17
        fi
 
        # Increase GC_MALLOC_LIMIT if set (default is 8000000)

diff --git a/dev-lang/ruby/ruby-3.3.7-r1.ebuild 
b/dev-lang/ruby/ruby-3.3.7-r1.ebuild
index aec2261c4e01..8d16f8ae3a77 100644
--- a/dev-lang/ruby/ruby-3.3.7-r1.ebuild
+++ b/dev-lang/ruby/ruby-3.3.7-r1.ebuild
@@ -161,6 +161,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
+       # Avoid a compile error with certain USE flag combinations when
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

diff --git a/dev-lang/ruby/ruby-3.3.8.ebuild b/dev-lang/ruby/ruby-3.3.8.ebuild
index af015edc0da1..c36e2653f224 100644
--- a/dev-lang/ruby/ruby-3.3.8.ebuild
+++ b/dev-lang/ruby/ruby-3.3.8.ebuild
@@ -161,10 +161,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
-
        # Avoid a compile error with certain USE flag combinations when
-       # using std=gnu23, bug #945643.
-       append-flags -std=gnu17
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
@@ -177,10 +176,6 @@ src_configure() {
                # set and socks library is present, so need to unset
                # SOCKS_SERVER in that case.
                unset SOCKS_SERVER
-
-               # The socks code has a function prototype without parameters,
-               # bug #945502
-               append-cflags -std=gnu17
        fi
 
        # Increase GC_MALLOC_LIMIT if set (default is 8000000)

diff --git a/dev-lang/ruby/ruby-3.4.2.ebuild b/dev-lang/ruby/ruby-3.4.2.ebuild
index b08126005b70..d3a0f364d955 100644
--- a/dev-lang/ruby/ruby-3.4.2.ebuild
+++ b/dev-lang/ruby/ruby-3.4.2.ebuild
@@ -175,6 +175,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
+       # Avoid a compile error with certain USE flag combinations when
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

diff --git a/dev-lang/ruby/ruby-3.4.3.ebuild b/dev-lang/ruby/ruby-3.4.3.ebuild
index 5099c6df0e76..0fe3e43317a5 100644
--- a/dev-lang/ruby/ruby-3.4.3.ebuild
+++ b/dev-lang/ruby/ruby-3.4.3.ebuild
@@ -175,10 +175,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
-
        # Avoid a compile error with certain USE flag combinations when
        # using std=gnu23, bug #945643.
-       append-flags -std=gnu17
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then

diff --git a/dev-lang/ruby/ruby-3.4.4.ebuild b/dev-lang/ruby/ruby-3.4.4.ebuild
index 0d77e99bcf48..d3a0f364d955 100644
--- a/dev-lang/ruby/ruby-3.4.4.ebuild
+++ b/dev-lang/ruby/ruby-3.4.4.ebuild
@@ -175,10 +175,9 @@ src_configure() {
        # In many places aliasing rules are broken; play it safe
        # as it's risky with newer compilers to leave it as it is.
        append-flags -fno-strict-aliasing
-
        # Avoid a compile error with certain USE flag combinations when
-       # using std=gnu23, bug #945643.
-       append-flags -std=gnu17
+       # using std=gnu23, bug #945643 and bug #945502
+       append-cflags -std=gnu17
 
        # Workaround for bug #938302
        if use systemtap && has_version 
"dev-debug/systemtap[-dtrace-symlink(+)]" ; then
@@ -191,10 +190,6 @@ src_configure() {
                # set and socks library is present, so need to unset
                # SOCKS_SERVER in that case.
                unset SOCKS_SERVER
-
-               # The socks code has a function prototype without parameters,
-               # bug #945502
-               append-cflags -std=gnu17
        fi
 
        # Increase GC_MALLOC_LIMIT if set (default is 8000000)

Reply via email to