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: Thu, 1 Jul 2010 14:00:13 -0600
On Thu, 1 Jul 2010 14:53:19 +0200 (CEST)
Vaeth <vaeth@...> 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 http://www.gentoo.org/proj/en/qa/backtraces.xml?

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
@ gentoo.org                EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
Attachment:
signature.asc (PGP signature)
Replies:
Re: [gentoo-dev-announce] debug USE flag misuse
-- Nikos Chantziaras
References:
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: Re: [gentoo-dev-announce] debug USE flag misuse
Next by thread:
Re: [gentoo-dev-announce] debug USE flag misuse
Previous by date:
Re: Re: [gentoo-dev-announce] debug USE flag misuse
Next by date:
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.