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

ruby-changes:49719

From: shyouhei <ko1@a...>
Date: Mon, 15 Jan 2018 13:36:19 +0900 (JST)
Subject: [ruby-changes:49719] shyouhei:r61836 (trunk): disable __builtin_alloca_with_align for GCC 4.8

shyouhei	2018-01-15 13:36:09 +0900 (Mon, 15 Jan 2018)

  New Revision: 61836

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61836

  Log:
    disable __builtin_alloca_with_align for GCC 4.8
    
    It seems to be a false positive that the configure detects this
    undocumented function to be available on the compiler.

  Modified files:
    trunk/include/ruby/ruby.h
Index: include/ruby/ruby.h
===================================================================
--- include/ruby/ruby.h	(revision 61835)
+++ include/ruby/ruby.h	(revision 61836)
@@ -1595,6 +1595,14 @@ rb_num2char_inline(VALUE x) https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1595
 #define ZALLOC(type) RB_ZALLOC(type)
 #define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
 
+#if GCC_VERSION_BEFORE(4,8,6)
+/* GCC 4.8.5 reportedly has this feature and is broken.
+ * The function is not officially documented below.
+ * Seems we should not use it.
+ * https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/Other-Builtins.html#Other-Builtins */
+# undef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
+#endif
+
 #ifdef HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN
 /* I don't know why but __builtin_alloca_with_align's second argument
    takes bits rather than bytes. */

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

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