[前][次][番号順一覧][スレッド一覧]

ruby-changes:33436

From: nobu <ko1@a...>
Date: Fri, 4 Apr 2014 11:37:32 +0900 (JST)
Subject: [ruby-changes:33436] nobu:r45515 (trunk): configure.in: get rid of clang fatal error

nobu	2014-04-04 11:37:27 +0900 (Fri, 04 Apr 2014)

  New Revision: 45515

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45515

  Log:
    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.

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 45514)
+++ configure.in	(revision 45515)
@@ -2080,15 +2080,16 @@ fi https://github.com/ruby/ruby/blob/trunk/configure.in#L2080
 AC_CACHE_CHECK(for __builtin_setjmp, ac_cv_func___builtin_setjmp,
     [
     ac_cv_func___builtin_setjmp=no
-    for cast in "" "(void *)"; do
+    for cast in "" "(void **)"; do
 	RUBY_WERROR_FLAG(
 	[AC_TRY_LINK([@%:@include <setjmp.h>
 	    @%:@include <stdio.h>
 	    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;
-	    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)"])
 	])

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]