You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.2 KiB

  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. Build failure looks as:
  6. ```
  7. libtool: compile: powerpc-unknown-linux-gnu-gcc \
  8. -O2 -mcpu=powerpc -mtune=powerpc -pipe ... -c src/powerpc/ffi.c ...
  9. In file included from src/powerpc/ffi.c:33:
  10. src/powerpc/ffi_powerpc.h:65:9: error: '__int128' is not supported on this target
  11. 65 | typedef __int128 float128;
  12. | ^~~~~~~~
  13. ```
  14. The fix avoids using __int128 in favour of aligned char[16].
  15. Closes: https://github.com/libffi/libffi/issues/531
  16. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
  17. ---
  18. src/powerpc/ffi_powerpc.h | 2 +-
  19. 1 file changed, 1 insertion(+), 1 deletion(-)
  20. diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
  21. index 5ee2a709..8e2f2f0e 100644
  22. --- a/src/powerpc/ffi_powerpc.h
  23. +++ b/src/powerpc/ffi_powerpc.h
  24. @@ -62,7 +62,7 @@ typedef _Float128 float128;
  25. #elif defined(__FLOAT128__)
  26. typedef __float128 float128;
  27. #else
  28. -typedef __int128 float128;
  29. +typedef char float128[16] __attribute__((aligned(16)));
  30. #endif
  31. void FFI_HIDDEN ffi_closure_SYSV (void);