Replace '-Ofast', being deprecated in some compilers, with '-O3 -ffast-math'

This commit is contained in:
Olli 2025-02-23 13:00:17 +02:00
parent 5dede763ff
commit 16956b94b9
2 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,8 @@ else()
if(EMSCRIPTEN) if(EMSCRIPTEN)
list(APPEND COMPILE_OPTIONS -O3) list(APPEND COMPILE_OPTIONS -O3)
else() else()
list(APPEND COMPILE_OPTIONS -Ofast) # Apply -ffast-math to allow compiler autovectorization generate effective SIMD code for arm compilation
list(APPEND COMPILE_OPTIONS -O3 -ffast-math)
endif() endif()
endif() endif()

View File

@ -31,9 +31,8 @@ AC_DISABLE_STATIC dnl This makes libtool only build shared libs
AC_LANG(C++) AC_LANG(C++)
# Compiler flags. Apply -Ofast (implies -O3 -ffast-math) to allow gcc autovectorization # Compiler flags. Apply -ffast-math to allow compiler autovectorization generate effective SIMD code for arm compilation
# generate effective SIMD code. CXXFLAGS="${CXXFLAGS} -O3 -ffast-math -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas"
CXXFLAGS="${CXXFLAGS} -Ofast -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas"
# Set AR_FLAGS to avoid build warning "ar: `u' modifier ignored since `D' is the default (see `U')" # Set AR_FLAGS to avoid build warning "ar: `u' modifier ignored since `D' is the default (see `U')"
AR_FLAGS='cr' AR_FLAGS='cr'