Patrick McLean posted <[EMAIL PROTECTED]>, excerpted below,  on
Thu, 13 Apr 2006 15:50:11 -0400:

> For about a month now, we (amd64) have had some code in our
> profile.bashrc that filters CFLAGS that are unrecognized by gcc, and
> warnings the user about bad CFLAGS.
> 
> So far it has worked fairly well, and it has really cut down on the
> number of bugs that filed by people with extreme ricer CFLAGS. It might
> be an idea to have something similar in the global bashrc, and have a
> system for arches to customize the CFLAGS that are warned about.
> 
> The code is at gentoo-x86/profiles/default-linux/amd64/profile.bashrc
> for those who want to see it.

Not just ricer flags (or I wouldn't call them that anyway and unlike
some, can explain each one and why I use it)...  I'm running gcc-4.0.x and
4.1.0, the latter as my default compiler, in addition to 3.4.6.  One of
the flags I use (-ftree-pre) isn't recognized by 3.4.x, and it has been a
bit of a hassle removing it each time I revert to 3.4.6 to test something
or other.

I've been /very/ impressed with the way this works, as now I don't have to
worry about killing the flag when I switch gccs, because the profile code
kills it for me! =8^)  The first time I noticed it, I wondered what kind
of magic the ebuild was doing.  Then I saw it on a couple others, and then
happened across it while reviewing the profile.  It works!  =8^)

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


-- 
[email protected] mailing list

Reply via email to