c8ae4a94d0030f20050e4a56ce9b9ec7e820b7e1
[feed/packages.git] / libs / libffi / patches / 200-ppc.patch
1 From 01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd Mon Sep 17 00:00:00 2001
2 From: Sergei Trofimovich <slyfox@gentoo.org>
3 Date: Thu, 28 Nov 2019 12:42:41 +0000
4 Subject: [PATCH] powerpc: fix build failure on power7 and older (#532)
5
6 Build failure looks as:
7 ```
8 libtool: compile: powerpc-unknown-linux-gnu-gcc \
9 -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ...
10 In file included from src/powerpc/ffi.c:33:
11 src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target
12 65 | typedef __int128 float128;
13 | ^~~~~~~~
14 ```
15
16 The fix avoids using __int128 in favour of aligned char[16].
17
18 Closes: https://github.com/libffi/libffi/issues/531
19 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
20 ---
21 src/powerpc/ffi_powerpc.h | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
25 index 5ee2a709..8e2f2f0e 100644
26 --- a/src/powerpc/ffi_powerpc.h
27 +++ b/src/powerpc/ffi_powerpc.h
28 @@ -62,7 +62,7 @@ typedef _Float128 float128;
29 #elif defined(__FLOAT128__)
30 typedef __float128 float128;
31 #else
32 -typedef __int128 float128;
33 +typedef char float128[16] __attribute__((aligned(16)));
34 #endif
35
36 void FFI_HIDDEN ffi_closure_SYSV (void);