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

Gaetan Nadon memsize at videotron.ca
Mon Feb 22 06:44:50 PST 2010


On Mon, 2010-02-22 at 06:20 -0800, Dan Nicholson wrote:

> On Mon, Feb 22, 2010 at 5:36 AM, Gaetan Nadon <memsize at videotron.ca> 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.
> > ---
> >  src/Makefile.am      |   11 +++++++++--
> >  src/xvmc/Makefile.am |   12 ++++++++++--
> >  uxa/Makefile.am      |    6 +++++-
> >  3 files changed, 24 insertions(+), 5 deletions(-)
> >
> > diff --git a/src/Makefile.am b/src/Makefile.am
> > index b4bafbd..54c86fa 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) \
> > +       -fno-strict-aliasing \
> > +       $(XORG_CFLAGS) \
> > +       $(DRM_CFLAGS) \
> > +       $(DRI_CFLAGS) \
> > +       $(PCIACCESS_CFLAGS) \
> > +       -I$(top_srcdir)/uxa \
> > +       -I$(top_srcdir)/src/render_program
> 
> I think you need to test for gcc in configure like CWARNFLAGS did
> instead of shoving it into the Makefile. This will just make other
> compilers bomb on the unrecognized option.
> 

I checked the case statement but I totally missed this line:
if  test "x$GCC" = xyes ; then

I have to find an elegant way of doing it.

Thanks!


> --
> Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100222/507725b3/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/507725b3/attachment.pgp>


More information about the xorg-devel mailing list