[vlc-devel] [PATCH] configure: remove O4 compiler optimization level test

Sean McGovern gseanmcg at gmail.com
Sun Nov 9 06:39:35 CET 2014


It is not a documented optimization level for gcc or clang.
This makes building with clang significantly less spammy.
---
 configure.ac | 29 ++++++++---------------------
 1 file changed, 8 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 620d49a..8bd34f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -955,33 +955,20 @@ AC_ARG_ENABLE(optimizations,
 dnl Check for various optimization flags
 AS_IF([test "${enable_optimizations}" != "no"], [
 
-  dnl -O4 and -O3 only in production builds
+  dnl -O3 only in production builds
   AS_IF([test "${enable_debug}" = "no"], [
     VLC_SAVE_FLAGS
-    CFLAGS="${CFLAGS} -O4"
-    CXXFLAGS="${CXXFLAGS} -O4"
-    OBJCFLAGS="${OBJCFLAGS} -O4"
-    AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
+    CFLAGS="${CFLAGS} -O3"
+    CXXFLAGS="${CXXFLAGS} -O3"
+    OBJCFLAGS="${OBJCFLAGS} -O3"
+    AC_CACHE_CHECK([if $CC accepts -O3],  [ac_cv_c_o3], [
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
-        ac_cv_c_o4=yes
+        ac_cv_c_o3=yes
       ], [
-        ac_cv_c_o4=no
+        ac_cv_c_o3=no
       ])
     ])
-    AS_IF([test "${ac_cv_c_o4}" = "no"], [
-      VLC_RESTORE_FLAGS
-      CFLAGS="${CFLAGS} -O3"
-      CXXFLAGS="${CXXFLAGS} -O3"
-      OBJCFLAGS="${OBJCFLAGS} -O3"
-      AC_CACHE_CHECK([if $CC accepts -O3],  [ac_cv_c_o3], [
-        AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
-          ac_cv_c_o3=yes
-        ], [
-          ac_cv_c_o3=no
-        ])
-      ])
-      AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
-    ])
+    AS_IF([test "${ac_cv_c_o3}" = "no"], [VLC_RESTORE_FLAGS])
   ])
 
   dnl Check for -ffast-math
-- 
1.9.3 (Apple Git-50)




More information about the vlc-devel mailing list