From b1d861c206c5222e8bfbd7cc5bcca0f8fc46f513 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 15 Oct 1999 02:51:08 +0000 Subject: [PATCH] Workaround for glibc 2.0/2.1 hand-rolled assembly inlines bug. Disable inlines with -D__NO_MATH_INLINES Monty svn path=/trunk/vorbis/; revision=150 --- configure | 128 ++++++++++++++++++++++++++++++----------------------------- configure.in | 22 +++++----- 2 files changed, 79 insertions(+), 71 deletions(-) diff --git a/configure b/configure index 070f6e9..be2a2f3 100755 --- a/configure +++ b/configure @@ -928,24 +928,28 @@ if test -z "$GCC"; then PROFILE="-g -p" ;; esac else + +# -D__NO_MATH_INLINES avoids some serious FP assembly related bugs in +# glibc 2.0/2.1 + case $host in i?86-*-linux*) - DEBUG="-g -Wall -fsigned-char" - OPT="-O20 -ffast-math -fsigned-char" + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" + OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char" PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char";; sparc-sun-*) - DEBUG="-g -Wall -fsigned-char -mv8" - OPT="-O20 -ffast-math -fsigned-char -mv8" - PROFILE="-pg -g -O20 -fsigned-char -mv8" ;; + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8" + OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" + PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; *) - DEBUG="-g -Wall -fsigned-char" - OPT="-O20 -fsigned-char" - PROFILE="-O20 -g -pg -fsigned-char" ;; + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" + OPT="-O20 -D__NO_MATH_INLINES -fsigned-char" + PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; esac fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:949: checking how to run the C preprocessor" >&5 +echo "configure:953: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -960,13 +964,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:974: \"$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 : @@ -977,13 +981,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:991: \"$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 : @@ -994,13 +998,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1008: \"$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 : @@ -1025,12 +1029,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1029: checking for ANSI C header files" >&5 +echo "configure:1033: 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 < #include @@ -1038,7 +1042,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1046: \"$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* @@ -1055,7 +1059,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 @@ -1073,7 +1077,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 @@ -1094,7 +1098,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1105,7 +1109,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1133,7 +1137,7 @@ CFLAGS="" echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:1137: checking for pthread_create in -lpthread" >&5 +echo "configure:1141: checking for pthread_create in -lpthread" >&5 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1141,7 +1145,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1160: \"$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 @@ -1223,7 +1227,7 @@ dummy="__noconf" TYPESIZES="" echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1227: checking size of short" >&5 +echo "configure:1231: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1231,7 +1235,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1242,7 +1246,7 @@ main() exit(0); } EOF -if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1262,7 +1266,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1266: checking size of int" >&5 +echo "configure:1270: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1270,7 +1274,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1281,7 +1285,7 @@ main() exit(0); } EOF -if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1301,7 +1305,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1305: checking size of long" >&5 +echo "configure:1309: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1309,7 +1313,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1320,7 +1324,7 @@ main() exit(0); } EOF -if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1340,7 +1344,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:1344: checking size of long long" >&5 +echo "configure:1348: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1348,7 +1352,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1359,7 +1363,7 @@ main() exit(0); } EOF -if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -1416,12 +1420,12 @@ if test -z "$SIZE64"; then fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:1420: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:1424: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1437,7 +1441,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -1461,17 +1465,17 @@ for ac_hdr in fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1465: checking for $ac_hdr" >&5 +echo "configure:1469: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1479: \"$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* @@ -1499,12 +1503,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1503: checking for working const" >&5 +echo "configure:1507: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1574,12 +1578,12 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1578: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1582: 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 < #include @@ -1588,7 +1592,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1609,12 +1613,12 @@ EOF fi echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1613: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:1617: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1622,7 +1626,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -1644,7 +1648,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1648: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1652: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1671,7 +1675,7 @@ else fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:1675: checking for 8-bit clean memcmp" >&5 +echo "configure:1679: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1679,7 +1683,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -1707,12 +1711,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:1711: checking return type of signal handlers" >&5 +echo "configure:1715: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1729,7 +1733,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -1750,12 +1754,12 @@ EOF for ac_func in gettimeofday select strcspn strerror strspn sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1754: checking for $ac_func" >&5 +echo "configure:1758: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else diff --git a/configure.in b/configure.in index 2129136..71a2332 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.4 1999/10/13 03:52:39 xiphmont Exp $ +# $Id: configure.in,v 1.5 1999/10/15 02:51:07 xiphmont Exp $ AC_INIT(lib/mdct.c) #AC_CONFIG_HEADER(config.h) @@ -42,19 +42,23 @@ if test -z "$GCC"; then PROFILE="-g -p" ;; esac else + +# -D__NO_MATH_INLINES avoids some serious FP assembly related bugs in +# glibc 2.0/2.1 + case $host in i?86-*-linux*) - DEBUG="-g -Wall -fsigned-char" - OPT="-O20 -ffast-math -fsigned-char" + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" + OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char" PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char";; sparc-sun-*) - DEBUG="-g -Wall -fsigned-char -mv8" - OPT="-O20 -ffast-math -fsigned-char -mv8" - PROFILE="-pg -g -O20 -fsigned-char -mv8" ;; + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8" + OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8" + PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;; *) - DEBUG="-g -Wall -fsigned-char" - OPT="-O20 -fsigned-char" - PROFILE="-O20 -g -pg -fsigned-char" ;; + DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char" + OPT="-O20 -D__NO_MATH_INLINES -fsigned-char" + PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;; esac fi -- 2.7.4