aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-02-01 10:30:43 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-02-01 10:30:43 +0000
commit36cbd091c564540e008703e1abc1707194beb5b4 (patch)
treec30e66a064809facf023ce1ded0881049b3b0adc
parent916b63c37110524381d529d8b82c9ef79615fc8b (diff)
downloadgcc-36cbd091c564540e008703e1abc1707194beb5b4.zip
gcc-36cbd091c564540e008703e1abc1707194beb5b4.tar.gz
gcc-36cbd091c564540e008703e1abc1707194beb5b4.tar.bz2
re PR bootstrap/26055 (libgcc-math declaration of __isinf conflicts with system header, fails bootstrap)
2006-02-01 Richard Guenther <rguenther@suse.de> 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
-rw-r--r--libgcc-math/ChangeLog7
-rwxr-xr-xlibgcc-math/configure70
-rw-r--r--libgcc-math/configure.ac22
3 files changed, 99 insertions, 0 deletions
diff --git a/libgcc-math/ChangeLog b/libgcc-math/ChangeLog
index b9f9a21..f36e1cc 100644
--- a/libgcc-math/ChangeLog
+++ b/libgcc-math/ChangeLog
@@ -1,3 +1,10 @@
+2006-02-01 Richard Guenther <rguenther@suse.de>
+
+ 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 <rguenther@suse.de>
Paolo Bonzini <bonzini@gnu.org>
diff --git a/libgcc-math/configure b/libgcc-math/configure
index 1480acf..43833fa 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 3928552..7fa9e72 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])