mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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.
This commit is contained in:
parent
996af2ce08
commit
fe875be01a
Notes:
git
2020-09-25 11:39:06 +09:00
1 changed files with 0 additions and 28 deletions
28
configure.ac
28
configure.ac
|
@ -1460,34 +1460,6 @@ AS_IF([test "$rb_cv_va_args_macro" = yes], [
|
||||||
AC_DEFINE(HAVE_VA_ARGS_MACRO)
|
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,[
|
AC_CACHE_CHECK([for alignof() syntax], rb_cv_have_alignof,[
|
||||||
rb_cv_have_alignof=no
|
rb_cv_have_alignof=no
|
||||||
# Prefer alignof over _Alignof to allow C++ compiler to read ruby.h
|
# Prefer alignof over _Alignof to allow C++ compiler to read ruby.h
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue