This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR other/62168: error in configure: line 21572: test: =: unary operator expected


On Mon, Aug 18, 2014 at 08:51:35AM -0700, H.J. Lu wrote:
> When --enable-gold=no is used to configure gcc, we will see
> 
> configure: line 21572: test: =: unary operator expected
> 
> I checked in this patch to set install_gold_as_default to no for
> --enable-gold=no.  Tested on Linux/x86-64.
> 
> 

The previous patch doesn't handle --enable-gold=yes when gold isn't
the default.  I am checking in this patch to set install_gold_as_default
to no first.  It will be set to yes only for --enable-gold=default or
--enable-gold=yes --enable-ld=no.

H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 214167)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2014-08-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+	PR other/62168
+	* configure.ac: Set install_gold_as_default to no first.
+	 * configure: Regenerated.
+
 2014-08-19  David Malcolm  <dmalcolm@redhat.com>
 
 	* sel-sched-ir.h (BB_NOTE_LIST): struct sel_region_bb_info_def's
Index: configure
===================================================================
--- configure	(revision 214167)
+++ configure	(working copy)
@@ -21528,6 +21528,7 @@ if test "${enable_ld+set}" = set; then :
 fi
 
 
+install_gold_as_default=no
 # Check whether --enable-gold was given.
 if test "${enable_gold+set}" = set; then :
   enableval=$enable_gold; case "${enableval}" in
@@ -21540,14 +21541,11 @@ if test "${enable_gold+set}" = set; then
    fi
    ;;
  no)
-   install_gold_as_default=no
    ;;
  *)
    as_fn_error "invalid --enable-gold argument" "$LINENO" 5
    ;;
  esac
-else
-  install_gold_as_default=no
 fi
 
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 214167)
+++ configure.ac	(working copy)
@@ -2082,6 +2082,7 @@ AC_ARG_ENABLE(ld,
    ;;
  esac])
 
+install_gold_as_default=no
 AC_ARG_ENABLE(gold,
 [[  --enable-gold[=ARG]     build gold [ARG={default,yes,no}]]],
 [case "${enableval}" in
@@ -2094,13 +2095,11 @@ AC_ARG_ENABLE(gold,
    fi
    ;;
  no)
-   install_gold_as_default=no
    ;;
  *)
    AC_MSG_ERROR([invalid --enable-gold argument])
    ;;
- esac],
-[install_gold_as_default=no])
+ esac])
 
 # Identify the linker which will work hand-in-glove with the newly
 # built GCC, so that we can examine its features.  This is the linker


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]