[vlc-commits] configure: check only for adequate math optimizations (fix #16907)
Rémi Denis-Courmont
git at videolan.org
Wed Aug 24 12:51:41 CEST 2016
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 24 12:49:05 2016 +0200| [d5427879e56147bc9c7316d3cbb757ec013624c1] | committer: Hugo Beauzée-Luyssen
configure: check only for adequate math optimizations (fix #16907)
Manually cherry-picked from 273ec260a1f1912d39c2180db642f24127b8f6b7
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=d5427879e56147bc9c7316d3cbb757ec013624c1
---
configure.ac | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index e663f99..cb1de25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -981,24 +981,15 @@ AS_IF([test "${enable_optimizations}" != "no"], [
])
])
- dnl Check for -ffast-math
- VLC_SAVE_FLAGS
- CFLAGS="${CFLAGS} -ffast-math"
- CXXFLAGS="${CXXFLAGS} -ffast-math"
- OBJCFLAGS="${OBJCFLAGS} -ffast-math"
- AC_CACHE_CHECK([if $CC accepts -ffast-math], [ac_cv_c_fast_math], [
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
- ac_cv_c_fast_math=yes
- ], [
- ac_cv_c_fast_math=no
- ])
- ])
- AS_IF([test "${ac_cv_c_fast_math}" = "no"], [VLC_RESTORE_FLAGS])
- AH_BOTTOM([
-#ifndef __FAST_MATH__
+ dnl Check for fast maths
+ RDC_PROG_CC_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
+ AC_LANG_PUSH(C++)
+ RDC_PROG_CXX_FFLAGS([no-math-errno unsafe-math-optimizations no-rounding-math no-signaling-nans cx-limited-range])
+ AC_LANG_POP
+
+AH_BOTTOM([
# pragma STDC FENV_ACCESS OFF
# pragma STDC FP_CONTRACT ON
-#endif
])
dnl Check for -funroll-loops
More information about the vlc-commits
mailing list