This is the mail archive of the gcc-bugs@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]

[Bug driver/12201] Apostrophes in gcc -v output


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12201



------- Additional Comments From geoffk at geoffk dot org  2003-09-15 01:28 -------
Subject: Re:  Apostrophes in gcc -v output

> Date: 13 Sep 2003 17:42:10 -0000
> From: "drow at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>

> Geoff, this is caused by your patch to quote
> TOPLEVEL_CONFIGURE_ARGUMENTS.
> 
> First of all, you added an apostrophe at the beginning of every
> argument.  Did you mean to add one at the end too?

Yes, I wanted to put each argument in quotes.

>  Secondly, I'm pretty sure the arguments
> aren't expanded by the shell.

They are expanded once by Make, and then again by the shell inside
double-quotes.

>  I believe you took the backslash-doubling from autoconf's handling
> of program_transform_name; there, the backslashes are expanded by
> the surrounding backticks (echo `echo gcc | sed '$(transform)'`)
> parses one more layer of backslashes than echo gcc | sed
> '$(transform)' does).
> 
> I've attached a patch which should fix the extra apostrophes without breaking
> --program-transform-name, I'd appreciate it if you could try it.  I
> tested with:
>  ../gcc/configure '--program-transform-name=/^[cg][^.-]*$/s/\(.*\)$/\1-3.4/'
> which is really as pathalogical as you can get.  It works with bash, but not
> with ash (due to a bug in autoconf!).
> 
> Reading specs from
> /nevyn/big/fsf/projects/autoconf/oo/foo/bin/../lib/gcc/i686-pc-linux-gnu/3.4/specs
> Configured with: ../gcc/configure
> --program-transform-name=/^[cg][^.-]*$/s/\(.*\)$/\1-3.4/ --prefix=/foo
> --enable-languages=c
> 
> i.e. not quoted well enough to just paste into the shell, but I think that's
> OK.

I'm afraid I didn't get a copy of the patch, could you send it to me
privately?

I'm not sure that's quite enough of a pathological test case.  Try
adding --manpath=$(prefix)/share/man or --manpath=${prefix}/share/man ...


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