summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2007-10-03 14:16:57 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2007-10-03 14:16:57 +0000
commitb6f914f633d45a1f8cae627a52f60f20d6fdf021 (patch)
tree5cd207e557ef35d5ff0fb9416fe61097d15d6d8d /config
parent6d2c26dec4f9bc41c92f25326cedb60509d2aa1a (diff)
downloadgcc-b6f914f633d45a1f8cae627a52f60f20d6fdf021.tar.gz
no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
config/ * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function. libstdc++-v3/ libstdc++/ * acinclude.m4 (GLIBCXX_ENABLE_C99): Temporarily add -fno-exceptions to CXXFLAGS. Use GCC_TRY_COMPILE_OR_LINK. Make the tests assign results to volatile variables. Use -lm for link tests in GCC_TRY_COMPILE_OR_LINK. Fall back to compile-only tests if -lm is not available. * configure: Regenerate. From-SVN: r128982
Diffstat (limited to 'config')
-rw-r--r--config/ChangeLog5
-rw-r--r--config/no-executables.m48
2 files changed, 13 insertions, 0 deletions
diff --git a/config/ChangeLog b/config/ChangeLog
index 089fc82b2d7..add98751de9 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-03 Richard Sandiford <richard@codesourcery.com>
+
+ * no-executables.m4 (GCC_TRY_COMPILE_OR_LINK): New function.
+ libstdc++-v3/
+
2007-10-03 Kazu Hirata <kazu@codesourcery.com>
Revert:
diff --git a/config/no-executables.m4 b/config/no-executables.m4
index 54e5a024288..c4d0b70c375 100644
--- a/config/no-executables.m4
+++ b/config/no-executables.m4
@@ -59,3 +59,11 @@ fi)
m4_divert_pop()dnl
])# GCC_NO_EXECUTABLES
+
+# Use the strongest available test out of AC_TRY_COMPILE and AC_TRY_LINK.
+AC_DEFUN([GCC_TRY_COMPILE_OR_LINK],
+[if test x$gcc_no_link = xyes; then
+ AC_TRY_COMPILE([$1], [$2], [$3], [$4])
+else
+ AC_TRY_LINK([$1], [$2], [$3], [$4])
+fi])