On Thu, Apr 13, 2006 at 10:49:24PM -0400, Patrick McLean wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Alec Warner wrote: > > > > Except you need a way for them to turn it off, and you do not currently > > provide one. We can set default flags all we want, but I don't see > > filtering 'bad' flags as necessarily our problem. If you want to say: > > > > "Hey we have had issues with people filing bogus bug reports with CFLAGS > > that are completely inappropriate, so by default we check the sanity of > > your CFLAGS, this is how you turn those checks off." then I'd be ok with it. > > > > Most of the Ricers won't read it, and maybe you can print a warning that > > CFLAG checking is disabled. > > > > However leaving it on all the time merely imposes penalties on the power > > users who wish to use your profile. Your profile is a tool that should > > be useful to all classes of users. > > > > The only flags that are actually removed are the _invalid_ flags. These are > the > flags that gcc does not accept, and will error out on. The "bad" flags, IE the > ones that the developers consider to be broken, but that are accepted by gcc > are > not filtered, the profile simply prints a warning and pauses for 5 seconds to > encourage users to read the warning, it does not automatically filter any > flags > that the compiler accepts.
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. -- gentoo-dev@gentoo.org mailing list