[PATCH xserver 1/4] Replace deprecated CWARNFLAGS with BASE_CFLAGS and NO_STRICT_ALIASING_CFLAG

Alan Coopersmith alan.coopersmith at oracle.com
Fri Dec 9 09:52:49 PST 2011


On 12/09/11 07:40, Keith Packard wrote:
> On Fri, 09 Dec 2011 07:45:01 -0500, Gaetan Nadon<memsize at videotron.ca>  wrote:
>
>>   This function is deprecated because it defines -fno-strict-aliasing
>>   which alters the code generated by the compiler.  If -fno-strict-aliasing
>>   is needed, then it should be added explicitly in the module when
>>   it is updated to use BASE_CFLAGS.
>
> Does this change the default for this flag? -fno-strict-aliasing is
> needed to preserve compatibility with older code, and I think it should
> probably be on by default until a module owner disables it manually.

The actual diff is:
-if  test "x$GCC" = xyes ; then
-    XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
-fi
+XORG_TESTSET_CFLAG([NO_STRICT_ALIASING_CFLAG], [-fno-strict-aliasing])
+XSERVER_CFLAGS='$(BASE_CFLAGS) $(NO_STRICT_ALIASING_CFLAG)'

which has the net effect of changing it from hardcoding for gcc to passing
it to any compiler which accepts the flag, so many actually expand usage of
it on non-gcc compilers.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list