https://gcc.gnu.org/g:c6a9ab8c920f297c4efd289182aef9fbc73f5906

commit r15-1436-gc6a9ab8c920f297c4efd289182aef9fbc73f5906
Author: Collin Funk <collin.fu...@gmail.com>
Date:   Thu Jun 13 17:53:55 2024 -0700

    build: Fix missing variable quotes
    
    When dlopen and pthread_create are in libc the variable is
    set to "none required", therefore running configure will show
    the following errors:
    
    ./configure: line 8997: test: too many arguments
    ./configure: line 8999: test: too many arguments
    ./configure: line 9003: test: too many arguments
    ./configure: line 9005: test: =: unary operator expected
    
    gcc/configure also has a similar problem on
    gcc_cv_as_mips_explicit_relocs:
    
    ./gcc/configure: line 30242: test: =: unary operator expected
    
    ChangeLog:
    
            * configure.ac: Quote variable result of AC_SEARCH_LIBS.
            * configure: Regenerate.
    
    gcc/ChangeLog:
    
            * configure.ac: Add missing quotation of variable
            gcc_cv_as_mips_explicit_relocs.
            * configure: Regenerate.
    
    Signed-off-by: Collin Funk <collin.fu...@gmail.com>

Diff:
---
 configure        | 10 +++++-----
 configure.ac     |  8 ++++----
 gcc/configure    |  2 +-
 gcc/configure.ac |  2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/configure b/configure
index 51576a41f303..6e95b27d9df4 100755
--- a/configure
+++ b/configure
@@ -8994,15 +8994,15 @@ if test "$ac_res" != no; then :
 fi
 
 
-if test $ac_cv_search_dlopen = -ldl; then
+if test "$ac_cv_search_dlopen" = -ldl; then
     CRAB1_LIBS="$CRAB1_LIBS -ldl"
-elif test $ac_cv_search_dlopen = no; then
+elif test "$ac_cv_search_dlopen" = no; then
     missing_rust_dynlibs="libdl"
 fi
 
-if test $ac_cv_search_pthread_create = -lpthread; then
+if test "$ac_cv_search_pthread_create" = -lpthread; then
     CRAB1_LIBS="$CRAB1_LIBS -lpthread"
-elif test $ac_cv_search_pthread_crate = no; then
+elif test "$ac_cv_search_pthread_crate" = no; then
     missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
 fi
 
@@ -19746,7 +19746,7 @@ config.status
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C)  Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
diff --git a/configure.ac b/configure.ac
index 5eda8dcdbf72..88576b31bfcd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2045,15 +2045,15 @@ missing_rust_dynlibs=none
 AC_SEARCH_LIBS([dlopen], [dl])
 AC_SEARCH_LIBS([pthread_create], [pthread])
 
-if test $ac_cv_search_dlopen = -ldl; then
+if test "$ac_cv_search_dlopen" = -ldl; then
     CRAB1_LIBS="$CRAB1_LIBS -ldl"
-elif test $ac_cv_search_dlopen = no; then
+elif test "$ac_cv_search_dlopen" = no; then
     missing_rust_dynlibs="libdl"
 fi
 
-if test $ac_cv_search_pthread_create = -lpthread; then
+if test "$ac_cv_search_pthread_create" = -lpthread; then
     CRAB1_LIBS="$CRAB1_LIBS -lpthread"
-elif test $ac_cv_search_pthread_crate = no; then
+elif test "$ac_cv_search_pthread_crate" = no; then
     missing_rust_dynlibs="$missing_rust_dynlibs, libpthread"
 fi
 
diff --git a/gcc/configure b/gcc/configure
index 9dc0b65dfaac..b536af664d3d 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -30239,7 +30239,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$gcc_cv_as_mips_explicit_relocs_pcrel" >&5
 $as_echo "$gcc_cv_as_mips_explicit_relocs_pcrel" >&6; }
-if test $gcc_cv_as_mips_explicit_relocs_pcrel = yes; then
+if test "x$gcc_cv_as_mips_explicit_relocs_pcrel" = "xyes"; then
 
 $as_echo "#define MIPS_EXPLICIT_RELOCS MIPS_EXPLICIT_RELOCS_PCREL" >>confdefs.h
 
diff --git a/gcc/configure.ac b/gcc/configure.ac
index b2243e9954aa..1501bf89c89d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5317,7 +5317,7 @@ x:
 
     AC_MSG_CHECKING(assembler and linker for explicit JALR relocation)
     gcc_cv_as_ld_jalr_reloc=no
-    if test $gcc_cv_as_mips_explicit_relocs = yes; then
+    if test "x$gcc_cv_as_mips_explicit_relocs" = "xyes"; then
       if test $in_tree_ld = yes ; then
         if test "$gcc_cv_gld_major_version" -eq 2 -a 
"$gcc_cv_gld_minor_version" -ge 20 -o "$gcc_cv_gld_major_version" -gt 2 \
            && test $in_tree_ld_is_elf = yes; then

Reply via email to