[PATCH xserver 1/4] Replace deprecated CWARNFLAGS with BASE_CFLAGS and NO_STRICT_ALIASING_CFLAG
Gaetan Nadon
memsize at videotron.ca
Fri Dec 9 10:33:17 PST 2011
On Fri, 2011-12-09 at 10:22 -0800, Alan Coopersmith wrote:
> 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.
I haven't thought about that, but yes, this macro does more than merely
replacing a bunch of "ifs".
Thanks for checking, it's the first time we use these new 1.16 macros.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111209/2c5e0c89/attachment.htm>
-------------- 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/20111209/2c5e0c89/attachment.pgp>
More information about the xorg-devel
mailing list