commit:     b924d8cf6f591487d1a5b1577d73c17971f6aabd
Author:     Sungjoon Moon <sumoon <AT> seoulsaram <DOT> org>
AuthorDate: Sat May 24 09:23:12 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue May 27 09:18:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b924d8cf

app-shells/bash: pass -std=gnu17 to CFLAGS_FOR_BUILD

Essential for cross compile even for >=bash-5.3

Closes: https://bugs.gentoo.org/956318
Signed-off-by: Sungjoon Moon <sumoon <AT> seoulsaram.org>
Part-of: https://github.com/gentoo/gentoo/pull/42240
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 app-shells/bash/bash-2.05b_p13.ebuild            | 6 +++++-
 app-shells/bash/bash-3.0_p22.ebuild              | 6 +++++-
 app-shells/bash/bash-3.1_p23.ebuild              | 6 +++++-
 app-shells/bash/bash-3.2_p57.ebuild              | 6 +++++-
 app-shells/bash/bash-4.0_p44.ebuild              | 6 +++++-
 app-shells/bash/bash-4.1_p17.ebuild              | 6 +++++-
 app-shells/bash/bash-4.2_p53.ebuild              | 6 +++++-
 app-shells/bash/bash-4.3_p48-r2.ebuild           | 6 +++++-
 app-shells/bash/bash-4.4_p23-r2.ebuild           | 6 +++++-
 app-shells/bash/bash-5.0_p18-r3.ebuild           | 4 ++++
 app-shells/bash/bash-5.1_p16-r14.ebuild          | 4 ++++
 app-shells/bash/bash-5.2_p37-r3.ebuild           | 4 ++++
 app-shells/bash/bash-5.2_p37.ebuild              | 4 ++++
 app-shells/bash/bash-5.3_rc1.ebuild              | 4 ++++
 app-shells/bash/bash-5.3_rc1_p20250430-r1.ebuild | 4 ++++
 app-shells/bash/bash-5.3_rc1_p20250504-r1.ebuild | 4 ++++
 app-shells/bash/bash-5.3_rc1_p20250519.ebuild    | 4 ++++
 app-shells/bash/bash-9999.ebuild                 | 4 ++++
 18 files changed, 81 insertions(+), 9 deletions(-)

diff --git a/app-shells/bash/bash-2.05b_p13.ebuild 
b/app-shells/bash/bash-2.05b_p13.ebuild
index 6836c71ee4d0..0a7f888d82f6 100644
--- a/app-shells/bash/bash-2.05b_p13.ebuild
+++ b/app-shells/bash/bash-2.05b_p13.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -105,6 +105,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-3.0_p22.ebuild 
b/app-shells/bash/bash-3.0_p22.ebuild
index 6ea72c071984..7ab38a60533b 100644
--- a/app-shells/bash/bash-3.0_p22.ebuild
+++ b/app-shells/bash/bash-3.0_p22.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -110,6 +110,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-3.1_p23.ebuild 
b/app-shells/bash/bash-3.1_p23.ebuild
index 66fae17e010a..720379daf4ca 100644
--- a/app-shells/bash/bash-3.1_p23.ebuild
+++ b/app-shells/bash/bash-3.1_p23.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -105,6 +105,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-3.2_p57.ebuild 
b/app-shells/bash/bash-3.2_p57.ebuild
index 790bcdb42b27..a037c31cc5bf 100644
--- a/app-shells/bash/bash-3.2_p57.ebuild
+++ b/app-shells/bash/bash-3.2_p57.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -107,6 +107,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-4.0_p44.ebuild 
b/app-shells/bash/bash-4.0_p44.ebuild
index 83095fd10267..7b24d2dbfe79 100644
--- a/app-shells/bash/bash-4.0_p44.ebuild
+++ b/app-shells/bash/bash-4.0_p44.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -101,6 +101,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-4.1_p17.ebuild 
b/app-shells/bash/bash-4.1_p17.ebuild
index 056fcbfee8cb..75fc323afa2d 100644
--- a/app-shells/bash/bash-4.1_p17.ebuild
+++ b/app-shells/bash/bash-4.1_p17.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -96,6 +96,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-4.2_p53.ebuild 
b/app-shells/bash/bash-4.2_p53.ebuild
index 9189dd542110..a565b78649fa 100644
--- a/app-shells/bash/bash-4.2_p53.ebuild
+++ b/app-shells/bash/bash-4.2_p53.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -108,6 +108,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --with-installed-readline=.
 

diff --git a/app-shells/bash/bash-4.3_p48-r2.ebuild 
b/app-shells/bash/bash-4.3_p48-r2.ebuild
index d1bd7188d32a..cb9ed635ae01 100644
--- a/app-shells/bash/bash-4.3_p48-r2.ebuild
+++ b/app-shells/bash/bash-4.3_p48-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -117,6 +117,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --docdir='$(datarootdir)'/doc/${PF}
                --htmldir='$(docdir)/html'

diff --git a/app-shells/bash/bash-4.4_p23-r2.ebuild 
b/app-shells/bash/bash-4.4_p23-r2.ebuild
index a00a3d5f57b9..0611f83b57a0 100644
--- a/app-shells/bash/bash-4.4_p23-r2.ebuild
+++ b/app-shells/bash/bash-4.4_p23-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -128,6 +128,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.0_p18-r3.ebuild 
b/app-shells/bash/bash-5.0_p18-r3.ebuild
index 2fa356b7fac0..591365b1eb41 100644
--- a/app-shells/bash/bash-5.0_p18-r3.ebuild
+++ b/app-shells/bash/bash-5.0_p18-r3.ebuild
@@ -132,6 +132,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu89)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        local myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.1_p16-r14.ebuild 
b/app-shells/bash/bash-5.1_p16-r14.ebuild
index 0a1dbe4b63a9..aeb350668eca 100644
--- a/app-shells/bash/bash-5.1_p16-r14.ebuild
+++ b/app-shells/bash/bash-5.1_p16-r14.ebuild
@@ -177,6 +177,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.2_p37-r3.ebuild 
b/app-shells/bash/bash-5.2_p37-r3.ebuild
index 2e063be865c1..cf762c50b566 100644
--- a/app-shells/bash/bash-5.2_p37-r3.ebuild
+++ b/app-shells/bash/bash-5.2_p37-r3.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.2_p37.ebuild 
b/app-shells/bash/bash-5.2_p37.ebuild
index 4bb6c49f60b0..80d3c5dc0708 100644
--- a/app-shells/bash/bash-5.2_p37.ebuild
+++ b/app-shells/bash/bash-5.2_p37.ebuild
@@ -178,6 +178,10 @@ src_configure() {
        # incompatible with C23.
        append-cflags $(test-flags-CC -std=gnu17)
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.3_rc1.ebuild 
b/app-shells/bash/bash-5.3_rc1.ebuild
index 87d04b1c1f27..03ff453715b7 100644
--- a/app-shells/bash/bash-5.3_rc1.ebuild
+++ b/app-shells/bash/bash-5.3_rc1.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # may misbehave at runtime.
        unset -v YACC
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.3_rc1_p20250430-r1.ebuild 
b/app-shells/bash/bash-5.3_rc1_p20250430-r1.ebuild
index 02e45fa7d9b3..3c991f38eba4 100644
--- a/app-shells/bash/bash-5.3_rc1_p20250430-r1.ebuild
+++ b/app-shells/bash/bash-5.3_rc1_p20250430-r1.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # may misbehave at runtime.
        unset -v YACC
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.3_rc1_p20250504-r1.ebuild 
b/app-shells/bash/bash-5.3_rc1_p20250504-r1.ebuild
index 04dd9c2d72ba..de539bc422a0 100644
--- a/app-shells/bash/bash-5.3_rc1_p20250504-r1.ebuild
+++ b/app-shells/bash/bash-5.3_rc1_p20250504-r1.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # may misbehave at runtime.
        unset -v YACC
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-5.3_rc1_p20250519.ebuild 
b/app-shells/bash/bash-5.3_rc1_p20250519.ebuild
index 59a7f339f108..3e090ec7abfc 100644
--- a/app-shells/bash/bash-5.3_rc1_p20250519.ebuild
+++ b/app-shells/bash/bash-5.3_rc1_p20250519.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # may misbehave at runtime.
        unset -v YACC
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

diff --git a/app-shells/bash/bash-9999.ebuild b/app-shells/bash/bash-9999.ebuild
index 04dd9c2d72ba..de539bc422a0 100644
--- a/app-shells/bash/bash-9999.ebuild
+++ b/app-shells/bash/bash-9999.ebuild
@@ -180,6 +180,10 @@ src_configure() {
        # may misbehave at runtime.
        unset -v YACC
 
+       if tc-is-cross-compiler; then
+               export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
+       fi
+
        myconf=(
                --disable-profiling
 

Reply via email to