]> git.sesse.net Git - stockfish/commitdiff
Workaround optimization bug in gcc
authorMarco Costalba <mcostalba@gmail.com>
Sat, 26 Dec 2009 18:24:42 +0000 (19:24 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 26 Dec 2009 18:39:13 +0000 (19:39 +0100)
Unfortunatly we need to slow down to -O1 to be sure
it works always.

Note that sometime it works also with -O2 or even -O3,
but user has to try himself.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/Makefile

index 1388f465fd49a0c00e1a52c3bec993aebfafe8b1..d5a72b66f5a5a829c98ca7270687e26a1a906c06 100644 (file)
@@ -25,8 +25,11 @@ EXE = stockfish
 ### ==========================================================================
 ### Compiler speed switches for both GCC and ICC. These settings are generally
 ### fast on a broad range of systems, but may be changed experimentally
+###
+### NOTE: Some versions of gcc miscompile value.h with -O2 or -O3, this is the
+### safe setup, try changing to -O3 or -O2 and verify it works for you.
 ### ==========================================================================
-GCCFLAGS = -O3 -msse
+GCCFLAGS = -O1 -msse
 ICCFLAGS = -fast -msse
 ICCFLAGS-OSX = -fast -mdynamic-no-pic