From patchwork Tue May 1 20:17:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 156209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 21930B6FA5 for ; Wed, 2 May 2012 06:18:13 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1336508294; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Date:From:To:CC:Subject:Message-ID:User-Agent: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=73nkFDuo9lEPlBnXvB4NOTn1beI=; b=ZS+h5bbpElhajnz hEtMHgPICFllREWgC14KQwW/QqftYoEUj6uPMqLnT+Jk8t1MBZyqv1WhrYJegUTG U5GupsG6eEF8RQEAzqgw+c32dHdPFpv7gLrDy1SCdeMyIUMl+S3Nbp2UwFt9ZZ9M wrGUgmqFBejG/Nmw7jX0h1AsKlNA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Date:From:To:CC:Subject:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Khd3SQ3srzZzhgXSWLGOfoeMmt0UZ+fl3WhlUvv+icsW4/JRy2mkIBDBkYzH/r 1JJIKzGcSlTVds87ro9CyO55KCcEqGXQZQfGNN7vpZeoesX+/o9/KA+xuaIVCmRC ILbCgCl8x+iTDkd4DSlf8C6vso8mjOG0hI5KBgwUYJj28=; Received: (qmail 19546 invoked by alias); 1 May 2012 20:17:57 -0000 Received: (qmail 19517 invoked by uid 22791); 1 May 2012 20:17:55 -0000 X-SWARE-Spam-Status: No, hits=-3.3 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 May 2012 20:17:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SPJVp-0005af-Kd from Maciej_Rozycki@mentor.com ; Tue, 01 May 2012 13:17:29 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 1 May 2012 13:17:29 -0700 Received: from [172.30.14.29] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Tue, 1 May 2012 21:17:27 +0100 Date: Tue, 1 May 2012 21:17:17 +0100 From: "Maciej W. Rozycki" To: CC: , Subject: [PATCH] configure.ac: Also quote '$' in tbaseargs Message-ID: User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * configure.ac: Also quote '$' in tbaseargs. * configure: Regenerate. Maciej gcc-ac-fix.diff 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