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
Message-Id: AANLkTimX06XrAR-NY5Wt8glQxGEb5bPHCXpwgDHlqhbj@mail.gmail.com
In Reply to: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse by Vaeth
1 On Thu, Jul 1, 2010 at 3:14 PM, Vaeth <vaeth@××××××××××××××××××××××××.de> wrote:
2 > Nikos Chantziaras <realnc@×××××.de> wrote:
3 >>
4 >> If you use portage than you can control per-package CFLAGS using
5 >> bashrc and /etc/portage/env or similar functionality.
6 >
7 > This is correct, but the problem is that an ebuild author or
8 > upstream cannot set a "default" here:  IMHO, it shouldn't be
9 > necessary for the user to use such things only in order to
10 > compile a package with the CFLAGS which upstream recommends.
11 > Normally, users will not read such a recommendation (and in fact,
12 > they shouldn't have to, since reading INSTALL or similar things
13 > should be the task of the ebuild author).
14
15 I am confused. If you want the users to use a default set of CFLAGS
16 you should set this in your build system (autotools, cmake, whatever).
17
18 http://www.mail-archive.com/autoconf@×××.org/msg14303.html
19
20 I believe the above link seems to describe what you are looking to do
21 using autotools. Obviously if a user specifies a flag that over-rides
22 your own flags; the user's flags will take precedence. However this
23 is intentional behavior. I could totally be misunderstanding
24 autotools as well; I haven't written any in about four years.
25
26 -A
27
28 >
29 > Speaking from the author's perspective: There should be a way
30 > to write code appropriate for a specific compiler flag and to
31 > assume that most users will then actually compile the package
32 > with the corresponding flag.
33 > If a user explicitly does not want to do this, this is fine,
34 > but the ebuild should have a way to make sure that this only
35 > happens if it is really the intention of the user.
36 > Normally, USE flags are the way to pass options to the
37 > user, aren't they?
38 >
39 > Best Regards
40 > Martin Väth
41 >