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
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-dev@g.o
From: Vaeth <vaeth@...>
Subject: Re: [gentoo-dev-announce] debug USE flag misuse
Date: Thu, 1 Jul 2010 23:44:17 +0200 (CEST)
Ryan Hill <dirtyepic@g.o> wrote:
> 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.

Since it is obvious that by _appending_ only the user's CFLAGS to your
own, you do not give him the option of disabling your own, the more
natural way to do this is to make it configurable in the build system,
e.g. by a ./configure option.

> But this has nothing to do with USE flags.

The usual way in gentoo to pass upstream's ./configure options
to the user is via USE flags.

> USE flags control package options

And in a case as the described, the CFLAGS become part of the package
options (at least what upstream considers as package options).

> The way to control compiler flags in Gentoo is CFLAGS.

CFLAGS in Gentoo are the way to pass CFLAGS to the build system.
Nothing more, nothing less.
You want to make it the _only_ way to control compiler flags.
Since Gentoo is lacking any other mechanism allowing an ebuild author
or upstream to set default CFLAGS (binary distributions do not need
such things, because the packager should compile the package with the
appropriate flags anyway), this would mean _in practice_:
Either upstreams forces its flags upon the user, or most users will
*not* build the package according to the package authors' suggestions
(and most will probably not even realize this).
You cannot seriously believe that one of these possibilities is better
than to make the things transparent to the user and to give him
the choice _in practice_ by means of a USE flag.

> 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

This is one of the things which are happening. More precisely,
not disabling assertions by *not* adding -DNDEBUG (and e.g. not
breaking code by not adding -flto with the -g).
Admittedly, it is not overly complex what USE=debug does, but -
well, it enables the only debugging support which is available
which in this case is all related with CFLAGS in some way or

Best Regards
Martin Väth
Re: [gentoo-dev-announce] debug USE flag misuse
-- Ryan Hill
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
Re: [gentoo-dev-announce] debug USE flag misuse
-- Vaeth
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: [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.