Gentoo Archives: gentoo-dev

From: Alec Warner <antarus@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse
Date: Thu, 01 Jul 2010 22:38:38
In Reply to: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse by Vaeth
On Thu, Jul 1, 2010 at 3:14 PM, Vaeth <vaeth@××××××××××××××××××××××××.de> wrote:
> Nikos Chantziaras <realnc@×××××.de> wrote: >> >> If you use portage than you can control per-package CFLAGS using >> bashrc and /etc/portage/env or similar functionality. > > This is correct, but the problem is that an ebuild author or > upstream cannot set a "default" here:  IMHO, it shouldn't be > necessary for the user to use such things only in order to > compile a package with the CFLAGS which upstream recommends. > Normally, users will not read such a recommendation (and in fact, > they shouldn't have to, since reading INSTALL or similar things > should be the task of the ebuild author).
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).×××.org/msg14303.html I believe the above link seems to describe what you are looking to do using autotools. Obviously if a user specifies a flag that over-rides your own flags; the user's flags will take precedence. However this is intentional behavior. I could totally be misunderstanding autotools as well; I haven't written any in about four years. -A
> > Speaking from the author's perspective: There should be a way > to write code appropriate for a specific compiler flag and to > assume that most users will then actually compile the package > with the corresponding flag. > If a user explicitly does not want to do this, this is fine, > but the ebuild should have a way to make sure that this only > happens if it is really the intention of the user. > Normally, USE flags are the way to pass options to the > user, aren't they? > > Best Regards > Martin Väth >