Hi,

 While working on some GDB changes I have stumbled across this, which 
looks like a buglet in the top-level configure.  Perhaps a three-way merge 
error from the past.  Unfortunately there is nothing in ChangeLog that 
would indicate when these bits were introduced.

 We have these two variables, $baseargs and $tbaseargs, that we handle 
almost identically, except some bits are omitted from $tbaseargs only, 
based on $skip_targ.  However, at the point we decide to quote '$' in any 
of the options collected we only do so for $baseargs.  As a result, '$' 
won't be escaped correctly in $tbaseargs and will break in sub-makes used 
for the target.  Have I missed anything?

 If not, then here's an obvious fix.  Found by inspection, I don't have a 
test case handy.  OK to apply?

2012-05-01  Maciej W. Rozycki  <ma...@codesourcery.com>

        * configure.ac: Also quote '$' in tbaseargs.
        * configure: Regenerate.

  Maciej

gcc-ac-fix.diff
Index: gcc-fsf-trunk-quilt/configure
===================================================================
--- gcc-fsf-trunk-quilt.orig/configure  2012-05-01 20:44:33.995609891 +0100
+++ gcc-fsf-trunk-quilt/configure       2012-05-01 20:52:00.345564017 +0100
@@ -7267,6 +7267,7 @@ done
 # Remove the initial space we just introduced and, as these will be
 # expanded by make, quote '$'.
 baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
+tbaseargs=`echo "x$tbaseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
 
 # Add in --program-transform-name, after --program-prefix and
 # --program-suffix have been applied to it.  Autoconf has already
Index: gcc-fsf-trunk-quilt/configure.ac
===================================================================
--- gcc-fsf-trunk-quilt.orig/configure.ac       2012-05-01 20:44:33.995609891 
+0100
+++ gcc-fsf-trunk-quilt/configure.ac    2012-05-01 20:52:00.345564017 +0100
@@ -2721,6 +2721,7 @@ done
 # Remove the initial space we just introduced and, as these will be
 # expanded by make, quote '$'.
 baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
+tbaseargs=`echo "x$tbaseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
 
 # Add in --program-transform-name, after --program-prefix and
 # --program-suffix have been applied to it.  Autoconf has already

Reply via email to