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

ruby-changes:63087

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 25 Sep 2020 11:38:58 +0900 (JST)
Subject: [ruby-changes:63087] fe875be01a (master): rb_cv_have_alignas: not used any longer

https://git.ruby-lang.org/ruby.git/commit/?id=fe875be01a

From fe875be01a501a47a4bf75df9c6b42bb33d9842b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Wed, 23 Sep 2020 09:41:08 +0900
Subject: rb_cv_have_alignas: not used any longer

Availability of `alignas` is checked in include/ruby/internal/stdalign.h
now.  That does not need this configure check.  Also as commented in the
header, we see `_Alignas` being inadequate for our purpose.

diff --git a/configure.ac b/configure.ac
index ab5d532..46fdecd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1460,34 +1460,6 @@ AS_IF([test "$rb_cv_va_args_macro" = yes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L1460
   AC_DEFINE(HAVE_VA_ARGS_MACRO)
 ])
 
-AC_CACHE_CHECK([for alignas() syntax], rb_cv_have_alignas, [
-rb_cv_have_alignas=no
-# Prefer alignas over _Alignas to allow C++ compiler to read ruby.h
-RUBY_WERROR_FLAG([
-for attr in \
-    "alignas(x)" \
-    "_Alignas(x)" \
-    "@<:@@<:@alignas(x)@:>@@:>@" \
-    "__declspec(aligned(x))" \
-    "__attribute__((__aligned__(x)))" \
-;
-do
-    # C11 _Alignas and GCC __attribute__((__aligned__)) behave
-    # slightly differently.  What we want is GCC's.  Check that
-    # here by something C11 does not allow (`struct ALIGNAS ...`)
-    AC_TRY_COMPILE([
-       @%:@ifdef HAVE_STDALIGN_H
-        @%:@include <stdalign.h>
-        @%:@endif
-        @%:@define ALIGNAS(x) $attr
-	struct ALIGNAS(128) conftest_tag { int foo; } foo; ], [],
-        [rb_cv_have_alignas="$attr"; break], [])
-done
-])])
-AS_IF([test "$rb_cv_have_alignas" != no], [
-    AC_DEFINE_UNQUOTED([RUBY_ALIGNAS(x)], $rb_cv_have_alignas)
-])
-
 AC_CACHE_CHECK([for alignof() syntax], rb_cv_have_alignof,[
 rb_cv_have_alignof=no
 # Prefer alignof over _Alignof to allow C++ compiler to read ruby.h
-- 
cgit v0.10.2


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

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