diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 06:49:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-24 06:49:09 +0000 |
commit | d573446841743e709c3da79b28051ab4fc18d3fd (patch) | |
tree | 2685dbfc28db130d495d2d9e00e7c3545407078c /configure.in | |
parent | 0d1c8fd9d6407a1c58d329f2b4f53b16494cce84 (diff) | |
download | ruby-d573446841743e709c3da79b28051ab4fc18d3fd.tar.gz |
* configure.in (__builtin_unreachable): check for clang.
[ruby-core:42849]
* include/ruby/ruby.h (UNREACHABLE): fallback definition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 18ed6b53db..8f9e7d0810 100644 --- a/configure.in +++ b/configure.in @@ -908,6 +908,16 @@ if test "$GCC" = yes; then if test "$rb_cv_gcc_atomic_builtins" = yes; then AC_DEFINE(HAVE_GCC_ATOMIC_BUILTINS) fi + + AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable, + [AC_TRY_LINK([@%:@include <stdlib.h>], + [exit(0); __builtin_unreachable();], + [rb_cv_func___builtin_unreachable=yes], + [rb_cv_func___builtin_unreachable=no]) + ]) + if test "$rb_cv_func___builtin_unreachable" = yes; then + AC_DEFINE_UNQUOTED(UNREACHABLE, [__builtin_unreachable()]) + fi fi AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [ |