From: Richard Guenther Date: Wed, 1 Feb 2006 10:30:43 +0000 (+0000) Subject: re PR bootstrap/26055 (libgcc-math declaration of __isinf conflicts with system heade... X-Git-Tag: releases/gcc-4.2.0~4486 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=36cbd091c564540e008703e1abc1707194beb5b4;p=gcc.git re PR bootstrap/26055 (libgcc-math declaration of __isinf conflicts with system header, fails bootstrap) 2006-02-01 Richard Guenther PR bootstrap/26055 * configure.ac: Disable libgcc-math if we cannot mix declaration of __isinf and math.h inclusion. * configure: Re-generate. From-SVN: r110469 --- diff --git a/libgcc-math/ChangeLog b/libgcc-math/ChangeLog index b9f9a21231af..f36e1cca94bc 100644 --- a/libgcc-math/ChangeLog +++ b/libgcc-math/ChangeLog @@ -1,3 +1,10 @@ +2006-02-01 Richard Guenther + + PR bootstrap/26055 + * configure.ac: Disable libgcc-math if we cannot mix + declaration of __isinf and math.h inclusion. + * configure: Re-generate. + 2006-01-31 Richard Guenther Paolo Bonzini diff --git a/libgcc-math/configure b/libgcc-math/configure index 1480acf92228..43833fa02dcd 100755 --- a/libgcc-math/configure +++ b/libgcc-math/configure @@ -4573,6 +4573,73 @@ else fi +# Check for target library dependencies +cannot_build=no + +echo "$as_me:$LINENO: checking whether math.h conflicts with defining __isinf" >&5 +echo $ECHO_N "checking whether math.h conflicts with defining __isinf... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include "math.h" +int __isinf (double x) +{ +} + +int +main () +{ + +return __isinf (1.0); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cannot_build=yes + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + # Now check which parts we include in the library. arch_subdirs= @@ -4590,6 +4657,9 @@ esac +if test "$cannot_build" = "yes"; then + arch_subdirs= +fi if test "x$arch_subdirs" != x; then diff --git a/libgcc-math/configure.ac b/libgcc-math/configure.ac index 392855255d1d..7fa9e72ef34b 100644 --- a/libgcc-math/configure.ac +++ b/libgcc-math/configure.ac @@ -124,6 +124,25 @@ else fi +# Check for target library dependencies +cannot_build=no + +AC_MSG_CHECKING([whether math.h conflicts with defining __isinf]) +AC_TRY_LINK([ +#include "math.h" +int __isinf (double x) +{ +} +], [ +return __isinf (1.0); +], [ +AC_MSG_RESULT([no]) +], [ +AC_MSG_RESULT([yes]) +cannot_build=yes +]) + + # Now check which parts we include in the library. arch_subdirs= @@ -141,6 +160,9 @@ esac AC_SUBST(arch_subdirs) AC_SUBST(arch_libraries) AC_SUBST(arch_maps) +if test "$cannot_build" = "yes"; then + arch_subdirs= +fi AM_CONDITIONAL(BUILD_LIBGCC_MATH, [test "x$arch_subdirs" != x])