Commit ea94227e authored by Christophe Massiot's avatar Christophe Massiot
Browse files

* Tuned up optimization flags.

parent 419eb2fe
......@@ -106,10 +106,9 @@ endif
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
CFLAGS += -O6
CFLAGS += -ffast-math -funroll-loops -funroll-all-loops
CFLAGS += -O3
CFLAGS += -ffast-math -funroll-loops
CFLAGS += -fomit-frame-pointer
CFLAGS += @BIZARRE_OPTIMS@
# Optimizations for x86 familiy
ifneq (,$(findstring 86,$(ARCH)))
......
......@@ -2974,41 +2974,18 @@ else
fi
rm -f conftest*
CFLAGS="${CFLAGS} -fargument-noalias-global -fstrict-aliasing"
echo $ac_n "checking if \$CC accepts -fstrict-aliasing""... $ac_c" 1>&6
echo "configure:2980: checking if \$CC accepts -fstrict-aliasing" >&5
cat > conftest.$ac_ext <<EOF
#line 2982 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
BIZARRE_OPTIMS="-fstrict-aliasing"
echo "$ac_t""yes" 1>&6
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
echo "$ac_t""no" 1>&6
fi
rm -f conftest*
CFLAGS="${CFLAGS} -rdynamic"
echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
echo "configure:3003: checking if \$CC accepts -rdynamic" >&5
echo "configure:2980: checking if \$CC accepts -rdynamic" >&5
cat > conftest.$ac_ext <<EOF
#line 3005 "configure"
#line 2982 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:3012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
DYNAMIC_FLAG="-rdynamic"
echo "$ac_t""yes" 1>&6
......@@ -3023,9 +3000,9 @@ rm -f conftest*
CFLAGS=$save_CFLAGS
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
echo "configure:3027: checking for boolean_t in sys/types.h" >&5
echo "configure:3004: checking for boolean_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
#line 3029 "configure"
#line 3006 "configure"
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
......@@ -3033,7 +3010,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:3037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_H 1
......@@ -3049,12 +3026,12 @@ fi
rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:3053: checking for working const" >&5
echo "configure:3030: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3058 "configure"
#line 3035 "configure"
#include "confdefs.h"
int main() {
......@@ -3103,7 +3080,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:3107: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -3124,12 +3101,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:3128: checking for ANSI C header files" >&5
echo "configure:3105: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3133 "configure"
#line 3110 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
......@@ -3137,7 +3114,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3154,7 +3131,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3158 "configure"
#line 3135 "configure"
#include "confdefs.h"
#include <string.h>
EOF
......@@ -3172,7 +3149,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 3176 "configure"
#line 3153 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
......@@ -3193,7 +3170,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 3197 "configure"
#line 3174 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
......@@ -3204,7 +3181,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
......@@ -3228,12 +3205,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:3232: checking for size_t" >&5
echo "configure:3209: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3237 "configure"
#line 3214 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -3261,12 +3238,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3265: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3242: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3270 "configure"
#line 3247 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -3275,7 +3252,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -3300,17 +3277,17 @@ for ac_hdr in sys/ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3304: checking for $ac_hdr" >&5
echo "configure:3281: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3309 "configure"
#line 3286 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3340,17 +3317,17 @@ for ac_hdr in sys/dvdio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3344: checking for $ac_hdr" >&5
echo "configure:3321: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3349 "configure"
#line 3326 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3380,17 +3357,17 @@ for ac_hdr in linux/cdrom.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3384: checking for $ac_hdr" >&5
echo "configure:3361: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3389 "configure"
#line 3366 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3417,7 +3394,7 @@ fi
done
cat > conftest.$ac_ext <<EOF
#line 3421 "configure"
#line 3398 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -3567,17 +3544,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3571: checking for sys/asoundlib.h" >&5
echo "configure:3548: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3576 "configure"
#line 3553 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -3594,7 +3571,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:3598: checking for main in -lasound" >&5
echo "configure:3575: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -3602,14 +3579,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3606 "configure"
#line 3583 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......
......@@ -78,13 +78,6 @@ void foo() { int meuh; ntohl(meuh); }],,
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if ntohl is in <sys/param.h>.)
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl Check for special optimization flags
CFLAGS="${CFLAGS} -fargument-noalias-global -fstrict-aliasing"
AC_MSG_CHECKING([if \$CC accepts -fstrict-aliasing])
AC_TRY_COMPILE([],,
BIZARRE_OPTIMS="-fstrict-aliasing"
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
dnl Check for -rdynamic flag
CFLAGS="${CFLAGS} -rdynamic"
AC_MSG_CHECKING([if \$CC accepts -rdynamic])
......
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