diff mbox series

IBM Z: Avoid bash-specific substitution in configure

Message ID 20210512151247.2383-1-mhillen@linux.ibm.com
State New
Headers show
Series IBM Z: Avoid bash-specific substitution in configure | expand

Commit Message

Marius Hillenbrand May 12, 2021, 3:12 p.m. UTC
Tested configure runs on NetBSD x86-64, Linux on x86-64 (with target s390x), and
on s390x.

Is the patch ok for master, and for gcc-11?

----8<------8<------8<-----

Fix a bootstrap error observed on NetBSD.

2021-05-12  Marius Hillenbrand  <mhillen@linux.ibm.com>

gcc/ChangeLog:

	PR bootstrap/100552
	* configure.ac: Replace pattern substitution with call to sed.
	* configure: Regenerate (tbd at time of commit).
---
 gcc/configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jeff Law May 13, 2021, 6:58 p.m. UTC | #1
On 5/12/2021 9:12 AM, Marius Hillenbrand via Gcc-patches wrote:
> Tested configure runs on NetBSD x86-64, Linux on x86-64 (with target s390x), and
> on s390x.
>
> Is the patch ok for master, and for gcc-11?
>
> ----8<------8<------8<-----
>
> Fix a bootstrap error observed on NetBSD.
>
> 2021-05-12  Marius Hillenbrand  <mhillen@linux.ibm.com>
>
> gcc/ChangeLog:
>
> 	PR bootstrap/100552
> 	* configure.ac: Replace pattern substitution with call to sed.
> 	* configure: Regenerate (tbd at time of commit).

OK

Jeff
diff mbox series

Patch

diff --git a/gcc/configure.ac b/gcc/configure.ac
index e9ba2af548a..4e788019d99 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -7499,7 +7499,8 @@  case $target in
       # cross build. are target headers available?
       # carefully coerce the build-system compiler to use target headers
       saved_CXXFLAGS="$CXXFLAGS"
-      CROSS_TEST_CXXFLAGS="-nostdinc ${XGCC_FLAGS_FOR_TARGET//-B/-idirafter/}"
+      fixed_XGCC_FLAGS_FOR_TARGET=`echo "$XGCC_FLAGS_FOR_TARGET" | sed 's/-B/-idirafter/g'`
+      CROSS_TEST_CXXFLAGS="-nostdinc $fixed_XGCC_FLAGS_FOR_TARGET"
       CXXFLAGS="$CROSS_TEST_CXXFLAGS"
       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include <math.h>