diff mbox

configure.ac: Also quote '$' in tbaseargs

Message ID alpine.DEB.1.10.1205012054580.18334@tp.orcam.me.uk
State New
Headers show

Commit Message

Maciej W. Rozycki May 1, 2012, 8:17 p.m. UTC
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  <macro@codesourcery.com>

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

  Maciej

gcc-ac-fix.diff

Comments

Maciej W. Rozycki May 16, 2012, 2:13 p.m. UTC | #1
Hi,

 Would anyone please have a look at:

http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00044.html

I know this is trivial boring stuff, but perhaps especially because of 
this let's get rid of it ASAP?  Thanks.

  Maciej
Maciej W. Rozycki Sept. 8, 2012, 12:41 a.m. UTC | #2
Hi,

 This small change:

http://gcc.gnu.org/ml/gcc-patches/2012-05/msg00044.html

still awaits review.  Please help.  Thanks.

  Maciej
diff mbox

Patch

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