1 |
Ryan Hill <dirtyepic@g.o> wrote: |
2 |
> Upstream is free to use whatever CFLAGS they see fit, as long as the |
3 |
> user has the option of disabling them. This is simply done by appending |
4 |
> the user's CFLAGS to those of the build system. |
5 |
|
6 |
Since it is obvious that by _appending_ only the user's CFLAGS to your |
7 |
own, you do not give him the option of disabling your own, the more |
8 |
natural way to do this is to make it configurable in the build system, |
9 |
e.g. by a ./configure option. |
10 |
|
11 |
> But this has nothing to do with USE flags. |
12 |
|
13 |
The usual way in gentoo to pass upstream's ./configure options |
14 |
to the user is via USE flags. |
15 |
|
16 |
> USE flags control package options |
17 |
|
18 |
And in a case as the described, the CFLAGS become part of the package |
19 |
options (at least what upstream considers as package options). |
20 |
|
21 |
> The way to control compiler flags in Gentoo is CFLAGS. |
22 |
|
23 |
CFLAGS in Gentoo are the way to pass CFLAGS to the build system. |
24 |
Nothing more, nothing less. |
25 |
You want to make it the _only_ way to control compiler flags. |
26 |
Since Gentoo is lacking any other mechanism allowing an ebuild author |
27 |
or upstream to set default CFLAGS (binary distributions do not need |
28 |
such things, because the packager should compile the package with the |
29 |
appropriate flags anyway), this would mean _in practice_: |
30 |
Either upstreams forces its flags upon the user, or most users will |
31 |
*not* build the package according to the package authors' suggestions |
32 |
(and most will probably not even realize this). |
33 |
You cannot seriously believe that one of these possibilities is better |
34 |
than to make the things transparent to the user and to give him |
35 |
the choice _in practice_ by means of a USE flag. |
36 |
|
37 |
> If --enable-debug does more than that then having a debug USE flag is |
38 |
> perfectly fine. I don't have a problem with --enable-debug adding -g |
39 |
> as well as (eg.) enabling assertions |
40 |
|
41 |
This is one of the things which are happening. More precisely, |
42 |
not disabling assertions by *not* adding -DNDEBUG (and e.g. not |
43 |
breaking code by not adding -flto with the -g). |
44 |
Admittedly, it is not overly complex what USE=debug does, but - |
45 |
well, it enables the only debugging support which is available |
46 |
which in this case is all related with CFLAGS in some way or |
47 |
another. |
48 |
|
49 |
Best Regards |
50 |
Martin Väth |