On 12/09/11 10:12, Gaetan Nadon wrote:
On Fri, 2011-12-09 at 09:52 -0800, Alan Coopersmith wrote:
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.

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.

Right, I was thinking about compilers which aren't detected as gcc but
which also support the flag - this would be a benefit, not a problem.
(I don't know if any such compilers exist, as Solaris Studio doesn't
 support that flag, and I thought clang was detected as gcc by configure.)

It also gives a good place to add alternative flags for other compilers
if we discover any need such flags.
--
        -Alan Coopersmith-        [email protected]
         Oracle Solaris Platform Engineering: X Window System

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to