[toplevel] Fix argument quoting for subconfigures
Daniel Jacobowitz
drow@mvista.com
Mon Sep 15 01:44:00 GMT 2003
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
More information about the Gcc-patches
mailing list