1 |
On Thursday 28 September 2006 03:35, Paul de Vrieze <pauldv@g.o> |
2 |
wrote about 'Re: [gentoo-amd64] First Impressions': |
3 |
> Boyd Stephen Smith Jr. wrote: |
4 |
> > On Wednesday 27 September 2006 11:11, "Hemmann, Volker Armin" |
5 |
> > <volker.armin.hemmann@××××××××××××.de> wrote about 'Re: [gentoo-amd64] |
6 |
> > |
7 |
> > First Impressions': |
8 |
> >> -O3 don't do it. |
9 |
> > -O3 breaking just doesn't happen anymore. |
10 |
> The thing is that besides compiler errors, there are many program errors |
11 |
> out there that are not caused by optimization levels, just exposed. From |
12 |
> the point of view of a user however it doesn't matter where the error |
13 |
> is. It is an error, and thus should be fixed. |
14 |
|
15 |
Agreed, but the fix is not "don't use useful compiler features", |
16 |
it's "change the program source to not be erroneous". Of course, there's |
17 |
also the short-term solution of "filter/replace flags for the few programs |
18 |
known to have issues". |
19 |
|
20 |
It's wrong-headed to deride or discourage users for using the features of |
21 |
their compiler when those functions are not erroneous. Instead, you |
22 |
should be leaning on the developers to fix the erroneous code. |
23 |
|
24 |
> The main thing is that -O2 is the default at most places, and as such |
25 |
> gets the most testing. That means that things generally work for -O2 |
26 |
> where -O3 or -Os exposes bugs in the software. |
27 |
|
28 |
Again, there's no completely safe setting. -O2 breaks stuff; -O3 breaks |
29 |
stuff; -Os breaks stuff. None of them are due to a bad compiler. I |
30 |
therefore urge people to use whatever optimization level they think is |
31 |
best and then file bugs if the package is broken. (It is the package |
32 |
that's broken, not the compiler or the choice of CFLAGS.) |
33 |
|
34 |
Also, surveying existing ebuilds, there are evidently quite a few more than |
35 |
I originally thought that force an optimization lower than -O2... around |
36 |
40. There's actually about 14 that *force* -Os. Well, drilling down I |
37 |
see that is just every postfix ebuild -- that could certainly be |
38 |
accumulated cruft. |
39 |
|
40 |
-- |
41 |
"If there's one thing we've established over the years, |
42 |
it's that the vast majority of our users don't have the slightest |
43 |
clue what's best for them in terms of package stability." |
44 |
-- Gentoo Developer Ciaran McCreesh |