<!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 06:20 -0800, Dan Nicholson wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Mon, Feb 22, 2010 at 5:36 AM, Gaetan Nadon <<A HREF="mailto:memsize@videotron.ca">memsize@videotron.ca</A>> 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.
</PRE>
</BLOCKQUOTE>
I checked the case statement but I totally missed this line:<BR>
<TT>if test "x$GCC" = xyes ; the</TT>n<BR>
<BR>
I have to find an elegant way of doing it.<BR>
<BR>
Thanks!<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
--
Dan
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>