]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - makefile.inc
Disable unsupported compiler optimization if CC=clang
[xonotic/darkplaces.git] / makefile.inc
index 9bcac1732cb0b17ebc4a0ff6b8c8f462389e9020..b43af1b07889349444e13afd704b5126b64cce85 100644 (file)
@@ -22,7 +22,11 @@ CC?=gcc
 # Experimental
 #CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-signaling-nans -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math
 # Normal
-CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-signaling-nans -fno-trapping-math
+ifeq ($(CC), clang)
+       CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-trapping-math
+else
+       CPUOPTIMIZATIONS?=-fno-math-errno -fno-rounding-math -fno-signaling-nans -fno-trapping-math
+endif
 # NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
 # Also, since gcc 5, -ffinite-math-only makes NaN and zero compare equal inside engine code but not inside QC, which causes error spam for seemingly valid QC code like if (x != 0) return 1 / x;