summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2012-11-13 11:19:47 +0100
committerArun Sharma <asharma@fb.com>2012-11-24 21:37:07 -0800
commit10b064ffe902d5af31bb49bd8e4f03c545f8d462 (patch)
tree63525af53a8dd5e93fb7bf41517f3b6f65f181a9 /configure.ac
parentae3dd9417a3d178cf51ce744d85b695dbf025b44 (diff)
downloadlibunwind-10b064ffe902d5af31bb49bd8e4f03c545f8d462.tar.gz
Support building with older compilers.
Add a check for __builtin_unreachable.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index cffe19b1..7d549aac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache = xyes; then
fi
AC_MSG_RESULT([$have__builtin___clear_cache])
+AC_MSG_CHECKING([for __builtin_unreachable])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
+ [have__builtin_unreachable=yes],
+ [have__builtin_unreachable=no])
+if test x$have__builtin_unreachable = xyes; then
+ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
+ [Defined if __builtin_unreachable() is available])
+fi
+AC_MSG_RESULT([$have__builtin_unreachable])
+
AC_MSG_CHECKING([for __sync atomics])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]], [[