From: Michael Wetherell Date: Sun, 12 Feb 2006 01:55:41 +0000 (+0000) Subject: Add -fno-strict-aliasing to the optimisation flags for gcc as discussed on wx-dev X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d6bf7254f410c6a138cd846f490fec1fa6389ae4?ds=inline Add -fno-strict-aliasing to the optimisation flags for gcc as discussed on wx-dev git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/configure b/configure index cf45e5214f..4b7e5c8a47 100755 --- a/configure +++ b/configure @@ -39394,7 +39394,7 @@ if test "$wxUSE_OPTIMISE" = "no" ; then fi else if test "$GCC" = yes ; then - OPTIMISE_CFLAGS="-O2" + OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing" else OPTIMISE_CFLAGS="-O" fi diff --git a/configure.in b/configure.in index 34f53337e8..cd9eb836ca 100644 --- a/configure.in +++ b/configure.in @@ -5147,7 +5147,10 @@ if test "$wxUSE_OPTIMISE" = "no" ; then fi else if test "$GCC" = yes ; then - OPTIMISE_CFLAGS="-O2" + dnl Switch on optimisation but keep strict-aliasing off for now (see + dnl -fstrict-aliasing in the gcc manual). When it is switched back on + dnl consider using -Wstrict-aliasing=2. + OPTIMISE_CFLAGS="-O2 -fno-strict-aliasing" else OPTIMISE_CFLAGS="-O" fi