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} [EMAIL PROTECTED] -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@gentoo.org mailing list

Reply via email to