[PATCH video-intel] config: add -fno-strict-aliasing now that it is out of $CWARNFLAGS

Gaetan Nadon memsize at videotron.ca
Mon Feb 22 15:35:20 PST 2010


On Mon, 2010-02-22 at 14:48 -0800, Jeremy Huddleston wrote:

> Thanks Gaetan.  This review goes similarly to the other affected  
> modules you've mentioned as long as they all match this same pattern.
> 
> I also reviewed the xserver changes.  It would be nice to move those  
> to Makefile.am as well, but that's a bit more trouble than it may be  
> worth.
> 

It would be nice indeed, but due to the volume (about 70 makefiles), it
was classified
as "additional opportunities" to be done after the "transfer". Just need
to draw the line somewhere.
I think it would be useful.

In the util-macros patch, you will find a list of modules that do not
need -fno-strict-aliasing option to be added.

Thanks


> Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
> 
> On Feb 22, 2010, at 14:03, Gaetan Nadon wrote:
> 
> > This patch will ensure the modules continues to suppress the
> > optimization, based on strict aliasing rules, after the option
> > is removed from $CWARNFLAGS. There is no change in the object
> > code produced.
> >
> > There is no attempt to determine if the module should or should not
> > have such an optimization. A new warning (-Wstrict-aliasing=2)
> > has been added to the XORG_CWARNFLAGS macro to help  find code
> > that may interfere with optimization.
> > ---
> > configure.ac         |    7 +++++++
> > src/Makefile.am      |   11 +++++++++--
> > src/xvmc/Makefile.am |   12 ++++++++++--
> > uxa/Makefile.am      |    6 +++++-
> > 4 files changed, 31 insertions(+), 5 deletions(-)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 87cbe55..687dcf7 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -40,6 +40,13 @@ m4_ifndef([XORG_MACROS_VERSION],
> > XORG_MACROS_VERSION(1.3)
> > XORG_DEFAULT_OPTIONS
> >
> > +# Suppress optimization based on strict aliasing rules
> > +ALIASING_CFLAGS=
> > +if test "x$GCC" = xyes; then
> > +    ALIASING_CFLAGS=-fno-strict-aliasing
> > +fi
> > +AC_SUBST([ALIASING_CFLAGS])
> > +
> > # Checks for programs.
> > AC_DISABLE_STATIC
> > AC_PROG_LIBTOOL
> > diff --git a/src/Makefile.am b/src/Makefile.am
> > index b4bafbd..b84feff 100644
> > --- a/src/Makefile.am
> > +++ b/src/Makefile.am
> > @@ -26,8 +26,15 @@ SUBDIRS = xvmc render_program
> > # _ladir passes a dummy rpath to libtool so the thing will actually  
> > link
> > # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing  
> > the .a, etc.
> >
> > -AM_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \
> > -	@PCIACCESS_CFLAGS@ -I$(top_srcdir)/uxa -I$(top_srcdir)/src/ 
> > render_program
> > +AM_CFLAGS = \
> > +	$(CWARNFLAGS) \
> > +	$(ALIASING_CFLAGS) \
> > +	$(XORG_CFLAGS) \
> > +	$(DRM_CFLAGS) \
> > +	$(DRI_CFLAGS) \
> > +	$(PCIACCESS_CFLAGS) \
> > +	-I$(top_srcdir)/uxa \
> > +	-I$(top_srcdir)/src/render_program
> >
> > intel_drv_la_LTLIBRARIES = intel_drv.la
> > intel_drv_la_LDFLAGS = -module -avoid-version
> > diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
> > index be8824b..815eda8 100644
> > --- a/src/xvmc/Makefile.am
> > +++ b/src/xvmc/Makefile.am
> > @@ -7,8 +7,16 @@ SUBDIRS = shader
> > libI810XvMC_la_SOURCES = I810XvMC.c \
> > 			 I810XvMC.h
> >
> > -libI810XvMC_la_CFLAGS = @CWARNFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@  
> > @DRI_CFLAGS@ \
> > -	-I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
> > +libI810XvMC_la_CFLAGS = \
> > +	$(CWARNFLAGS) \
> > +	$(ALIASING_CFLAGS) \
> > +	$(XORG_CFLAGS) \
> > +	$(DRM_CFLAGS) \
> > +	$(DRI_CFLAGS) \
> > +	-I$(top_srcdir)/src \
> > +	-DTRUE=1 \
> > +	-DFALSE=0
> > +
> > libI810XvMC_la_LDFLAGS = -version-number 1:0:0
> > libI810XvMC_la_LIBADD = @DRI_LIBS@ @DRM_LIBS@ @XVMCLIB_LIBS@
> >
> > diff --git a/uxa/Makefile.am b/uxa/Makefile.am
> > index 0dfad48..3658b9a 100644
> > --- a/uxa/Makefile.am
> > +++ b/uxa/Makefile.am
> > @@ -7,7 +7,11 @@ SOLARIS_ASM_CFLAGS=""
> > INCLUDES = \
> > 	$(XORG_INCS)
> >
> > -AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS)
> > +AM_CFLAGS = \
> > +	$(CWARNFLAGS) \
> > +	$(ALIASING_CFLAGS) \
> > +	$(XORG_CFLAGS) \
> > +	$(DIX_CFLAGS)
> >
> > libuxa_la_SOURCES = \
> > 	uxa.c \
> > -- 
> > 1.6.0.4
> >
> > _______________________________________________
> > xorg-devel mailing list
> > xorg-devel at lists.x.org
> > http://lists.x.org/mailman/listinfo/xorg-devel
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100222/ee25ab5f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100222/ee25ab5f/attachment.pgp>


More information about the xorg-devel mailing list