]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
IBM Z: Avoid bash-specific substitution in configure
authorMarius Hillenbrand <mhillen@linux.ibm.com>
Wed, 12 May 2021 11:59:19 +0000 (13:59 +0200)
committerMarius Hillenbrand <mhillen@linux.ibm.com>
Mon, 17 May 2021 14:06:02 +0000 (16:06 +0200)
Fix a bootstrap error observed on NetBSD.

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

gcc/ChangeLog:

PR bootstrap/100552
* configure.ac: Replace pattern substitution with call to sed.
* configure: Regenerate.

(cherry picked from commit 47abe2abf1210847629ebc271b1fc8c6d53f0d47)

gcc/configure
gcc/configure.ac

index e8ecb3b0297bec33cdca816af1c46a3afcfcc9c0..ced77073037a40ddf881c0937bcedbb52406ee95 100755 (executable)
@@ -32111,7 +32111,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"
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
index 96a6f62b0d37fae8faeff8172835c81a234789fb..3d31bbdecad34217ae324c848c692bd954b45552 100644 (file)
@@ -7481,7 +7481,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>