configure: remove --enable-profile

The --enable-profile switch simply adds -p to the CFLAGS, which enables
gcc's extremely worthless "prof" profiling support. This kind of
profiling is broken on the conceptual level and thus harmful, and even
if you want it, you can enable it manually with --extra-cflags.

Also remove $_march $_mcpu from the CFLAGS code. These variables were
always unset, as the code setting them has been removed earlier.
This commit is contained in:
wm4 2012-11-15 14:34:34 +01:00
parent d7de05f6c1
commit 52fe0a4fe2
1 changed files with 4 additions and 11 deletions

15
configure vendored
View File

@ -387,7 +387,6 @@ Miscellaneous options:
Advanced options: Advanced options:
--enable-shm enable shm [autodetect] --enable-shm enable shm [autodetect]
--enable-debug[=1-3] compile-in debugging information [disable] --enable-debug[=1-3] compile-in debugging information [disable]
--enable-profile compile-in profiling information [disable]
Use these options if autodetection fails: Use these options if autodetection fails:
--extra-cflags=FLAGS extra CFLAGS --extra-cflags=FLAGS extra CFLAGS
@ -561,12 +560,6 @@ for ac_option do
--disable-static) --disable-static)
_ld_static='' _ld_static=''
;; ;;
--enable-profile)
_profile='-p'
;;
--disable-profile)
_profile=
;;
--enable-debug) --enable-debug)
_debug='-g' _debug='-g'
_opt= _opt=
@ -1128,16 +1121,16 @@ cflag_check -pipe -I. && _pipe="-pipe" && echores "yes" || echores "no"
# Checking for CFLAGS # Checking for CFLAGS
if test -z "$CFLAGS" ; then if test -z "$CFLAGS" ; then
if test "$cc_vendor" = "intel" ; then if test "$cc_vendor" = "intel" ; then
CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe -fomit-frame-pointer" CFLAGS="$_opt $_debug $_pipe -fomit-frame-pointer"
WARNFLAGS="-wd167 -wd556 -wd144" WARNFLAGS="-wd167 -wd556 -wd144"
elif test "$cc_vendor" = "clang"; then elif test "$cc_vendor" = "clang"; then
CFLAGS="$_opt $_debug $_profile $_march $_pipe" CFLAGS="$_opt $_debug $_pipe"
WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes" WARNFLAGS="-Wall -Wno-switch -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
ERRORFLAGS="-Werror=implicit-function-declaration" ERRORFLAGS="-Werror=implicit-function-declaration"
elif test "$cc_vendor" != "gnu" ; then elif test "$cc_vendor" != "gnu" ; then
CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe" CFLAGS="$_opt $_debug $_pipe"
else else
CFLAGS="$_opt $_debug $_profile $_march $_mcpu $_pipe -ffast-math -fomit-frame-pointer" CFLAGS="$_opt $_debug $_pipe -ffast-math -fomit-frame-pointer"
WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls" WARNFLAGS="-Wall -Wno-switch -Wno-parentheses -Wpointer-arith -Wredundant-decls"
ERRORFLAGS="-Werror-implicit-function-declaration" ERRORFLAGS="-Werror-implicit-function-declaration"
extra_ldflags="$extra_ldflags -ffast-math" extra_ldflags="$extra_ldflags -ffast-math"