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

ruby-changes:33635

From: nobu <ko1@a...>
Date: Fri, 25 Apr 2014 14:56:06 +0900 (JST)
Subject: [ruby-changes:33635] nobu:r45716 (trunk): configure.in: refine __builtin_unreachable check

nobu	2014-04-25 14:56:01 +0900 (Fri, 25 Apr 2014)

  New Revision: 45716

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

  Log:
    configure.in: refine __builtin_unreachable check
    
    * configure.in (rb_cv_func___builtin_unreachable): try with an
      external variable not only by a warning, which might not be
      shown due to the optimization.  [ruby-core:61647] [Bug #9665]

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 45715)
+++ configure.in	(revision 45716)
@@ -1595,8 +1595,8 @@ if test "$GCC" = yes; then https://github.com/ruby/ruby/blob/trunk/configure.in#L1595
 
     AC_CACHE_CHECK(for __builtin_unreachable, rb_cv_func___builtin_unreachable,
     [RUBY_WERROR_FLAG(
-    [AC_TRY_LINK([@%:@include <stdlib.h>],
-	[exit(0); __builtin_unreachable();],
+    [AC_TRY_LINK([volatile int zero;],
+	[if (zero) __builtin_unreachable();],
 	[rb_cv_func___builtin_unreachable=yes],
 	[rb_cv_func___builtin_unreachable=no])
     ])
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 45715)
+++ ChangeLog	(revision 45716)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Apr 25 14:55:59 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in (rb_cv_func___builtin_unreachable): try with an
+	  external variable not only by a warning, which might not be
+	  shown due to the optimization.  [ruby-core:61647] [Bug #9665]
+
 Fri Apr 25 13:11:49 2014  NARUSE, Yui  <naruse@r...>
 
 	* configure.in: NetBSD's ksh, used by configure, needs escapes.

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

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