From fe32b79d7c46e7606192e5c990715d9aa956c5c3 Mon Sep 17 00:00:00 2001 From: green Date: Sat, 22 Jan 2000 21:15:58 +0000 Subject: [PATCH] * include/config.h.in: Rebuilt. * acconfig.h: Add undef for __NO_MATH_INLINES. * configure: Rebuilt. * configure.in: Add test for `g++ -O2 -ffloat-store' bug. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31566 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/acconfig.h | 3 ++ libjava/configure | 124 +++++++++++++++++++++++++++----------------- libjava/configure.in | 10 ++++ libjava/include/config.h.in | 3 ++ 4 files changed, 92 insertions(+), 48 deletions(-) diff --git a/libjava/acconfig.h b/libjava/acconfig.h index c7c62ee..8a73983 100644 --- a/libjava/acconfig.h +++ b/libjava/acconfig.h @@ -131,3 +131,6 @@ /* Define if libltdl is in use. */ #undef USE_LTDL + +/* Define if g++ has a bug preventing us from inlining math routines. */ +#undef __NO_MATH_INLINES diff --git a/libjava/configure b/libjava/configure index a6751a5..b015a69 100755 --- a/libjava/configure +++ b/libjava/configure @@ -4338,21 +4338,49 @@ echo "$ac_t""$use_fuse" 1>&6 +echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6 +echo "configure:4343: checking for g++ -ffloat-store bug" >&5 +save_CFLAGS="$CFLAGS" +CFLAGS="-x c++ -O2 -ffloat-store" +cat > conftest.$ac_ext < +int main() { + +; return 0; } +EOF +if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + echo "$ac_t""no" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define __NO_MATH_INLINES 1 +EOF + + echo "$ac_t""yes" 1>&6 +fi +rm -f conftest* +CFLAGS="$save_CFLAGS" + for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h sys/config.h inttypes.h stdint.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4346: checking for $ac_hdr" >&5 +echo "configure:4374: 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:4356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4384: \"$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* @@ -4382,17 +4410,17 @@ for ac_hdr in dirent.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4386: checking for $ac_hdr" >&5 +echo "configure:4414: 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:4396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4424: \"$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* @@ -4420,12 +4448,12 @@ done echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:4424: checking for ANSI C header files" >&5 +echo "configure:4452: 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 @@ -4433,7 +4461,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4465: \"$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* @@ -4450,7 +4478,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 @@ -4468,7 +4496,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 @@ -4489,7 +4517,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -4500,7 +4528,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -4524,12 +4552,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:4528: checking for ssize_t" >&5 +echo "configure:4556: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4558,9 +4586,9 @@ fi echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6 -echo "configure:4562: checking for in_addr_t" >&5 +echo "configure:4590: checking for in_addr_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4574,7 +4602,7 @@ int main() { in_addr_t foo; ; return 0; } EOF -if { (eval echo configure:4578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_IN_ADDR_T 1 @@ -4590,16 +4618,16 @@ fi rm -f conftest* echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6 -echo "configure:4594: checking whether struct ip_mreq is in netinet/in.h" >&5 +echo "configure:4622: checking whether struct ip_mreq is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct ip_mreq mreq; ; return 0; } EOF -if { (eval echo configure:4603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_IP_MREQ 1 @@ -4615,16 +4643,16 @@ fi rm -f conftest* echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6 -echo "configure:4619: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 +echo "configure:4647: checking whether struct sockaddr_in6 is in netinet/in.h" >&5 cat > conftest.$ac_ext < int main() { struct sockaddr_in6 addr6; ; return 0; } EOF -if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_INET6 1 @@ -4640,16 +4668,16 @@ fi rm -f conftest* echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6 -echo "configure:4644: checking for socklen_t in sys/socket.h" >&5 +echo "configure:4672: checking for socklen_t in sys/socket.h" >&5 cat > conftest.$ac_ext < int main() { socklen_t x = 5; ; return 0; } EOF -if { (eval echo configure:4653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SOCKLEN_T 1 @@ -4665,16 +4693,16 @@ fi rm -f conftest* echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:4669: checking for tm_gmtoff in struct tm" >&5 +echo "configure:4697: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < int main() { struct tm tim; tim.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:4678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define STRUCT_TM_HAS_GMTOFF 1 @@ -4687,16 +4715,16 @@ else rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 -echo "configure:4691: checking for global timezone variable" >&5 +echo "configure:4719: checking for global timezone variable" >&5 cat > conftest.$ac_ext < int main() { long z2 = timezone; ; return 0; } EOF -if { (eval echo configure:4700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 @@ -4716,19 +4744,19 @@ rm -f conftest* # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:4720: checking for working alloca.h" >&5 +echo "configure:4748: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -4749,12 +4777,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:4753: checking for alloca" >&5 +echo "configure:4781: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+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:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -4814,12 +4842,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:4818: checking whether alloca needs Cray hooks" >&5 +echo "configure:4846: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4848: checking for $ac_func" >&5 +echo "configure:4876: 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:4904: \"$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 @@ -4899,7 +4927,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:4903: checking stack direction for C alloca" >&5 +echo "configure:4931: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4907,7 +4935,7 @@ else ac_cv_c_stack_direction=0 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:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -4953,7 +4981,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4957: checking for $ac_word" >&5 +echo "configure:4985: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/libjava/configure.in b/libjava/configure.in index ed6e1a4..e8f17e8 100644 --- a/libjava/configure.in +++ b/libjava/configure.in @@ -624,6 +624,16 @@ AC_MSG_RESULT($use_fuse) AC_SUBST(AM_RUNTESTFLAGS) +dnl Work around a g++ bug. Reported to gcc-bugs@gcc.gnu.org on Jan 22, 2000. +AC_MSG_CHECKING([for g++ -ffloat-store bug]) +save_CFLAGS="$CFLAGS" +CFLAGS="-x c++ -O2 -ffloat-store" +AC_TRY_COMPILE([#include ], , + [AC_MSG_RESULT(no)], + [AC_DEFINE(__NO_MATH_INLINES) + AC_MSG_RESULT(yes)]) +CFLAGS="$save_CFLAGS" + dnl We check for sys/filio.h because Solaris 2.5 defines FIONREAD there. dnl On that system, sys/ioctl.h will not include sys/filio.h unless dnl BSD_COMP is defined; just including sys/filio.h is simpler. diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index 5265fc2..de92685 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -149,6 +149,9 @@ /* Define if libltdl is in use. */ #undef USE_LTDL +/* Define if g++ has a bug preventing us from inlining math routines. */ +#undef __NO_MATH_INLINES + /* Define if you have the access function. */ #undef HAVE_ACCESS -- 2.7.4