[PATCH xserver 1/4] Replace deprecated CWARNFLAGS with BASE_CFLAGS and NO_STRICT_ALIASING_CFLAG
Gaetan Nadon
memsize at videotron.ca
Sat Dec 10 11:16:59 PST 2011
On Fri, 2011-12-09 at 15:31 -0800, Keith Packard wrote:
> On Fri, 09 Dec 2011 11:32:39 -0500, Gaetan Nadon <memsize at videotron.ca> wrote:
>
> > The content for CWARNFLAGS will always contain -fno-strict-aliasing.
>
> I think BASE_CFLAGS should include -fno-strict-aliasing then;
We would be back to square one. It would only be a macro name change.
> it retains compatibility with the original C standards on which the X
> code is based. The alternative is to have random failures in older code
> if people try to switch from CWARNFLAGS to BASE_CFLAGS without
> understanding that they would also need to add the -fno-strict-aliasing
> option as well.
That's a possibility, if they also ignore the aliasing warnings.
Note that only 13 drivers use CWARNFLAGS. All others don't have
-fno-strict-aliasing. They don't even get the warnings about breaking
aliasing rules!
>
> I'd probably add -fwrapv as well as that preserves the semantics of
> integer operations. The GCC idiots seem to think that it's OK to break
> existing code to allow them to perform various marginally useful
> optimizations...
>
> /me still remembers spending three days figuring out that -fwrapv was
> required to make nickle compile correctly.
>
Perhaps a different macro for xserver + any other modules deemed to be
in need of -fno-strict-aliasing. I don't think we have a definite list
of such modules.
I'll check back to see if I should drop this patch or not. You may want
to look at patch #3 as it uses BASE_CFLAGS as their faith is
inter-connected.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111210/7b85b966/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111210/7b85b966/attachment.pgp>
More information about the xorg-devel
mailing list