]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Disable unsupported compiler optimization if CC=clang
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 4 Jun 2020 16:03:45 +0000 (16:03 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 4 Jun 2020 16:03:45 +0000 (16:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12636 d7cf8633-e32d-0410-b094-e92efae38249

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;