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: Ryan Hill <dirtyepic@g.o>
Subject: Re: [gentoo-dev-announce] debug USE flag misuse
Date: Fri, 2 Jul 2010 14:39:57 -0600
On Fri, 2 Jul 2010 15:29:44 +0200 (CEST)
Vaeth <vaeth@...> wrote:

> Ryan Hill <dirtyepic@g.o> 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 <antarus@g.o>:
> 
> : 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
Attachment:
signature.asc (PGP signature)
Replies:
Re: Re: [gentoo-dev-announce] debug USE flag misuse
-- Mike Frysinger
References:
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [gentoo-dev-announce] debug USE flag misuse
Next by thread:
Re: Re: [gentoo-dev-announce] debug USE flag misuse
Previous by date:
Re: Over using preserve_old_lib, don't do that
Next by date:
Re: Re: [gentoo-dev-announce] debug USE flag misuse


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

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