configure.in: get rid of clang fatal error
* configure.in (ac_cv_func___builtin_setjmp): get rid of a bug in clang 3.3 and 3.4, which __builtin_setjmp() causes fatal error in backend, linker error, or segmentation fault. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d41af17d37
commit
9dd0113023
@ -2080,15 +2080,16 @@ fi
|
|||||||
AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
|
AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
|
||||||
[
|
[
|
||||||
ac_cv_func___builtin_setjmp=no
|
ac_cv_func___builtin_setjmp=no
|
||||||
for cast in "" "(void *)"; do
|
for cast in "" "(void **)"; do
|
||||||
RUBY_WERROR_FLAG(
|
RUBY_WERROR_FLAG(
|
||||||
[AC_TRY_LINK([@%:@include <setjmp.h>
|
[AC_TRY_LINK([@%:@include <setjmp.h>
|
||||||
@%:@include <stdio.h>
|
@%:@include <stdio.h>
|
||||||
jmp_buf jb;
|
jmp_buf jb;
|
||||||
void t(void) {__builtin_longjmp($cast jb, 1);}],
|
void t(void) {__builtin_longjmp($cast jb, 1);}
|
||||||
|
int jump(void) {(void)(__builtin_setjmp($cast jb) ? 1 : 0); return 0;}],
|
||||||
[
|
[
|
||||||
void (*volatile f)(void) = t;
|
void (*volatile f)(void) = t;
|
||||||
if (!__builtin_setjmp($cast jb)) printf("%d\n", f != 0);
|
if (!jump()) printf("%d\n", f != 0);
|
||||||
],
|
],
|
||||||
[ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
|
[ac_cv_func___builtin_setjmp="yes with cast ($cast)"])
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user