1 |
On Sat, Jun 17, 2006 at 03:35:10PM +0200, Harald van D??k wrote: |
2 |
> On Sat, Jun 17, 2006 at 03:32:36PM +0200, Kevin F. Quinn wrote: |
3 |
> > Easiest way to find these is to stick -Wall in global CFLAGS (or just |
4 |
> > -Wstrict-aliasing if you want to be more specific), and grep the build |
5 |
> > log for 'will break strict aliasing' (LC_ALL=C obviously). |
6 |
|
7 |
http://dev.gentoo.org/~pvdabeel/strict-aliasing.log |
8 |
|
9 |
It seems that roughly 10% of the ebuilds tested with strict-aliasing |
10 |
in cflags warn about type punned pointers breaking strict aliasing |
11 |
rules. A few ebuilds did not make it through testing with strict |
12 |
aliasing, but did with -fno-strict-aliasing. Those should be obvious |
13 |
candidates for appending the fno-strict-aliasing flag (or an |
14 |
attempt at fixing the violation by patching the code). |
15 |
|
16 |
> That warning is given for valid code too. Please only add |
17 |
> -fno-strict-aliasing if you actually find a package misbehaves without |
18 |
> it, or if you have verified that there is indeed an aliasing violation |
19 |
> in the code. |
20 |
|
21 |
Right now we have -fno-strict-aliasing in the default cflags and are |
22 |
considering auditing the tree for aliasing violations. |
23 |
|
24 |
Pieter Van den Abeele |
25 |
|
26 |
> -- |
27 |
> gentoo-dev@g.o mailing list |
28 |
-- |
29 |
gentoo-dev@g.o mailing list |