public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Joshua Nichols <nichoj@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS
Date: Fri, 14 Apr 2006 14:04:09 -0400	[thread overview]
Message-ID: <443FE419.7000201@gentoo.org> (raw)
In-Reply-To: <443FE03D.1050907@gentoo.org>

Patrick McLean wrote:
> Harald van D?k wrote:
> >> The only flags that are actually removed are the flags that are invalid
> >> _by themselves_. There are cases where flags are valid because of other
> >> flags, such as anything following -X*.
> >>
> >> Two other problems I see with the code:
> >> CFLAGS=${CFLAGS//bad-flag} is in the ebuild quiz, if I recall
> correctly.
> >> It's broken because it also removes valid flags that happen to contain
> >> bad-flag as a substring.
> >> Locale isn't forced to C, which means gcc may not spit out
> 'unrecognized
> >> option' at all even for invalid flags.
>
> There is a new version at
> http://dev.gentoo.org/~chutzpah/profile.bashrc that
> should fix all these possible problems. Thanks for pointing them out,
> let me
> know if you see anything else.
Around line 77, you have:
        hasme ${flag} ${CFLAGS} ${CXXFLAGS} && trigger=1 && \
        ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
packages."

Might I suggest you change it to something like:

    if hasme ${flag} ${CFLAGS} ${CXXFLAGS}; then
       trigger=1
       ewarn "Your C(XX)FLAGS contain(s) \"${flag}\" which can break
packages."
    fi

While there's nothing wrong with the original way, my suggestion would
make it a bit more obvious that you're setting the 'trigger' flag.

Regards,

Josh
-- 
gentoo-dev@gentoo.org mailing list



  reply	other threads:[~2006-04-14 18:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13 19:50 [gentoo-dev] automatically killing invalid CFLAGS/warning about bad CFLAGS Patrick McLean
2006-04-13 23:51 ` [gentoo-dev] " Duncan
2006-04-14  2:22 ` [gentoo-dev] " Alec Warner
2006-04-14  2:49   ` Patrick McLean
2006-04-14  6:27     ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14 17:47       ` Patrick McLean
2006-04-14 18:04         ` Joshua Nichols [this message]
2006-04-14 18:16           ` Patrick McLean
2006-04-14 19:17         ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14 22:49         ` Mike Frysinger
2006-04-14  3:01 ` [gentoo-dev] " R Hill
2006-04-14  3:07   ` Donnie Berkholz
2006-04-14  3:39     ` R Hill
2006-04-14  5:53       ` Harald van =?unknown-8bit?Q?D=C4=B3k?=
2006-04-14  7:17         ` Jakub Moc
2006-04-25 13:29   ` James Potts
2006-04-27  5:24     ` R Hill
2006-04-28 15:06       ` James Potts

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=443FE419.7000201@gentoo.org \
    --to=nichoj@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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