On Fri, 2 Jul 2010 15:29:44 +0200 (CEST)
Vaeth <vaeth@...> wrote:
> Ryan Hill <firstname.lastname@example.org> wrote:
> > If your build system sets -ffast-math or -fstrict-aliasing
> > then the user can disable this by setting -fno-fast-math
> > or -fno-strict-aliasing in their CFLAGS.
> Just because some flags have "counter"-flags by accident,
> this does not hold for all flags. It is more reasonable to have
> other means that the flags are not modified in the first place.
I can't think of any flags that don't have a corresponding counter flag,
other than -m flags. At least, all -f and -W flags have opposite -fno and
-Wno versions, even if they're not explicitly documented.
> In fact, when I first introduced adding of CFLAGS, there were
> lot of complaints that this is evil and must not be done.
> I can understand this point of view (even if I know that
> certain CFLAGS should be used with the code and I would also
> prefer to have them to find possibly hidden bugs), so we
> compromised by having an option:
> With this option everybody could live well, since users with
> special settings will not run into trouble because undesired
> flags are added, and other users could just select the USE flag
> and have the benefits of appropriately optimized code.
> Up to now, that is, when we have this IMHO needless discussion
> that an option should not be an option.
If you as upstream have written your code in a way that it benefits from
certain flags (like -ffast-math, -fstrict-aliasing, -fvisibility-hidden,
etc.) then I think enabling those flags by default is the right thing to do.
There are many packages in the tree that do this, so if people are
complaining about it then it's their problem, not yours. ;)
> I hope that this answers also the question of
> Alec Warner <email@example.com>:
> : I am confused. If you want the users to use a default set of CFLAGS
> : you should set this in your build system (autotools, cmake, whatever).
> : [...]
> : I believe the above link seems to describe what you are looking to do
> : using autotools.
> Technically, I have no problem to force in configure.ac that certain
> CFLAGS are used (unless somebody patches the configure.ac, of course).
> The problem is that it is not good to force this if the user disagrees
> (or maybe even unless he explicitly agrees), i.e. it should be an
> option which the user really has. (If this option should only be
> documented in some INSTALL text or in the ./configure output,
> most users do not really have this option, because they would not
> even know about it.)
Maybe the best option in this case really is to use "custom-cflags". This
gives the user the option of explicitly opting out of your recommended
configuration, while the majority would build the package to your
specifications. I think this would make everyone happy (?).
fonts, gcc-porting, and it's all by design
toolchain, wxwidgets to keep us from losing our minds
@ gentoo.org EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662