Gentoo Archives: gentoo-dev

From: Ryan Hill <dirtyepic@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse
Date: Thu, 01 Jul 2010 19:57:50
In Reply to: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse by Vaeth
On Thu, 1 Jul 2010 14:53:19 +0200 (CEST)
Vaeth <vaeth@××××××××××××××××××××××××.de> wrote:

> (Sorry that this mail does not contain the proper "References:"; > I am not a regular reader of this list and therefore cannot "reply"). > > Ryan Hill <dirtyepic@g.o> wrote: > > > USE flags should not affect CFLAGS unless there is a very good reason > > A valid reason should be that upstream would prefer to add these flags. > > Please note that usually upstream should know best which CFLAGS > to add, because upstream is usually the only instance fully familiar > with all details of the code (at least, upstream _should_ be so :) ). > In fact, a lot of flags are not only safe to add but really *should* > be added if the code was written with such flags in mind. > > [...]
Upstream is free to use whatever CFLAGS they see fit, as long as the user has the option of disabling them. This is simply done by appending the user's CFLAGS to those of the build system. But this has nothing to do with USE flags.
> So the natural thing is to give the user the choice whether to follow > upstream's recommendations or not. And the way of choice in gentoo is > usually done by USE flags.
USE flags control package options - whether to include support for foo, install extra documentation, build against either of lib-a or lib-b, etc. They should not affect compiler flags. Some exceptions are pch, profiling, and critical packages that really, really should be built with upstream's compiler flags but then people whine so much about "Gentoo being about choice" that someone adds a "custom-cflags" USE. The way to control compiler flags in Gentoo is CFLAGS.
> The debug USE flag in eix is also about convenience for the user: > If eix segfaults, it prints instructions how to produce a backtrace > in such a way which is most likely useful for upstream to locate > the problem. > Currently, these instructions are rather simple, because they can > refer to USE=debug. Omitting the debug USE flag would complicate > the instructions, making debugging less convenient for the user > and for upstream. Why should such an inconvenience be necessary?
If all --enable-debug does is add -g to CFLAGS, why can't you just say that? Or maybe point them to If --enable-debug does more than that then having a debug USE flag is perfectly fine. I don't have a problem with --enable-debug adding -g as well as (eg.) enabling assertions because if you're using USE="debug" you're probably using -g already.
> To avoid a misunderstanding: For packages for which upstream has no > particular preference for the CFLAGS, I agree that it would be very > strange to add CFLAGS by means of a USE flag. But if there _is_ such > a recommendation, I would not like to see it ignored in Gentoo > just for political reasons.
Again, we're not ignoring CFLAGS and we're not doing this for abstract or political reasons. This simply isn't what the debug USE flag is for. -- fonts, gcc-porting, and it's all by design toolchain, wxwidgets to keep us from losing our minds @ EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662


File name MIME type
signature.asc application/pgp-signature


Subject Author
[gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse Nikos Chantziaras <realnc@×××××.de>