]> git.unchartedbackwaters.co.uk Git - francis/stp.git/commitdiff
Conditionally enable -march=native, since it doesn't work in GCC on OS X.
authorkhooyp <khooyp@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 11 Jan 2012 16:55:23 +0000 (16:55 +0000)
committerkhooyp <khooyp@e59a4935-1847-0410-ae03-e826735625c1>
Wed, 11 Jan 2012 16:55:23 +0000 (16:55 +0000)
git-svn-id: https://stp-fast-prover.svn.sourceforge.net/svnroot/stp-fast-prover/trunk/stp@1496 e59a4935-1847-0410-ae03-e826735625c1

scripts/Makefile.common

index 17e8051f6741339172e6f2fac759d98e2d1b105d..ee197e99294440232007098b4dbe159503b43359 100644 (file)
 
 -include $(TOP)/scripts/config.info
 
-OPTIMIZE      = -O3 -DNDEBUG -march=native -fomit-frame-pointer # Optimization
+# use -march=native if it works correctly (it's broken in GCC on OS X)
+ifeq ($(shell $(CXX) -march=native -E - < /dev/null >/dev/null 2>&1 && echo 1),1)
+    OPTIMIZE_MARCH_NATIVE = -march=native
+endif
+
+# Optimization
+OPTIMIZE      = -O3 -DNDEBUG -fomit-frame-pointer $(OPTIMIZE_MARCH_NATIVE)
 #OPTIMIZE      =  -O3 -g            # Debug
 
 # To enable 128-bit indices in the array propagators. Put the INDICES_128BITS