summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-11-28 12:42:41 +0000
committerAnthony Green <green@moxielogic.com>2019-11-28 07:42:41 -0500
commit01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd (patch)
tree8a392de8800e2eb556e93e2cd1c34fb399ee22b1
parent1ec01ea81cf18e12748082f48f7c279a3fdd505d (diff)
downloadlibffi-01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd.tar.gz
powerpc: fix build failure on power7 and older (#532)
Build failure looks as: ``` libtool: compile: powerpc-unknown-linux-gnu-gcc \ -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ... In file included from src/powerpc/ffi.c:33: src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target 65 | typedef __int128 float128; | ^~~~~~~~ ``` The fix avoids using __int128 in favour of aligned char[16]. Closes: https://github.com/libffi/libffi/issues/531 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--src/powerpc/ffi_powerpc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
index 5ee2a70..8e2f2f0 100644
--- a/src/powerpc/ffi_powerpc.h
+++ b/src/powerpc/ffi_powerpc.h
@@ -62,7 +62,7 @@ typedef _Float128 float128;
#elif defined(__FLOAT128__)
typedef __float128 float128;
#else
-typedef __int128 float128;
+typedef char float128[16] __attribute__((aligned(16)));
#endif
void FFI_HIDDEN ffi_closure_SYSV (void);