<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
On Fri, 2011-12-09 at 09:52 -0800, Alan Coopersmith wrote:
On 12/09/11 07:40, Keith Packard wrote:
> On Fri, 09 Dec 2011 07:45:01 -0500, Gaetan Nadon<<A HREF="mailto:firstname.lastname@example.org">email@example.com</A>> 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"
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.
My understanding is that XORG_TESTSET_CFLAG tests the compiler flag with the compiler being used. During xserver configuration, I get:
checking if gcc -std=gnu99 supports -fno-strict-aliasing... yes
I expect that the variable will be empty on non gcc compilers but I have not tested that personally.
# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
# Minimum version: 1.16.0
# Test if the compiler works when passed the given flag as a command line argument.
# If it succeeds, the flag is appeneded to the given variable. If not, it tries the
# next flag in the list until there are no more options.
# Note that this does not guarantee that the compiler supports the flag as some
# compilers will simply ignore arguments that they do not understand, but we do
# attempt to weed out false positives by using -Werror=unknown-warning-option and