[PATCH] configure.ac: Add -fno-strict-aliasing to CFLAGS

Jeremy Huddleston jeremyhu at freedesktop.org
Sun Oct 31 11:29:52 PDT 2010


On Oct 31, 2010, at 08:55, Gaetan Nadon wrote:

> On Sat, 2010-10-30 at 15:02 -0700, Jeremy Huddleston wrote:
> 
>> diff --git a/configure.ac b/configure.ac
>> index e8f9473..01c5196 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -83,6 +83,12 @@ AC_PROG_SED
>> # easier overrides at build time.
>> XSERVER_CFLAGS='$(CWARNFLAGS)'
>> 
>> +dnl Explicitly add -fno-strict-aliasing since this option should
>> disappear
>> +dln from util-macros CWARNFLAGS
>> +if  test "x$GCC" = xyes ; then
>> +    XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
>> +fi
>> +
>> 
> 
> The server is currently (git master) compiling with this option, and has
> been for longest time. This patch will simply duplicate this option. In
> bug 31238:
> 
>        The configure script in the three most recent releases of xorg-server define
>        CWARNFLAGS without -fno-strict-aliasing.
> 
> The xserver tarball 1.9.1 requires util-macros tarball 1.10 which does
> contain this option.

Right, but the problem is that my util-macros contain a patchset from February that never got committed (and I never noticed they didn't get committed because I was still using your patchset).  This change that I've suggested is essentially doing what we agreed upon back in February (Feb 23 - Feb 27 on xorg-devel)

I will be rolling a new tarball to re-add the flag (and also address one Xquartz regression), but the main point is that -fno-strict-aliasing should *NOT* be in CWARNFLAGS.  It is an ugly hack CFLAG to get around buggy C code.  This flag was originally just in xorg-server and a handful of libraries but eventually polluted all of our packages via CWARNFLAGS in util-macros.  It is not a warning flag.  It changes how the code is compiled (so by definition is not a warning flag).






More information about the xorg-devel mailing list