summaryrefslogtreecommitdiff
path: root/dev-libs/libffi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-10-07 11:03:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-10-07 11:03:14 +0100
commit957235cf19a691360c720f7913672adda4258ed0 (patch)
tree812bba7928f4293ead05a7ee9c1ac39c5ef9f12e /dev-libs/libffi
parent62f67115b5c46134c34f88f4b1cbdacc19384c0a (diff)
gentoo resync : 07.10.2018
Diffstat (limited to 'dev-libs/libffi')
-rw-r--r--dev-libs/libffi/Manifest3
-rw-r--r--dev-libs/libffi/files/libffi-3.3_rc0-hppa-no-TEXTREL.patch93
-rw-r--r--dev-libs/libffi/libffi-3.3_rc0.ebuild64
3 files changed, 160 insertions, 0 deletions
diff --git a/dev-libs/libffi/Manifest b/dev-libs/libffi/Manifest
index d1fdd3693d78..81e94890b475 100644
--- a/dev-libs/libffi/Manifest
+++ b/dev-libs/libffi/Manifest
@@ -5,8 +5,11 @@ AUX libffi-3.2.1-ia64-small-struct.patch 2306 BLAKE2B 1bace1573d4bdb93e7be97a860
AUX libffi-3.2.1-include-path-autogen.patch 2901 BLAKE2B 836e61b6f64b9d649e969799e42c5dd808750ba51997d7486eef58e636ef2e1f215f9a26b5e88e61366d57e758688c4e69f578edd81167e1dbb0a8357f049150 SHA512 6c8b2d7dca0cdc6f69b2393777f546b6722b6260cfa6fcb814915975227185cc3b467b6537939f8f8d05df5fd8f245301030aa4ef74a3c2fa073e6200e91d47f
AUX libffi-3.2.1-include-path.patch 1156 BLAKE2B b5842f5dc6462edac0a5f58265246599d0283bb148f954fb79d8037e37ae332a664f57a201589b89022d63932d8a4e56c4b0c6a7a9a2240ae6602e847fff3a55 SHA512 f387590510ee5e3aedc03744fcf1faae35c105a81d4c2f646e495d489bc6467cd88d4a0a63b40a29fe620ad71db1a05c1fe483af63974222f366135f73f36cb3
AUX libffi-3.2.1-o-tmpfile-eacces.patch 660 BLAKE2B 651067a56e0bd0980a696ad12c8fa76d68d914fa370fb93c3f5f5759dd4837895a077510606fa451beafb75e7da19f42a9f88e3d56d6c283f684da695ad69960 SHA512 0887063ce1d812c31a34d662f852cf2944e008f2f60bd07941572f9032861e749968b090686e0d788f7cc3c5c8f1ed2388418ff000c42fd2d592f9837e782f65
+AUX libffi-3.3_rc0-hppa-no-TEXTREL.patch 2821 BLAKE2B fcc7eb0ed4a3f9b31718bf7761de8194a5fff6dc0c32be843e15e3da089ccd3819b656843844475199eb5ecc53312f4ad5c1b26d896df464d077ce15ee32eb13 SHA512 202b0685ecbf058a0414e1f2e673e4c793f5381b5714e5e8f025307068eb48f5c7eb85081859194b4500cbc5b6981f07fb4b6efc866071ea0e64f9231852444c
DIST libffi-3.2.1.tar.gz 940837 BLAKE2B d202ccaa185acfd2476ed2a9b011891507cd8efbbda60f67c583268d1563853442ed829acecbf81c9b6b9a930345780bb7a4bd80e71e50ef544c7f4eab8cb01f SHA512 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483
+DIST libffi-3.3-rc0.tar.gz 1084854 BLAKE2B 2c38d60f17ef52bcf270178c13c218f6ee320c9785091621d4689bcf6cee31d07eaaca12790965e1ae3ad71ad2c408342743968bf1d23f81a07fbdf6cfd55b90 SHA512 e6e695d32cd6eb7d65983f32986fccdfc786a593d2ea18af30ce741f58cfa1eb264b1a8d09df5084cb916001aea15187b005c2149a0620a44397a4453b6137d4
EBUILD libffi-3.2.1-r1.ebuild 2269 BLAKE2B e2075034b9e9bec42427dcacbfc03aa114d9c2e5fd3cbda307bd24ae63573a8ab27459ed0b73177bd969232be7640b737a35bae7f5be69876b92de4351dfcbff SHA512 1f27cd306112d3de8762f0cfab1f6196819a6793585c477027b3e0a48fdf0259f764d87b8cb221c5b32aabd5ae47d8535f040d0960256064d14a4d78a67bcfb9
EBUILD libffi-3.2.1-r2.ebuild 2328 BLAKE2B 26926447321e54807371c9e2154b062def22f04e298ee1ccbc5f92fed4bedab44d19622f034460c0727838fa1c6146c42cbd7fe83bc385df03c827535c42b949 SHA512 04a18c564ca898ffc3434ab7d62f2c2380300937726dae6c50f5e0d479009b059d020d48589b52970aa34723f6530bbeddd0f8f5f6fe3a865d90a48dd494e189
EBUILD libffi-3.2.1.ebuild 1968 BLAKE2B 611f038994a687222d26a6709163e1848d15114dccd3e87c9b0a28cdc5851c6cb769eba5517d18f196cf0d27a1703ed01b40ae73e04d4e15b9cc26c07ecc9acb SHA512 f9f3b0a71a8a57adb563eb6c1ed64602976f18ff8e653f777d8dd14928bfc27417ee1aa81eab2529be1dd6b7fb70af274fe2d7cc1c0c09d29e48f37661ddeec7
+EBUILD libffi-3.3_rc0.ebuild 2022 BLAKE2B bfa0038c2730f125a3754a8c5e52895d2163ff7748235082112e8dc5316b7e7ed43b3bc8eb0726513dda7058aa0f5fb1a9b4be0c18f205eba2c48f8144ae4061 SHA512 134ee21346f8b308cdeb05c3f72ad541f846eadfa786c188dfb050916c2703ea8c282b9b59ba008ffb18a125df9f195b127a252b9839c964cb8411f4846f4252
MISC metadata.xml 1866 BLAKE2B 4623e414d8d8c2d569b2ae8a6fd6117c38b11e5b3845bba17b32ce442b88afd0ea1aff66cd73181c59b7e66be65df078d68d13f793ab654c3e213ab4c20fce50 SHA512 e1de94bb58c77aa48ee1b7d81777d26b736db3f3ef652099bb3f3a9bd75689258a61168371a30976e0717519bc9300b3812a8405ad1f16683c45a24817960b90
diff --git a/dev-libs/libffi/files/libffi-3.3_rc0-hppa-no-TEXTREL.patch b/dev-libs/libffi/files/libffi-3.3_rc0-hppa-no-TEXTREL.patch
new file mode 100644
index 000000000000..c6286f349900
--- /dev/null
+++ b/dev-libs/libffi/files/libffi-3.3_rc0-hppa-no-TEXTREL.patch
@@ -0,0 +1,93 @@
+From 955e3c56459556284cf4a7fb23c51f9d310be80c Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Sat, 19 May 2018 10:49:07 +0100
+Subject: [PATCH] hppa: avoid TEXTREL in .eh_frame section
+
+Before the change hand-crafted .eh_frame section contained
+ABS relocation and caused TEXTREL tag to be emitted:
+
+```
+$ ./configure --host=hppa2.0-unknown-linux-gnu LDFLAGS=-Wl,-z,text
+$ make
+...
+/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/ld:
+ read-only segment has dynamic relocations.
+```
+
+Link failure is caused by absolute address of FDEs
+encoded into .eh_frame entries.
+
+Fixed TEXTREL by using pcrel (instead of ABS) encoding
+for absolute addresses (__PIC__ code) by adding augmentation
+information ("zR" CIE type).
+
+All tests still pass on hppa2.0. The specific tests that still pass
+and exercise this code path:
+ testsuite/libffi.call/unwindtest.cc
+ testsuite/libffi.call/unwindtest_ffi_call.cc
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ src/pa/linux.S | 25 +++++++++++++++++++++++--
+ 1 file changed, 23 insertions(+), 2 deletions(-)
+
+diff --git a/src/pa/linux.S b/src/pa/linux.S
+index f11ae76..ab04c75 100644
+--- a/src/pa/linux.S
++++ b/src/pa/linux.S
+@@ -297,10 +297,18 @@ ffi_closure_pa32:
+ .LSCIE1:
+ .word 0x0 ;# CIE Identifier Tag
+ .byte 0x1 ;# CIE Version
++#ifdef __PIC__
++ .ascii "zR\0" ;# CIE Augmentation: 'z' - data, 'R' - DW_EH_PE_... data
++#else
+ .ascii "\0" ;# CIE Augmentation
++#endif
+ .uleb128 0x1 ;# CIE Code Alignment Factor
+ .sleb128 4 ;# CIE Data Alignment Factor
+ .byte 0x2 ;# CIE RA Column
++#ifdef __PIC__
++ .uleb128 0x1 ;# Augmentation size
++ .byte 0x1b ;# FDE Encoding (DW_EH_PE_pcrel|DW_EH_PE_sdata4)
++#endif
+ .byte 0xc ;# DW_CFA_def_cfa
+ .uleb128 0x1e
+ .uleb128 0x0
+@@ -310,9 +318,15 @@ ffi_closure_pa32:
+ .word .LEFDE1-.LASFDE1 ;# FDE Length
+ .LASFDE1:
+ .word .LASFDE1-.Lframe1 ;# FDE CIE offset
+- .word .LFB1 ;# FDE initial location
++#ifdef __PIC__
++ .word .LFB1-. ;# FDE initial location
++#else
++ .word .LFB1 ;# FDE initial location
++#endif
+ .word .LFE1-.LFB1 ;# FDE address range
+-
++#ifdef __PIC__
++ .uleb128 0x0 ;# Augmentation size: no data
++#endif
+ .byte 0x4 ;# DW_CFA_advance_loc4
+ .word .LCFI11-.LFB1
+ .byte 0x83 ;# DW_CFA_offset, column 0x3
+@@ -338,8 +352,15 @@ ffi_closure_pa32:
+ .word .LEFDE2-.LASFDE2 ;# FDE Length
+ .LASFDE2:
+ .word .LASFDE2-.Lframe1 ;# FDE CIE offset
++#ifdef __PIC__
++ .word .LFB2-. ;# FDE initial location
++#else
+ .word .LFB2 ;# FDE initial location
++#endif
+ .word .LFE2-.LFB2 ;# FDE address range
++#ifdef __PIC__
++ .uleb128 0x0 ;# Augmentation size: no data
++#endif
+ .byte 0x4 ;# DW_CFA_advance_loc4
+ .word .LCFI21-.LFB2
+ .byte 0x83 ;# DW_CFA_offset, column 0x3
+--
+2.19.0
+
diff --git a/dev-libs/libffi/libffi-3.3_rc0.ebuild b/dev-libs/libffi/libffi-3.3_rc0.ebuild
new file mode 100644
index 000000000000..0a31487e51f1
--- /dev/null
+++ b/dev-libs/libffi/libffi-3.3_rc0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit multilib multilib-minimal toolchain-funcs
+
+MY_PV=${PV/_rc/-rc}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="a portable, high level programming interface to various calling conventions"
+HOMEPAGE="https://sourceware.org/libffi/"
+SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/7" # SONAME=libffi.so.7
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug pax_kernel static-libs test"
+
+RDEPEND=""
+DEPEND=""
+BDEPEND="test? ( dev-util/dejagnu )"
+
+DOCS="ChangeLog* README.md"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.2.1-o-tmpfile-eacces.patch #529044
+ "${FILESDIR}"/${PN}-3.3_rc0-hppa-no-TEXTREL.patch
+)
+
+S=${WORKDIR}/${MY_P}
+
+ECONF_SOURCE=${S}
+
+pkg_setup() {
+ # Check for orphaned libffi, see https://bugs.gentoo.org/354903 for example
+ if [[ ${ROOT} == "/" && ${EPREFIX} == "" ]] && ! has_version ${CATEGORY}/${PN}; then
+ local base="${T}"/conftest
+ echo 'int main() { }' > "${base}".c
+ $(tc-getCC) -o "${base}" "${base}".c -lffi >&/dev/null
+ if [ $? -eq 0 ]; then
+ eerror "The linker reported linking against -lffi to be working while it shouldn't have."
+ eerror "This is wrong and you should find and delete the old copy of libffi before continuing."
+ die "The system is in inconsistent state with unknown libffi installed."
+ fi
+ fi
+}
+
+multilib_src_configure() {
+ use userland_BSD && export HOST="${CHOST}"
+ econf \
+ --includedir="${EPREFIX}"/usr/$(get_libdir)/${P}/include \
+ $(use_enable static-libs static) \
+ $(use_enable pax_kernel pax_emutramp) \
+ $(use_enable debug)
+}
+
+multilib_src_test() {
+ emake check RUNTESTFLAGS='-a -v'
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+ einstalldocs
+}