[Bug other/62168] error in configure: line 21572: test: =: unary operator expected

manfred99 at gmx dot ch gcc-bugzilla@gcc.gnu.org
Mon Aug 18 19:50:00 GMT 2014


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

--- Comment #4 from Manfred Schwarb <manfred99 at gmx dot ch> ---
This does not catch all cases. There is also
 yes)
   if test x${default_ld} != x; then
     install_gold_as_default=yes
   fi
   ;;

which needs an "else" case, as far as I can see.
"default_ld" is empty for the normal cases, unless you set --enable-ld=no.

Or you fix the if statement some few lines below:

--- configure.ac.orig   2014-07-31 02:30:13.804162521 +0200
+++ configure.ac2014-08-18 21:47:10.722061603 +0200
@@ -2117,7 +2117,7 @@
 AS_VAR_SET_IF(gcc_cv_ld,, [
 if test -x "$DEFAULT_LINKER"; then
        gcc_cv_ld="$DEFAULT_LINKER"
-elif test $install_gold_as_default = yes \
+elif test x$install_gold_as_default = xyes \
      && test -f $gcc_cv_ld_gold_srcdir/configure.ac \
      && test -f ../gold/Makefile \
      && test x$build = x$host; then



More information about the Gcc-bugs mailing list