From 528f04f8010ea6d139caebaf4fe498ae6f367fe5 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 17 Jul 2021 16:31:51 +0000 Subject: [PATCH] provide an equivalent alignment for __float128 for clang and i386 that does not have it. Idea from mrg@ --- external/gpl3/gcc/dist/gcc/ginclude/stddef.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/external/gpl3/gcc/dist/gcc/ginclude/stddef.h b/external/gpl3/gcc/dist/gcc/ginclude/stddef.h index c3c47e6d9747..545213bb8b5b 100644 --- a/external/gpl3/gcc/dist/gcc/ginclude/stddef.h +++ b/external/gpl3/gcc/dist/gcc/ginclude/stddef.h @@ -420,9 +420,14 @@ typedef struct { use __float128 here; that is only available on some architectures, but only on i386 is extra alignment needed for __float128. */ -#if defined(__i386__) && !defined(__clang__) +#if defined(__i386__) +#ifdef __clang__ + // 16 is the gcc alignment for __float128 + long long __max_align_128 __attribute__((__aligned__(16))); +#else __float128 __max_align_f128 __attribute__((__aligned__(__alignof(__float128)))); #endif +#endif } max_align_t; #endif #endif /* C11 or C++11. */