diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-04-19 17:05:50 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2012-04-19 17:05:50 +0300 |
commit | e48c6f446c4de708dd9d3b47d3479620208f7430 (patch) | |
tree | be1fcf1cb17674d452450c713e60b15a4cce1a64 | |
parent | deffd15a056f98bbe1bc34ce87dea0b4a530d61d (diff) | |
download | mpv-e48c6f446c4de708dd9d3b47d3479620208f7430.tar.bz2 mpv-e48c6f446c4de708dd9d3b47d3479620208f7430.tar.xz |
configure: --enable-debug: don't change other compiler flags
The --enable-debug and --enable-profile options set their own compiler
flags, completely different from normal flag selection. These flags
sucked; especially '-W' (an obsolete alias for '-Wextra') generated a
huge number of irrelevant warnings. Change configure to only add "-g"
or similar to the flags that would be used otherwise.
-rwxr-xr-x | configure | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -2310,23 +2310,22 @@ fi # if darwin && test "$cc_vendor" = "gnu" ; then # Checking for CFLAGS _install_strip="-s" if test "$_profile" != "" || test "$_debug" != "" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe $_debug $_profile" - WARNFLAGS="-W -Wall" _install_strip= -elif test -z "$CFLAGS" ; then +fi +if test -z "$CFLAGS" ; then if test "$cc_vendor" = "intel" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer" WARNFLAGS="-wd167 -wd556 -wd144" elif test "$cc_vendor" = "sun" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -xc99 -xregs=frameptr" elif test "$cc_vendor" = "clang"; then - CFLAGS="-O2 $_march $_pipe" + CFLAGS="-O2 $_debug $_profile $_march $_pipe" WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes" ERRORFLAGS="-Werror=implicit-function-declaration" elif test "$cc_vendor" != "gnu" ; then - CFLAGS="-O2 $_march $_mcpu $_pipe" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe" else - CFLAGS="-O2 $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" + CFLAGS="-O2 $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" ERRORFLAGS="-Werror-implicit-function-declaration" extra_ldflags="$extra_ldflags -ffast-math" @@ -6844,12 +6843,8 @@ $def_yasm #define HAVE_INLINE_ASM 1 -/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ -#ifndef MP_DEBUG +/* Use these registers in x86 inline asm. No proper detection yet. */ #define HAVE_EBP_AVAILABLE 1 -#else -#define HAVE_EBP_AVAILABLE 0 -#endif #endif /* MPLAYER_CONFIG_H */ EOF |