From: bones_was_here Date: Fri, 8 Dec 2023 07:08:44 +0000 (+1000) Subject: build: enable strict aliasing optimisations X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ebad737eea219e414ca6d912af13e9f92fa4019;p=xonotic%2Fdarkplaces.git build: enable strict aliasing optimisations Extensive code quality improvements have been made since this was last tried, and compilers are smarter with better warnings now. This doesn't change the Xonotic pipeline gameplay hash so it's highly unlikely to cause any subtle regressions. Signed-off-by: bones_was_here --- diff --git a/makefile.inc b/makefile.inc index ff2a68df..d68421fe 100644 --- a/makefile.inc +++ b/makefile.inc @@ -201,7 +201,8 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O3 -fno-strict-aliasing $(CPUOPTIMIZATIONS) -OPTIM_RELEASE=-O3 -fno-strict-aliasing -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS) +#OPTIM_RELEASE=-O3 -fno-strict-aliasing -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS) +OPTIM_RELEASE=-O3 -fno-math-errno -fno-trapping-math $(CPUOPTIMIZATIONS) # 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;