Commit 13e78d81 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove code size optimization

Optimizing VLC code for size is probably not such a great idea,
considering that media playback is performance critical. There are
better ways to reduce code size than -Os, e.g. Thumb(2) code on ARM.

And of course, removing unneeded plugins and feature is the best way
to reduce code size.
parent dcdf7a64
......@@ -986,24 +986,6 @@ RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast
RDC_PROG_CC_FLAGS([-pipe])
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
[ac_cv_c_os],
[CFLAGS="${CFLAGS_save} -Os"
AC_TRY_COMPILE([],,ac_cv_c_os=yes, ac_cv_c_os=no)])
if test "${ac_cv_c_os}" != "no"; then
CFLAGS_OPTIM_SIZE="${CFLAGS_OPTIM_SIZE} -Os"
else
AC_CACHE_CHECK([if \$CC accepts -O],
[ac_cv_c_o],
[CFLAGS="${CFLAGS_save} -O"
AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
if test "${ac_cv_c_o}" != "no"; then
if test "${ac_cv_c_o3}" = "no"; then
CFLAGS_OPTIM_SIZE="${CFLAGS_OPTIM_SIZE} -O"
fi
fi
fi
AC_CACHE_CHECK([if \$CC accepts -O4],
[ac_cv_c_o4],
[CFLAGS="${CFLAGS_save} -O4"
......@@ -1549,11 +1531,7 @@ AC_ARG_ENABLE(optimizations,
[AS_HELP_STRING([--disable-optimizations],
[disable compiler optimizations (default enabled)])])
if test "${enable_optimizations}" != "no"; then
if test "${enable_optimize_memory}" = "yes"; then
enable_optimizations="size"
else
enable_optimizations="speed"
fi
enable_optimizations="speed"
fi
dnl
......
......@@ -99,7 +99,6 @@ AC_DEFUN([VLC_OUTPUT_VLC_CONFIG_IN], [
-e "s/@PLUGINS@/${PLUGINS}/" \
-e "s/@BUILTINS@/${BUILTINS}/" \
-e "s/@CFLAGS_TUNING@/${CFLAGS_TUNING}/" \
-e "s/@CFLAGS_OPTIM_SIZE@/${CFLAGS_OPTIM_SIZE}/" \
-e "s/@CFLAGS_OPTIM_SPEED@/${CFLAGS_OPTIM_SPEED}/" \
-e "s/@CFLAGS_OPTIM_NODEBUG@/${CFLAGS_OPTIM_NODEBUG}/" \
-e "s/@CFLAGS_NOOPTIM@/${CFLAGS_NOOPTIM}/" \
......
......@@ -21,7 +21,6 @@ ldflags=""
libs=""
cflags_tuning="@CFLAGS_TUNING@"
cflags_optim_size="@CFLAGS_OPTIM_SIZE@"
cflags_optim_speed="@CFLAGS_OPTIM_SPEED@"
cflags_optim_nodebug="@CFLAGS_OPTIM_NODEBUG@"
cflags_nooptim="@CFLAGS_NOOPTIM@"
......@@ -102,16 +101,7 @@ if [ "${gprof}" = yes ]; then
objcflags="${objcflags} -pg"
ldflags="${ldflags} -pg"
fi
if [ "${optim}" = size ]; then
cflags="${cflags} ${cflags_optim_size} ${cflags_tuning}"
cxxflags="${cxxflags} ${cflags_optim_size} ${cflags_tuning}"
objcflags="${objcflags} ${cflags_optim_size} ${cflags_tuning}"
if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
cflags="${cflags} ${cflags_optim_nodebug}"
cxxflags="${cxxflags} ${cflags_optim_nodebug}"
objcflags="${objcflags} ${cflags_optim_nodebug}"
fi
elif [ "${optim}" = speed ]; then
if [ "${optim}" = speed ]; then
cflags="${cflags} ${cflags_optim_speed} ${cflags_tuning}"
cxxflags="${cxxflags} ${cflags_optim_speed} ${cflags_tuning}"
objcflags="${objcflags} ${cflags_optim_speed} ${cflags_tuning}"
......
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