public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: sdouglass@arm.com
To: gcc-gnats@gcc.gnu.org
Subject: bootstrap/7087: sub-make FLAG propagation fails if flag ends with '='
Date: Thu, 20 Jun 2002 08:16:00 -0000	[thread overview]
Message-ID: <20020620141954.1475.qmail@sources.redhat.com> (raw)


>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:


             reply	other threads:[~2002-06-20 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-20  8:16 sdouglass [this message]
2003-05-14  9:06 Dara Hazeghi
2003-05-14  9:36 scott douglass
2003-05-14 10:57 giovannibajo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020620141954.1475.qmail@sources.redhat.com \
    --to=sdouglass@arm.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).