[PATCH util-macros 1/2] Don't disable strict aliasing (-fno-strict-aliasing) globally

Jeremy Huddleston jeremyhu at apple.com
Sun Oct 31 15:54:33 PDT 2010


Resurrecting this thread as I just realized it was never actually fixed.

I propose we actually follow up on these changes.  We should remove -fno-strict-aliasing from XORG_CWARNFLAGS and only add them to the modules that actually require it.  We can start out consercatively by adding it to the modules listed in the email below (as well as the xf86-* drivers that historically had the flag which I didn't check at the time of the first email... I know intel needs it)




On Feb 2, 2010, at 14:44, Jeremy Huddleston wrote:

> Instead, we warn where this optimization might cause a problem!
> 
> This was included for historic reasons and has persisted to the point of now
> infecting all X.org modules.  Historically, it was just present in these
> modules before adding XORG_CWARNFLAGS to XORG_DEFAULT_OPTIONS:
> 
> libICE
> libSM
> libX11
> libXau
> libXfont
> libXft
> libXpm
> libXres
> xorg-server
> 
> Most of these modules probably don't even need to disable this optimization,
> but if it is decided that this optimization should be disabled, it should be
> restricted to the required module rather than a global option.
> 
> Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
> xorg-macros.m4.in |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
> index caf61c2..40f5939 100644
> --- a/xorg-macros.m4.in
> +++ b/xorg-macros.m4.in
> @@ -588,7 +588,7 @@ AC_DEFUN([XORG_CWARNFLAGS], [
> AC_REQUIRE([AC_PROG_CC])
> if  test "x$GCC" = xyes ; then
>     CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
> --Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
> +-Wmissing-declarations -Wnested-externs -Wstrict-aliasing=2 \
> -Wbad-function-cast"
>     case `$CC -dumpversion` in
>     3.4.* | 4.*)
> -- 
> 1.6.2
> 
> 
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel



More information about the xorg-devel mailing list