0005-powerpc-fix-build-failure-on-power7-and-older.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. [Retrieved from:
  18. https://github.com/libffi/libffi/commit/01a75ed76ea7e57f1b7a5c183e2b1e890e6aa0fd]
  19. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  20. ---
  21. src/powerpc/ffi_powerpc.h | 2 +-
  22. 1 file changed, 1 insertion(+), 1 deletion(-)
  23. diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h
  24. index 5ee2a709..8e2f2f0e 100644
  25. --- a/src/powerpc/ffi_powerpc.h
  26. +++ b/src/powerpc/ffi_powerpc.h
  27. @@ -62,7 +62,7 @@ typedef _Float128 float128;
  28. #elif defined(__FLOAT128__)
  29. typedef __float128 float128;
  30. #else
  31. -typedef __int128 float128;
  32. +typedef char float128[16] __attribute__((aligned(16)));
  33. #endif
  34. void FFI_HIDDEN ffi_closure_SYSV (void);