From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20660 invoked by alias); 15 Sep 2003 01:44:52 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20639 invoked from network); 15 Sep 2003 01:44:51 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 15 Sep 2003 01:44:51 -0000 Received: from drow by nevyn.them.org with local (Exim 4.22 #1 (Debian)) id 19yiQ6-0003YW-5V; Sun, 14 Sep 2003 21:44:50 -0400 Date: Mon, 15 Sep 2003 01:44:00 -0000 From: Daniel Jacobowitz 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 Message-ID: <20030915014449.GA13311@nevyn.them.org> Mail-Followup-To: gcc-patches@gcc.gnu.org, binutils@sources.redhat.com, gdb-patches@sources.redhat.com, geoffk@geoffk.org References: <20030914145716.GA18402@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030914145716.GA18402@nevyn.them.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-09/txt/msg00319.txt.bz2 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