]> git.saurik.com Git - wxWidgets.git/commitdiff
Add -fno-strict-aliasing to the optimisation flags for gcc as discussed on wx-dev
authorMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 12 Feb 2006 01:55:41 +0000 (01:55 +0000)
committerMichael Wetherell <mike.wetherell@ntlworld.com>
Sun, 12 Feb 2006 01:55:41 +0000 (01:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in

index cf45e5214ff619b1134eea9a7a715678f3d07d8b..4b7e5c8a4701eadc4d7ba0c1e7d193a714306c88 100755 (executable)
--- 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
index 34f53337e82c8fd94c1f0226bdfdf996bb1bb516..cd9eb836ca37b55c87fafeb70399068e8b7f55fb 100644 (file)
@@ -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