diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-11-28 00:13:27 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-11-28 00:16:16 +0000 |
commit | ee2c3dee59595741c93f694357308368f4dfea19 (patch) | |
tree | ebe187583aaf20a18626f16ab89dffdaf373a062 /dev-libs/libffi | |
parent | media-libs/mesa: Version bump to 19.3.0_rc5 (diff) | |
download | gentoo-ee2c3dee59595741c93f694357308368f4dfea19.tar.gz gentoo-ee2c3dee59595741c93f694357308368f4dfea19.tar.bz2 gentoo-ee2c3dee59595741c93f694357308368f4dfea19.zip |
dev-libs/libffi: fix build on ppc32
Reported-by: qmpcggv2ei0p@opayq.com
Closes: https://bugs.gentoo.org/701128
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r-- | dev-libs/libffi/files/libffi-3.3-power7.patch | 39 | ||||
-rw-r--r-- | dev-libs/libffi/libffi-3.3-r1.ebuild | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/dev-libs/libffi/files/libffi-3.3-power7.patch b/dev-libs/libffi/files/libffi-3.3-power7.patch new file mode 100644 index 000000000000..83f518f4c2e3 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.3-power7.patch @@ -0,0 +1,39 @@ +https://bugs.gentoo.org/701128 + +From 2138adb2a5b6a0bc2fe3518e0645eacc89b6f392 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyfox@gentoo.org> +Date: Thu, 28 Nov 2019 00:02:42 +0000 +Subject: [PATCH] powerpc: fix build failure on power7 and older + +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> +--- + src/powerpc/ffi_powerpc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- 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); +-- +2.24.0 + diff --git a/dev-libs/libffi/libffi-3.3-r1.ebuild b/dev-libs/libffi/libffi-3.3-r1.ebuild index 53912670ba1a..2377c7956365 100644 --- a/dev-libs/libffi/libffi-3.3-r1.ebuild +++ b/dev-libs/libffi/libffi-3.3-r1.ebuild @@ -27,6 +27,7 @@ DOCS="ChangeLog* README.md" PATCHES=( "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044 "${FILESDIR}"/${PN}-3.3_rc0-ppc-macos-go.patch + "${FILESDIR}"/${PN}-3.3-power7.patch ) S=${WORKDIR}/${MY_P} |