From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5277 invoked by alias); 20 Jun 2002 14:26:08 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 5206 invoked by uid 71); 20 Jun 2002 14:26:02 -0000 Resent-Date: 20 Jun 2002 14:26:02 -0000 Resent-Message-ID: <20020620142602.5203.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, sdouglass@arm.com Received: (qmail 1476 invoked by uid 61); 20 Jun 2002 14:19:54 -0000 Message-Id: <20020620141954.1475.qmail@sources.redhat.com> Date: Thu, 20 Jun 2002 08:16:00 -0000 From: sdouglass@arm.com Reply-To: sdouglass@arm.com To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: bootstrap/7087: sub-make FLAG propagation fails if flag ends with '=' X-SW-Source: 2002-06/txt/msg00455.txt.bz2 List-Id: >Number: 7087 >Category: bootstrap >Synopsis: sub-make FLAG propagation fails if flag ends with '=' >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Jun 20 07:26:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: sdouglass@arm.com >Release: 3.1 >Organization: >Environment: all >Description: The top-level Makefile.in (and others?) propagates some flags to sub-make by saying, e.g. "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" This fails to propagate the value if I've done, e.g. make STAGE1_CFLAGS="-O2 -Dinline=' bootstrap-lean >How-To-Repeat: make STAGE1_CFLAGS="-O2 -Dinline=' bootstrap-lean >Fix: The fix is to change the sed commands to sed -e s'/[^=][^=]*=$$/XFOO=/' I've also added single quotes to protect the '*' (and now '[]'s from being interpreted by the shell. Although it's pretty unlikely there would be a directory named 's/.[BAR=$/XFOO=' lying around, imagine the confusion that would ensue when using the unquoted form. Try it for fun: mkdir -p s'/.[BAR=$/'XFOO= make bootstrap-lean >Release-Note: >Audit-Trail: >Unformatted: