]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc: Fix nonportable shell syntax in "test" and "[" commands [PR105831]
authorMichael Bäuerle <micha@NetBSD.org>
Thu, 18 May 2023 09:15:49 +0000 (10:15 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 18 May 2023 11:49:33 +0000 (12:49 +0100)
POSIX sh does not support the == for string comparisons, use = instead.

gcc/ChangeLog:

PR bootstrap/105831
* config/nvptx/gen-opt.sh: Use = operator instead of ==.
* configure.ac: Likewise.
* configure: Regenerate.

gcc/config/nvptx/gen-opt.sh
gcc/configure
gcc/configure.ac

index dc10722b96f9d38abd4db8929058f84ddac214ba..cab73f5e66359561d64ab78c3a39947bf2b7a45f 100644 (file)
@@ -56,7 +56,7 @@ EnumValue
 Enum(ptx_isa) String(sm_$sm) Value(PTX_ISA_SM$sm)
 EOF
 
-    if [ "$sm" == "$last" ]; then
+    if [ "$sm" = "$last" ]; then
        # Don't end with trailing empty line.
        continue
     fi
index 191f68581b38ed4fa76d5bfe1fa0c9b646c1ec5b..5f67808b77441ba730183eef90367b70a51b08a0 100755 (executable)
@@ -6409,7 +6409,7 @@ _ACEOF
 if test "$enable_largefile" != no; then
   case "$host, $build" in
     *-*-aix*,*|*,*-*-aix*)
-      if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then
+      if test "$ac_cv_sizeof_ino_t" = "4" -a "$ac_cv_sizeof_dev_t" = 4; then
 
 $as_echo "#define HOST_STAT_FOR_64BIT_INODES stat64x" >>confdefs.h
 
index 075424669c9391888522340b89f17e6fb097e395..cc8dd9e20bf4e3994af99a74ec2a0fe61b0fb1ae 100644 (file)
@@ -473,7 +473,7 @@ AC_CHECK_SIZEOF(dev_t)
 if test "$enable_largefile" != no; then
   case "$host, $build" in
     *-*-aix*,*|*,*-*-aix*)
-      if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" == 4; then
+      if test "$ac_cv_sizeof_ino_t" = "4" -a "$ac_cv_sizeof_dev_t" = 4; then
        AC_DEFINE(HOST_STAT_FOR_64BIT_INODES, stat64x,
          [Define which stat syscall is able to handle 64bit indodes.])
       fi;;