<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
On Mon, 2010-02-22 at 14:48 -0800, Jeremy Huddleston wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
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.
</PRE>
</BLOCKQUOTE>
It would be nice indeed, but due to the volume (about 70 makefiles), it was classified<BR>
as "additional opportunities" to be done after the "transfer". Just need to draw the line somewhere.<BR>
I think it would be useful.<BR>
<BR>
In the util-macros patch, you will find a list of modules that do not need -fno-strict-aliasing option to be added.<BR>
<BR>
Thanks<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
Reviewed-by: Jeremy Huddleston <<A HREF="mailto:jeremyhu@apple.com">jeremyhu@apple.com</A>>
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
> <A HREF="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</A>
> <A HREF="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>