https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100552

--- Comment #1 from Marius Hillenbrand <mhillen at linux dot ibm.com> ---
Indeed, that line should not use the bash-specific pattern substitution and
instead like this:


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([[


not fully tested yet, but it avoids the syntax error in dash and in NetBSD 9.1

Reply via email to