Commit f73c82a7 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

configure.ac : Erase default -O2 when setting -O3.

Previously CFLAGS had a -O3 at the start and a -O2 at the end. According
to the GCC docs:

    https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Optimize-Options.html

    "If you use multiple -O options, with or without level numbers,
    the last such option is the one that is effective" which means that
    GCC doesn't try to use SIMD to vectorize the code, etc."
parent 221bdc40
...@@ -379,16 +379,18 @@ fi ...@@ -379,16 +379,18 @@ fi
if test "x$debug" = xtrue; then if test "x$debug" = xtrue; then
CPPFLAGS="-DDEBUG $CPPFLAGS" CPPFLAGS="-DDEBUG $CPPFLAGS"
CFLAGS=$(echo "$CFLAGS" | sed 's/-g//')
CFLAGS="-g $CFLAGS" CFLAGS="-g $CFLAGS"
else else
CPPFLAGS="-DNDEBUG $CPPFLAGS" CPPFLAGS="-DNDEBUG $CPPFLAGS"
CFLAGS="-O3 -funroll-loops -Wall -W -Winline $CFLAGS" CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
CFLAGS="-O3 -funroll-loops $CFLAGS"
fi fi
XIPH_GCC_VERSION XIPH_GCC_VERSION
if test x$ac_cv_c_compiler_gnu = xyes ; then if test x$ac_cv_c_compiler_gnu = xyes ; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment