Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com,
	gdb-patches@sources.redhat.com, geoffk@geoffk.org
Subject: Re: [toplevel] Fix argument quoting for subconfigures
Date: Mon, 15 Sep 2003 01:44:00 -0000	[thread overview]
Message-ID: <20030915014449.GA13311@nevyn.them.org> (raw)
In-Reply-To: <20030914145716.GA18402@nevyn.them.org>

On Sun, Sep 14, 2003 at 10:57:17AM -0400, Daniel Jacobowitz wrote:
> This patch is for GCC PR driver/12201.
> 
> A couple problems in recent changes to the quoting.  Backslashes were being
> doubled, which is wrong as far as I can see - I believe that change was
> based on a similar autoconf-generated fragment for program_transform_name,
> which _does_ actually need backslashes doubled.  Also, a single apostrophe
> was being added to each argument.
> 
> I've also switched to the idiom suggested by Andreas: don't pass configure
> arguments to echo in case echo expands backslashes.  Use cat and a here-doc
> instead.  Unfortunately, if your echo does expand backslashes this won't fix
> the problem.  Despite their own advice in the autoconf manual, autoconf
> generates code that passes user-supplied strings to echo.  That's a problem
> for another day.
> 
> So, using bash, this allows me to pass a program-transform-name containing
> both dollar signs and backslashes to configure and get the right arguments
> in subdir makefiles.  It also fixes up the extra apostrophes in gcc -v
> output.  OK?

Curses.  Geoff pointed out that TOPLEVEL_CONFIGURE_ARGUMENTS is
expanded inside of double quotes; this causes the quoting to get
confused.  This patch doesn't fix that.  I believe everything was also
wrong before; we doubled backslashes, but that didn't do anything to
stop dollar signs from being interpreted.  So I'm not withdrawing this
patch; we can fix that separately.

I wish that the top level required GNU make.  But I think putting an
"export" directive into it would confuse non-GNU make.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


      reply	other threads:[~2003-09-15  1:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-14 14:57 Daniel Jacobowitz
2003-09-15  1:44 ` Daniel Jacobowitz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030915014449.GA13311@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=binutils@sources.redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=geoffk@geoffk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox