SHA256
1
0
forked from pool/soundtouch
soundtouch/disable-ffast-math.patch
Takashi Iwai 763e909e61 Accepting request 1174047 from home:ateixeira:branches:multimedia:libs
- Update to 2.3.3:
  * Fixing compiler warnings, maintenance fixes to make/build files
    for various systems
- Refresh disable-ffast-math.patch

OBS-URL: https://build.opensuse.org/request/show/1174047
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/soundtouch?expand=0&rev=45
2024-05-15 08:39:04 +00:00

38 lines
1.3 KiB
Diff

-ffast-math changes the floating point rounding mode globally, which
is undesirable for shared libraries.
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522
for details.
Index: b/CMakeLists.txt
===================================================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,12 +9,7 @@ set(COMPILE_OPTIONS)
if(MSVC)
set(COMPILE_DEFINITIONS /O2 /fp:fast)
else()
- list(APPEND COMPILE_OPTIONS -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas)
- if(EMSCRIPTEN)
- list(APPEND COMPILE_OPTIONS -O3)
- else()
- list(APPEND COMPILE_OPTIONS -Ofast)
- endif()
+ list(APPEND COMPILE_OPTIONS -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas -O2)
endif()
#####################
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@ AC_LANG(C++)
# Compiler flags. Apply -Ofast (implies -O3 -ffast-math) to allow gcc autovectorization
# generate effective SIMD code.
-CXXFLAGS="${CXXFLAGS} -Ofast -Wall -Wextra -Wzero-as-null-pointer-constant -Wno-unknown-pragmas"
+CXXFLAGS="${CXXFLAGS} -O2 -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')"
AR_FLAGS='cr'