Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Harald van D??k <truedfx@g.o>
Subject: Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
Date: Fri, 14 Apr 2006 21:17:26 +0200
On Fri, Apr 14, 2006 at 01:47:41PM -0400, Patrick McLean wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 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.

For the locale stuff, you're not exporting LC_ALL, which means if LC_ALL
is unset, and LC_MESSAGES is set, gcc might still spit out French (for
example) error messages. Also, it can be made simpler: changing the
command to `LC_ALL=C ${myprog} ${@} -E - 2>&1` should do it. LC_ALL
overrides LANG, so that can be left alone, and adding it right in front
of the command makes sure it gets exported, but not in the current
shell, so there's no need to manually restore it.
-- 
gentoo-dev@g.o mailing list


References:
automatically killing invalid CFLAGS/warning about bad CFLAGS
-- Patrick McLean
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
-- Alec Warner
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
-- Patrick McLean
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
-- Harald van D??k
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
-- Patrick McLean
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
Next by thread:
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
Previous by date:
Re: automatically killing invalid CFLAGS/warning about bad CFLAGS
Next by date:
Re: [gentoo-core] Google Summer of Code and Gentoo


Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.