From 8796aaedb3257bbe4d80b0033408b2210b2259d6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 17 Oct 2024 04:04:27 +0100 Subject: gentoo auto-resync : 17:10:2024 - 04:04:26 --- dev-libs/Manifest.gz | Bin 101104 -> 101097 bytes dev-libs/gobject-introspection/Manifest | 7 +- .../gobject-introspection-1.76.1-r1.ebuild | 80 ----- .../gobject-introspection-1.76.1-r2.ebuild | 2 +- .../gobject-introspection-1.78.1-r1.ebuild | 84 ------ .../gobject-introspection-1.78.1-r2.ebuild | 2 +- .../gobject-introspection-1.80.1-r1.ebuild | 85 ------ dev-libs/libclc/Manifest | 3 + dev-libs/libclc/libclc-19.1.2.ebuild | 62 ++++ dev-libs/libffi/Manifest | 13 + .../files/libffi-3.4.6-arm64-bti-spelling.patch | 26 ++ dev-libs/libffi/files/libffi-3.4.6-arm64-bti.patch | 82 +++++ dev-libs/libffi/files/libffi-3.4.6-arm64-cfi.patch | 44 +++ .../files/libffi-3.4.6-arm64-fix-build.patch | 36 +++ .../files/libffi-3.4.6-arm64-support-pac.patch | 332 +++++++++++++++++++++ dev-libs/libffi/files/libffi-3.4.6-asan.patch | 88 ++++++ .../files/libffi-3.4.6-regenerate-autotools.patch | 48 +++ .../files/libffi-3.4.6-sparc-struct-targs.patch | 47 +++ dev-libs/libffi/files/libffi-3.4.6-test-typo.patch | 19 ++ dev-libs/libffi/files/libffi-3.4.6-tests.patch | 104 +++++++ dev-libs/libffi/files/libffi-3.4.6-x86-sse.patch | 124 ++++++++ dev-libs/libffi/libffi-3.4.6-r2.ebuild | 95 ++++++ dev-libs/libffi/libffi-9999.ebuild | 81 +++++ dev-libs/libqtxdg/Manifest | 2 + dev-libs/libqtxdg/libqtxdg-4.0.1.ebuild | 51 ++++ dev-libs/libuv/Manifest | 3 + dev-libs/libuv/libuv-1.49.1.ebuild | 62 ++++ 27 files changed, 1326 insertions(+), 256 deletions(-) delete mode 100644 dev-libs/gobject-introspection/gobject-introspection-1.76.1-r1.ebuild delete mode 100644 dev-libs/gobject-introspection/gobject-introspection-1.78.1-r1.ebuild delete mode 100644 dev-libs/gobject-introspection/gobject-introspection-1.80.1-r1.ebuild create mode 100644 dev-libs/libclc/libclc-19.1.2.ebuild create mode 100644 dev-libs/libffi/files/libffi-3.4.6-arm64-bti-spelling.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-arm64-bti.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-arm64-cfi.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-arm64-fix-build.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-arm64-support-pac.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-asan.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-regenerate-autotools.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-sparc-struct-targs.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-test-typo.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-tests.patch create mode 100644 dev-libs/libffi/files/libffi-3.4.6-x86-sse.patch create mode 100644 dev-libs/libffi/libffi-3.4.6-r2.ebuild create mode 100644 dev-libs/libffi/libffi-9999.ebuild create mode 100644 dev-libs/libqtxdg/libqtxdg-4.0.1.ebuild create mode 100644 dev-libs/libuv/libuv-1.49.1.ebuild (limited to 'dev-libs') diff --git a/dev-libs/Manifest.gz b/dev-libs/Manifest.gz index ce7e59715c93..64e1faa8f88d 100644 Binary files a/dev-libs/Manifest.gz and b/dev-libs/Manifest.gz differ diff --git a/dev-libs/gobject-introspection/Manifest b/dev-libs/gobject-introspection/Manifest index ac9dc7c6e555..118784f05659 100644 --- a/dev-libs/gobject-introspection/Manifest +++ b/dev-libs/gobject-introspection/Manifest @@ -3,10 +3,7 @@ AUX gobject-introspection-1.80.1-setuptools-74.patch 3808 BLAKE2B 37e4fb3c06cc56 DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916 DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97 DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a -EBUILD gobject-introspection-1.76.1-r1.ebuild 1982 BLAKE2B ed03ce13204047215fda37bdf6d4fe5a8b179ae6bc73d06ba0b385cd0f78903f4f9959e0755947d0f294c64095210590846973e541912c63f11a4f9256efdc7e SHA512 f86f08483fa6c76e5ea174a0025770b5469e6975a87d909d91acbf182cab46ad5790bf9632fd2ec21b8966f661d4439a39cccb14bf97c7c67699bebe5592f688 -EBUILD gobject-introspection-1.76.1-r2.ebuild 2101 BLAKE2B df394e9e0397d11a6762f929172d9cd8eca2173d553c4cb4804fc0352cdbe713ddd65a5bd55d94bc7815d171c60a6b04037f6c5e544416f119646ec05de613b5 SHA512 6409980b616d96b902f41c8c4ac672fd86cf41dccb9027110b3fa5298eb9f36146b9d262318bfbaec0ab0d41e5fed1e7f92e0919a9099a29bd8ee3e54298bd68 -EBUILD gobject-introspection-1.78.1-r1.ebuild 2072 BLAKE2B 94eb85338baed456a3fbeb6624a5c94919ab7956d93a1adc9d9acc20ab56f0daf4380c3403f9dce48250f8f8705030bf7e246a548d2133b0ae0a6a88634e1100 SHA512 a9f94c096e4915de5fade09eecd67bd30ed665527daf56c6a545f840b9ab7f50420ba0cdd73e3194ad938320bf7483dd697313bde569fe7fe3df10547971b4ff -EBUILD gobject-introspection-1.78.1-r2.ebuild 2195 BLAKE2B e69bb30d6c230a910f924664aeb0acd093c02c9b8952aea46277460f6a09beb2d989c50f19abdfa66ab33a44bbb657f2a0dddab23f9699ea0cd8a52112b94608 SHA512 3f5d5adf06c3fd6c32c85e28650f89344d1915bca10359e793b4b69a55b4bfac1b7abf0665673e797580f99629ac0b3adfa4776881121511639f78b344a318e5 -EBUILD gobject-introspection-1.80.1-r1.ebuild 2042 BLAKE2B 04927259bcb8faa659a3b7e48dd6a27c8a7a6763aed0ed20c14aa16ef53f6607cb37bce1db2e67967d7c3c81e662173a7e5cdac7c08f9b5bd7921964e67f9b1d SHA512 855c9423eae1476a3057f6d2ce5056af15a53ef8a28937f0295bc362b5d458ba11cba5268229acbdbc362535330b4a56848772210c5d0a4a78930764227d5dc8 +EBUILD gobject-introspection-1.76.1-r2.ebuild 2093 BLAKE2B b4a15b784d04d99d81153a32426d0b84335aa36236cbbc9184d0fa9277d092dfbed6438e35430c46967893aac5837cee9eacf19382fd638a63bd80b4b0fdaaf6 SHA512 5aaaedfd7e96798f024c354bddf613f2ee3d4af5cf00e6ff329dce84db6a995da511ccfc763f0af510e061fe19914f7d84ffd59cfcaefde0198b4cc00e787e60 +EBUILD gobject-introspection-1.78.1-r2.ebuild 2194 BLAKE2B f73406d3e64bfbc228d2b6c2be102c7d06441e4c0baddc4a3b3fc9fbbc9f4924c3b0d6f901919b47393caabdbe9a89aa20c72b0336060c8c881ac0ff93e6f0fc SHA512 64fe0f31821eeef21eb4a245c3e146c5f3917689a3274121b235352816f6c401a821142ef0c2e4ce067ce5b8e162b1c36d6caf0f1b121bc18dd7cf131f8d53c9 EBUILD gobject-introspection-1.80.1-r2.ebuild 2176 BLAKE2B c7da9f1ee2e5fbb402c62c00e15cf1292ce11be749ad35f2c8ff12f6158ca2e834dc0d47b3a5e2978616e85f035e136630857fbe6f56d1c359106a7c453a63ce SHA512 303a5fba119f505adcbd5a2e73ec095f9c04983ae9977a82ae0d3d8ad33a8a4669c2ec860a74ba59e118d2ac565be945ffe23f87cc86cd79c8898a59d31bce9a MISC metadata.xml 485 BLAKE2B 6ecc9396bcb29a8365be4058592c307ddcb0cc16ab56723ca32a378b5608b86378ab291345a6a3ccbe8225c6ffc91b6ba1e2996b5b0d1f4271d0757bf376ef8e SHA512 43a479854b1d5783c028ecfd8357a632db089f95de9e703608de7f229a37beee5e43781ff3f68b2dfa9bceac1355597373d31d209fdea0301917be5fbe7e7fbe diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.76.1-r1.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.76.1-r1.ebuild deleted file mode 100644 index c26eba618ba2..000000000000 --- a/dev-libs/gobject-introspection/gobject-introspection-1.76.1-r1.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..11} ) -PYTHON_REQ_USE="xml(+)" -inherit gnome.org meson python-single-r1 xdg - -DESCRIPTION="Introspection system for GObject-based libraries" -HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection" - -LICENSE="LGPL-2+ GPL-2+" -SLOT="0" -IUSE="doctool gtk-doc test" -RESTRICT="!test? ( test )" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" - -# virtual/pkgconfig needed at runtime, bug #505408 -RDEPEND=" - >=dev-libs/gobject-introspection-common-${PV} - >=dev-libs/glib-2.75.0:2 - dev-libs/libffi:= - +Date: Sat, 1 Jun 2024 12:33:28 -0500 +Subject: [PATCH] ffi: fix spelling mistake (#833) + +Signed-off-by: Bill Roberts +--- + src/aarch64/ffi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c +index 8661a352..b13738e3 100644 +--- a/src/aarch64/ffi.c ++++ b/src/aarch64/ffi.c +@@ -682,7 +682,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue, + else if (flags & AARCH64_RET_NEED_COPY) + rsize = 16; + +- /* Allocate consectutive stack for everything we'll need. ++ /* Allocate consecutive stack for everything we'll need. + The frame uses 40 bytes for: lr, fp, rvalue, flags, sp */ + context = alloca (sizeof(struct call_context) + stack_bytes + 40 + rsize); + stack = context + 1; + diff --git a/dev-libs/libffi/files/libffi-3.4.6-arm64-bti.patch b/dev-libs/libffi/files/libffi-3.4.6-arm64-bti.patch new file mode 100644 index 000000000000..ad8a95ae506d --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-arm64-bti.patch @@ -0,0 +1,82 @@ +https://github.com/libffi/libffi/issues/855 +https://github.com/libffi/libffi/commit/f64141ee3f9e455a060bd09e9ab72b6c94653d7c + +From f64141ee3f9e455a060bd09e9ab72b6c94653d7c Mon Sep 17 00:00:00 2001 +From: Bill Roberts <152999275+billatarm@users.noreply.github.com> +Date: Tue, 19 Mar 2024 11:44:55 -0500 +Subject: [PATCH] Fix bti support (#830) + +* bti: add identifier to ffi_closure_SYSV_V_alt + +This was missing BTI_C identifier. + +Old Code: +ffi_closure_SYSV_V_alt: +0000fffff7f70500: ldr x17, [sp, #8] + +Signed-off-by: Bill Roberts + +* testsuite: fix whitespace in Makefile.am + +Signed-off-by: Bill Roberts + +* aarch64: correct comment describing BTI + +The comment is incorrect, BTI is enabled per mapping via mprotect with +PROT_BTI flag set, not per-process. When the loader loads the library, +if the GNU Notes section is missing this, PROT_BTI will not be enabled +for that mapping, but is independent of other mappings. + +Signed-off-by: Bill Roberts + +--------- + +Signed-off-by: Bill Roberts +--- + src/aarch64/sysv.S | 4 +++- + testsuite/Makefile.am | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S +index fdd0e8b7..60cfa505 100644 +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -68,7 +68,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #define BTI_J hint #36 + /* + * The ELF Notes section needs to indicate if BTI is supported, as the first ELF loaded that doesn't +- * declare this support disables it for the whole process. ++ * declare this support disables it for memory region containing the loaded library. + */ + # define GNU_PROPERTY_AARCH64_BTI (1 << 0) /* Has Branch Target Identification */ + .text +@@ -527,6 +527,7 @@ L(do_closure): + #if defined(FFI_EXEC_STATIC_TRAMP) + .align 4 + CNAME(ffi_closure_SYSV_V_alt): ++ BTI_C + /* See the comments above trampoline_code_table. */ + ldr x17, [sp, #8] /* Load closure in x17 */ + add sp, sp, #16 /* Restore the stack */ +@@ -541,6 +542,7 @@ CNAME(ffi_closure_SYSV_V_alt): + + .align 4 + CNAME(ffi_closure_SYSV_alt): ++ BTI_C + /* See the comments above trampoline_code_table. */ + ldr x17, [sp, #8] /* Load closure in x17 */ + add sp, sp, #16 /* Restore the stack */ +diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am +index d286cf7f..6ba98e12 100644 +--- a/testsuite/Makefile.am ++++ b/testsuite/Makefile.am +@@ -8,7 +8,7 @@ CLEANFILES = *.exe core* *.log *.sum + + EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \ + emscripten/node-tests.sh emscripten/test.html emscripten/test_libffi.py \ +- emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ ++ emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ + lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \ + libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \ + libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \ + diff --git a/dev-libs/libffi/files/libffi-3.4.6-arm64-cfi.patch b/dev-libs/libffi/files/libffi-3.4.6-arm64-cfi.patch new file mode 100644 index 000000000000..0eb4cf807f3b --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-arm64-cfi.patch @@ -0,0 +1,44 @@ +https://github.com/libffi/libffi/pull/857 +https://github.com/libffi/libffi/commit/8308bed5b2423878aa20d7884a99cf2e30b8daf7 + +From 3065c530d3aa50c2b5ee9c01f88a9c0b61732805 Mon Sep 17 00:00:00 2001 +From: Ivan Tadeu Ferreira Antunes Filho +Date: Mon, 16 Sep 2024 16:10:39 -0400 +Subject: [PATCH] Move cfi_startproc after CNAME(label) + +This is a fix for https://github.com/libffi/libffi/issues/852: error: invalid CFI advance_loc expression on apple targets. + +The CFI for darwin arm64 was broken because the CNAME macro was being used after the +cfi_startproc macro. +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -89,8 +89,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + x5 closure + */ + +- cfi_startproc + CNAME(ffi_call_SYSV): ++ cfi_startproc + BTI_C + PAC_CFI_WINDOW_SAVE + /* Sign the lr with x1 since that is the CFA which is the modifer used in auth instructions */ +@@ -348,8 +348,8 @@ CNAME(ffi_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_closure_SYSV): ++ cfi_startproc + BTI_C + SIGN_LR + PAC_CFI_WINDOW_SAVE +@@ -647,8 +647,8 @@ CNAME(ffi_go_closure_SYSV_V): + #endif + + .align 4 +- cfi_startproc + CNAME(ffi_go_closure_SYSV): ++ cfi_startproc + BTI_C + SIGN_LR_LINUX_ONLY + PAC_CFI_WINDOW_SAVE diff --git a/dev-libs/libffi/files/libffi-3.4.6-arm64-fix-build.patch b/dev-libs/libffi/files/libffi-3.4.6-arm64-fix-build.patch new file mode 100644 index 000000000000..20eaf6a2d8cd --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-arm64-fix-build.patch @@ -0,0 +1,36 @@ +https://github.com/libffi/libffi/commit/9c9e8368e49804c4f7c35ac9f0d7c1d0d533308b + +From 9c9e8368e49804c4f7c35ac9f0d7c1d0d533308b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Tue, 4 Jun 2024 14:13:08 +0300 +Subject: [PATCH] aarch64: Add a missing no-op define of SIGN_LR_LINUX_ONLY + (#838) + +This is needed at least if building for Linux, with a toolchain +that doesn't default to having PAC enabled, fixing build errors +since 45d284f2d066cc3a080c5be88e51b4d934349797. +--- + src/aarch64/internal.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/aarch64/internal.h b/src/aarch64/internal.h +index c39f9cb2..50fa5c13 100644 +--- a/src/aarch64/internal.h ++++ b/src/aarch64/internal.h +@@ -88,6 +88,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #define AUTH_LR_AND_RET retab + #define AUTH_LR_WITH_REG(x) autib lr, x + #define BRANCH_AND_LINK_TO_REG blraaz ++ #define SIGN_LR_LINUX_ONLY + #define BRANCH_TO_REG braaz + #define PAC_CFI_WINDOW_SAVE + /* Linux PAC Support */ +@@ -136,6 +137,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #define AUTH_LR_AND_RET ret + #define AUTH_LR_WITH_REG(x) + #define BRANCH_AND_LINK_TO_REG blr ++ #define SIGN_LR_LINUX_ONLY + #define BRANCH_TO_REG br + #define PAC_CFI_WINDOW_SAVE + #endif /* HAVE_ARM64E_PTRAUTH */ + diff --git a/dev-libs/libffi/files/libffi-3.4.6-arm64-support-pac.patch b/dev-libs/libffi/files/libffi-3.4.6-arm64-support-pac.patch new file mode 100644 index 000000000000..288533367499 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-arm64-support-pac.patch @@ -0,0 +1,332 @@ +https://github.com/libffi/libffi/commit/45d284f2d066cc3a080c5be88e51b4d934349797 + +From 45d284f2d066cc3a080c5be88e51b4d934349797 Mon Sep 17 00:00:00 2001 +From: Bill Roberts <152999275+billatarm@users.noreply.github.com> +Date: Sat, 1 Jun 2024 12:34:53 -0500 +Subject: [PATCH] aarch64: support pointer authentication (#834) + +* aarch64: fix callstack in ffi_call_SYSV + +The debug stack gets corrupted between the frame and stack pivots, update +the CFI directives so the call stack stays correct in the debugger. + +str x9, [x1, #32] // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> main() (good) +mov x29, x1 // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> ffi_call() -> main() (bad) +mov sp, x0 // stack is ffi_call_SYSV() -> ffi_call_int() -> ffi_call_int() -> main() (good) + +The CFA data needs to be updated around the pivots, after this patch the +callstack stays correct. + +Signed-off-by: Bill Roberts + +* aarch64: remove uneeded CFI directive + +This directive doesn't actually set the CFA to anything valid, and +during unwinding this isn't even used. Note that the PAC/Darwin usage +is quite suspect as well, as the CFA is either x1 or x29 after the frame +pivot, and the CFA address is what's used as the modifier when verifying +the PAC. At least this is the behavior on Linux with PAC, I need to +verify ARME ABI unwinding. So for now leave Darwin as is. + +Signed-off-by: Bill Roberts + +* ptrauth: rename define for clarity + +Rename the HAVE_PTRAUTH define for clarity that its associated with the +ARM64E ABI and not the ARM64 ABI that can be supported on Linux and +enabled with -mbranch-protection=standard. + +Signed-off-by: Bill Roberts + +* aarch64: add PAC support to ffi_call_SYSV + +Support AARCH64 Pointer Authentication Codes (PAC) within ffi_call_SYSV +and support exception unwinding. + +The Linux ABI for PAC is to use paciasp/autiasp instructions which also +have hint space equivelent instructions. They sign the LR (x30) with the +A key and the current stack pointer as the salt. Note that this can also be +configured to use the B key and will use pacibsp/autibsp hint instructions. + +The Linux ABI for exception frame data when PAC is enabled assumes that the +Connonical Frame Address, or CFA is equal to the stack pointer. I.E sp is +equal to x29 (fp). When the unwinder is invoked the cfa will point to +the frame which will include the *signed* return address from the LR. +This will then be passed to __builtin_aarch64_autia1716 where the CFA +will be used as the salt and stored to register x16 and register x17 +will contain the signed address to demangle. This can be noted in: + - https://github.com/gcc-mirror/gcc/blob/d6d7afcdbc04adb0ec42a44b2d7e05600945af42/libgcc/config/aarch64/aarch64-unwind.h#L56 + +The other required portion of this is to indicate to the unwinder that +this is a signed address that needs to go the special demangle route in +the unwinder. This is accomplished by using CFI directive "cfi_window_save" +which marks that frame as being signed. + +Putting all of this together is a bit tricky, as the internals of +ffi_call_SYSV the callee allocates its stack and frame and passes it in +arg1 (x0) and arg2 (x1) to the called function, where that function +pivots its stack, so care must be taken to get the sp == fp before +paciasp is called and also restore that state before autiasp is called. + +Signed-off-by: Bill Roberts + +--------- + +Signed-off-by: Bill Roberts +--- + configure.ac | 6 ++-- + include/ffi_cfi.h | 2 ++ + src/aarch64/ffi.c | 4 +-- + src/aarch64/internal.h | 76 ++++++++++++++++++++++++++++++++---------- + src/aarch64/sysv.S | 20 ++++++----- + src/closures.c | 6 ++-- + 6 files changed, 81 insertions(+), 33 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 816bfd666..b35a999fb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -189,17 +189,17 @@ AC_CACHE_CHECK([whether compiler supports pointer authentication], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + #ifdef __clang__ + # if __has_feature(ptrauth_calls) +-# define HAVE_PTRAUTH 1 ++# define HAVE_ARM64E_PTRAUTH 1 + # endif + #endif + +-#ifndef HAVE_PTRAUTH ++#ifndef HAVE_ARM64E_PTRAUTH + # error Pointer authentication not supported + #endif + ]])],[libffi_cv_as_ptrauth=yes],[libffi_cv_as_ptrauth=no]) + ]) + if test "x$libffi_cv_as_ptrauth" = xyes; then +- AC_DEFINE(HAVE_PTRAUTH, 1, ++ AC_DEFINE(HAVE_ARM64E_PTRAUTH, 1, + [Define if your compiler supports pointer authentication.]) + fi + +diff --git a/include/ffi_cfi.h b/include/ffi_cfi.h +index f4c292d00..856566324 100644 +--- a/include/ffi_cfi.h ++++ b/include/ffi_cfi.h +@@ -49,6 +49,7 @@ + # define cfi_personality(enc, exp) .cfi_personality enc, exp + # define cfi_lsda(enc, exp) .cfi_lsda enc, exp + # define cfi_escape(...) .cfi_escape __VA_ARGS__ ++# define cfi_window_save .cfi_window_save + + #else + +@@ -71,6 +72,7 @@ + # define cfi_personality(enc, exp) + # define cfi_lsda(enc, exp) + # define cfi_escape(...) ++# define cfi_window_save + + #endif /* HAVE_AS_CFI_PSEUDO_OP */ + #endif /* FFI_CFI_H */ +diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c +index b13738e38..964934dfb 100644 +--- a/src/aarch64/ffi.c ++++ b/src/aarch64/ffi.c +@@ -63,7 +63,7 @@ struct call_context + #if FFI_EXEC_TRAMPOLINE_TABLE + + #ifdef __MACH__ +-#ifdef HAVE_PTRAUTH ++#ifdef HAVE_ARM64E_PTRAUTH + #include + #endif + #include +@@ -877,7 +877,7 @@ ffi_prep_closure_loc (ffi_closure *closure, + + #if FFI_EXEC_TRAMPOLINE_TABLE + # ifdef __MACH__ +-# ifdef HAVE_PTRAUTH ++# ifdef HAVE_ARM64E_PTRAUTH + codeloc = ptrauth_auth_data(codeloc, ptrauth_key_function_pointer, 0); + # endif + void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE); +diff --git a/src/aarch64/internal.h b/src/aarch64/internal.h +index b5d102b4a..c39f9cb22 100644 +--- a/src/aarch64/internal.h ++++ b/src/aarch64/internal.h +@@ -81,20 +81,62 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + /* Helpers for writing assembly compatible with arm ptr auth */ + #ifdef LIBFFI_ASM + +-#ifdef HAVE_PTRAUTH +-#define SIGN_LR pacibsp +-#define SIGN_LR_WITH_REG(x) pacib lr, x +-#define AUTH_LR_AND_RET retab +-#define AUTH_LR_WITH_REG(x) autib lr, x +-#define BRANCH_AND_LINK_TO_REG blraaz +-#define BRANCH_TO_REG braaz +-#else +-#define SIGN_LR +-#define SIGN_LR_WITH_REG(x) +-#define AUTH_LR_AND_RET ret +-#define AUTH_LR_WITH_REG(x) +-#define BRANCH_AND_LINK_TO_REG blr +-#define BRANCH_TO_REG br +-#endif +- +-#endif ++ #if defined(HAVE_ARM64E_PTRAUTH) ++ /* ARM64E ABI For Darwin */ ++ #define SIGN_LR pacibsp ++ #define SIGN_LR_WITH_REG(x) pacib lr, x ++ #define AUTH_LR_AND_RET retab ++ #define AUTH_LR_WITH_REG(x) autib lr, x ++ #define BRANCH_AND_LINK_TO_REG blraaz ++ #define BRANCH_TO_REG braaz ++ #define PAC_CFI_WINDOW_SAVE ++ /* Linux PAC Support */ ++ #elif defined(__ARM_FEATURE_PAC_DEFAULT) ++ #define GNU_PROPERTY_AARCH64_POINTER_AUTH (1 << 1) ++ #define PAC_CFI_WINDOW_SAVE cfi_window_save ++ #define TMP_REG x9 ++ #define BRANCH_TO_REG br ++ #define BRANCH_AND_LINK_TO_REG blr ++ #define SIGN_LR_LINUX_ONLY SIGN_LR ++ /* Which key to sign with? */ ++ #if (__ARM_FEATURE_PAC_DEFAULT & 1) == 1 ++ /* Signed with A-key */ ++ #define SIGN_LR hint #25 /* paciasp */ ++ #define AUTH_LR hint #29 /* autiasp */ ++ #else ++ /* Signed with B-key */ ++ #define SIGN_LR hint #27 /* pacibsp */ ++ #define AUTH_LR hint #31 /* autibsp */ ++ #endif /* __ARM_FEATURE_PAC_DEFAULT */ ++ #define AUTH_LR_WITH_REG(x) _auth_lr_with_reg x ++.macro _auth_lr_with_reg modifier ++ mov TMP_REG, sp ++ mov sp, \modifier ++ AUTH_LR ++ mov sp, TMP_REG ++.endm ++ #define SIGN_LR_WITH_REG(x) _sign_lr_with_reg x ++.macro _sign_lr_with_reg modifier ++ mov TMP_REG, sp ++ mov sp, \modifier ++ SIGN_LR ++ mov sp, TMP_REG ++.endm ++ #define AUTH_LR_AND_RET _auth_lr_and_ret modifier ++.macro _auth_lr_and_ret modifier ++ AUTH_LR ++ ret ++.endm ++ #undef TMP_REG ++ ++ /* No Pointer Auth */ ++ #else ++ #define SIGN_LR ++ #define SIGN_LR_WITH_REG(x) ++ #define AUTH_LR_AND_RET ret ++ #define AUTH_LR_WITH_REG(x) ++ #define BRANCH_AND_LINK_TO_REG blr ++ #define BRANCH_TO_REG br ++ #define PAC_CFI_WINDOW_SAVE ++ #endif /* HAVE_ARM64E_PTRAUTH */ ++#endif /* LIBFFI_ASM */ +diff --git a/src/aarch64/sysv.S b/src/aarch64/sysv.S +index 60cfa505b..6a9a5611f 100644 +--- a/src/aarch64/sysv.S ++++ b/src/aarch64/sysv.S +@@ -92,27 +92,27 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + cfi_startproc + CNAME(ffi_call_SYSV): + BTI_C +- /* Sign the lr with x1 since that is where it will be stored */ ++ PAC_CFI_WINDOW_SAVE ++ /* Sign the lr with x1 since that is the CFA which is the modifer used in auth instructions */ + SIGN_LR_WITH_REG(x1) + +- /* Use a stack frame allocated by our caller. */ +-#if defined(HAVE_PTRAUTH) && defined(__APPLE__) ++#if defined(HAVE_ARM64E_PTRAUTH) && defined(__APPLE__) + /* darwin's libunwind assumes that the cfa is the sp and that's the data + * used to sign the lr. In order to allow unwinding through this + * function it is necessary to point the cfa at the signing register. + */ + cfi_def_cfa(x1, 0); +-#else +- cfi_def_cfa(x1, 40); + #endif ++ /* Use a stack frame allocated by our caller. */ + stp x29, x30, [x1] ++ cfi_def_cfa_register(x1) ++ cfi_rel_offset (x29, 0) ++ cfi_rel_offset (x30, 8) + mov x9, sp + str x9, [x1, #32] + mov x29, x1 +- mov sp, x0 + cfi_def_cfa_register(x29) +- cfi_rel_offset (x29, 0) +- cfi_rel_offset (x30, 8) ++ mov sp, x0 + + mov x9, x2 /* save fn */ + mov x8, x3 /* install structure return */ +@@ -326,6 +326,7 @@ CNAME(ffi_closure_SYSV_V): + cfi_startproc + BTI_C + SIGN_LR ++ PAC_CFI_WINDOW_SAVE + stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! + cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) + cfi_rel_offset (x29, 0) +@@ -351,6 +352,7 @@ CNAME(ffi_closure_SYSV_V): + CNAME(ffi_closure_SYSV): + BTI_C + SIGN_LR ++ PAC_CFI_WINDOW_SAVE + stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! + cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) + cfi_rel_offset (x29, 0) +@@ -648,6 +650,8 @@ CNAME(ffi_go_closure_SYSV_V): + cfi_startproc + CNAME(ffi_go_closure_SYSV): + BTI_C ++ SIGN_LR_LINUX_ONLY ++ PAC_CFI_WINDOW_SAVE + stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! + cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) + cfi_rel_offset (x29, 0) +diff --git a/src/closures.c b/src/closures.c +index 67a94a822..02cf78fa2 100644 +--- a/src/closures.c ++++ b/src/closures.c +@@ -164,7 +164,7 @@ ffi_tramp_is_present (__attribute__((unused)) void *ptr) + + #include + #include +-#ifdef HAVE_PTRAUTH ++#ifdef HAVE_ARM64E_PTRAUTH + #include + #endif + #include +@@ -223,7 +223,7 @@ ffi_trampoline_table_alloc (void) + /* Remap the trampoline table on top of the placeholder page */ + trampoline_page = config_page + PAGE_MAX_SIZE; + +-#ifdef HAVE_PTRAUTH ++#ifdef HAVE_ARM64E_PTRAUTH + trampoline_page_template = (vm_address_t)(uintptr_t)ptrauth_auth_data((void *)&ffi_closure_trampoline_table_page, ptrauth_key_function_pointer, 0); + #else + trampoline_page_template = (vm_address_t)&ffi_closure_trampoline_table_page; +@@ -268,7 +268,7 @@ ffi_trampoline_table_alloc (void) + ffi_trampoline_table_entry *entry = &table->free_list_pool[i]; + entry->trampoline = + (void *) (trampoline_page + (i * FFI_TRAMPOLINE_SIZE)); +-#ifdef HAVE_PTRAUTH ++#ifdef HAVE_ARM64E_PTRAUTH + entry->trampoline = ptrauth_sign_unauthenticated(entry->trampoline, ptrauth_key_function_pointer, 0); + #endif + + diff --git a/dev-libs/libffi/files/libffi-3.4.6-asan.patch b/dev-libs/libffi/files/libffi-3.4.6-asan.patch new file mode 100644 index 000000000000..4c62f970a3c9 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-asan.patch @@ -0,0 +1,88 @@ +https://github.com/libffi/libffi/commit/01db744b4af8665f9b7494d00cc2a1cc45ee9636 + +From 01db744b4af8665f9b7494d00cc2a1cc45ee9636 Mon Sep 17 00:00:00 2001 +From: KJ Tsanaktsidis +Date: Fri, 20 Sep 2024 20:00:49 +1000 +Subject: [PATCH] Disable ASAN in ffi_call_int functions (#858) + +The pattern for several of the architectures is for ffi_call_int to +stack-allocate some arguments + the registers, and then +ffi_call_$ARCH will pop the top of that structure into registers, and +then adjust the stack pointer such that the alloca'd buffer _becomes_ +the stack-passed arguments for the function being called. + +If libffi is compiled with ASAN, then there will be a redzone inserted +after the alloca'd buffer which is marked as poisoned. This redzone +appears beyond the end of $sp upon entry to the called function. + +If the called function does anything to use this stack memory, ASAN will +notice that it's poisoned and report an error. + +This commit fixes the situation (on the architectures that I have access +to) disabling instrumentation for ffi_call_int; that means there will be +no alloca redzone left on the shadow-stack. +--- a/include/ffi_common.h ++++ b/include/ffi_common.h +@@ -83,6 +83,23 @@ char *alloca (); + #include + #endif + ++#ifndef __SANITIZE_ADDRESS__ ++# ifdef __clang__ ++# if __has_feature(address_sanitizer) ++# define FFI_ASAN ++# endif ++# endif ++#endif ++#ifdef __SANITIZE_ADDRESS__ ++#define FFI_ASAN ++#endif ++ ++#ifdef FFI_ASAN ++#define FFI_ASAN_NO_SANITIZE __attribute__((no_sanitize_address)) ++#else ++#define FFI_ASAN_NO_SANITIZE ++#endif ++ + #ifdef FFI_DEBUG + NORETURN void ffi_assert(const char *expr, const char *file, int line); + void ffi_stop_here(void); +--- a/src/aarch64/ffi.c ++++ b/src/aarch64/ffi.c +@@ -645,7 +645,10 @@ extern void ffi_call_SYSV (struct call_context *context, void *frame, + void *closure) FFI_HIDDEN; + + /* Call a function with the provided arguments and capture the return +- value. */ ++ value. ++ n.b. ffi_call_SYSV will steal the alloca'd `stack` variable here for use ++ _as its own stack_ - so we need to compile this function without ASAN */ ++FFI_ASAN_NO_SANITIZE + static void + ffi_call_int (ffi_cif *cif, void (*fn)(void), void *orig_rvalue, + void **avalue, void *closure) +--- a/src/x86/ffi.c ++++ b/src/x86/ffi.c +@@ -270,6 +270,9 @@ extern void FFI_DECLARE_FASTCALL ffi_call_i386(struct call_frame *, char *) FFI_ + #if defined(_MSC_VER) + #pragma runtime_checks("s", off) + #endif ++/* n.b. ffi_call_unix64 will steal the alloca'd `stack` variable here for use ++ _as its own stack_ - so we need to compile this function without ASAN */ ++FFI_ASAN_NO_SANITIZE + static void + ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) +--- a/src/x86/ffi64.c ++++ b/src/x86/ffi64.c +@@ -557,6 +557,9 @@ ffi_prep_cif_machdep (ffi_cif *cif) + return FFI_OK; + } + ++/* n.b. ffi_call_unix64 will steal the alloca'd `stack` variable here for use ++ _as its own stack_ - so we need to compile this function without ASAN */ ++FFI_ASAN_NO_SANITIZE + static void + ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) + diff --git a/dev-libs/libffi/files/libffi-3.4.6-regenerate-autotools.patch b/dev-libs/libffi/files/libffi-3.4.6-regenerate-autotools.patch new file mode 100644 index 000000000000..81fe671f509c --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-regenerate-autotools.patch @@ -0,0 +1,48 @@ +The arm64 patches we backported to 3.4.6 mean we need to autoreconf ourselves, +apply this patch to avoid needing to do it in the ebuild b/c of deps. +--- a/Makefile.in ++++ b/Makefile.in +@@ -330,8 +330,8 @@ am__define_uniq_tagged_files = \ + done | $(am__uniquify_input)` + DIST_SUBDIRS = include testsuite man doc + am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/fficonfig.h.in \ +- $(srcdir)/libffi.pc.in README.md compile config.guess \ +- config.sub depcomp install-sh ltmain.sh missing ++ $(srcdir)/libffi.pc.in ChangeLog README.md compile \ ++ config.guess config.sub depcomp install-sh ltmain.sh missing + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) +--- a/fficonfig.h.in ++++ b/fficonfig.h.in +@@ -31,6 +31,9 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_ALLOCA_H + ++/* Define if your compiler supports pointer authentication. */ ++#undef HAVE_ARM64E_PTRAUTH ++ + /* Define if your assembler supports .cfi_* directives. */ + #undef HAVE_AS_CFI_PSEUDO_OP + +@@ -71,9 +74,6 @@ + /* Define to 1 if you have the `memfd_create' function. */ + #undef HAVE_MEMFD_CREATE + +-/* Define if your compiler supports pointer authentication. */ +-#undef HAVE_PTRAUTH +- + /* Define if .eh_frame sections should be read-only. */ + #undef HAVE_RO_EH_FRAME + +--- a/testsuite/Makefile.in ++++ b/testsuite/Makefile.in +@@ -292,7 +292,7 @@ EXTRA_DEJAGNU_SITE_CONFIG = ../local.exp + CLEANFILES = *.exe core* *.log *.sum + EXTRA_DIST = config/default.exp emscripten/build.sh emscripten/conftest.py \ + emscripten/node-tests.sh emscripten/test.html emscripten/test_libffi.py \ +- emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ ++ emscripten/build-tests.sh lib/libffi.exp lib/target-libpath.exp \ + lib/wrapper.exp libffi.bhaible/Makefile libffi.bhaible/README \ + libffi.bhaible/alignof.h libffi.bhaible/bhaible.exp libffi.bhaible/test-call.c \ + libffi.bhaible/test-callback.c libffi.bhaible/testcases.c libffi.call/align_mixed.c \ diff --git a/dev-libs/libffi/files/libffi-3.4.6-sparc-struct-targs.patch b/dev-libs/libffi/files/libffi-3.4.6-sparc-struct-targs.patch new file mode 100644 index 000000000000..592e543f88ee --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-sparc-struct-targs.patch @@ -0,0 +1,47 @@ +https://github.com/libffi/libffi/issues/841 +https://github.com/libffi/libffi/commit/8e3ef965c2d0015ed129a06d0f11f30c2120a413 + +From 8e3ef965c2d0015ed129a06d0f11f30c2120a413 Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Fri, 28 Jun 2024 04:07:09 -0400 +Subject: [PATCH] Fix struct args (Rainer Orth) + +--- + src/sparc/ffi.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/sparc/ffi.c b/src/sparc/ffi.c +index 9e406d0af..cf819ee67 100644 +--- a/src/sparc/ffi.c ++++ b/src/sparc/ffi.c +@@ -286,6 +286,8 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) + { + size_t bytes = cif->bytes; ++ size_t i, nargs = cif->nargs; ++ ffi_type **arg_types = cif->arg_types; + + FFI_ASSERT (cif->abi == FFI_V8); + +@@ -295,6 +297,20 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + && (cif->flags & SPARC_FLAG_RET_MASK) == SPARC_RET_STRUCT) + bytes += FFI_ALIGN (cif->rtype->size, 8); + ++ /* If we have any structure arguments, make a copy so we are passing ++ by value. */ ++ for (i = 0; i < nargs; i++) ++ { ++ ffi_type *at = arg_types[i]; ++ int size = at->size; ++ if (at->type == FFI_TYPE_STRUCT) ++ { ++ char *argcopy = alloca (size); ++ memcpy (argcopy, avalue[i], size); ++ avalue[i] = argcopy; ++ } ++ } ++ + ffi_call_v8(cif, fn, rvalue, avalue, -bytes, closure); + } + + diff --git a/dev-libs/libffi/files/libffi-3.4.6-test-typo.patch b/dev-libs/libffi/files/libffi-3.4.6-test-typo.patch new file mode 100644 index 000000000000..78beab646470 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-test-typo.patch @@ -0,0 +1,19 @@ +https://github.com/libffi/libffi/commit/f7e4992789fa563b4cc74521c37ff703555da21c + +From f7e4992789fa563b4cc74521c37ff703555da21c Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 20 Sep 2024 10:58:06 +0100 +Subject: [PATCH] testsuite: fix dejagnu directive typo (#859) + +--- a/testsuite/libffi.complex/complex_int.c ++++ b/testsuite/libffi.complex/complex_int.c +@@ -76,7 +76,7 @@ int main (void) + + printf ("%d,%di %d,%di, x %d 1234, y %d 11110\n", + (int)tc_result, (int)(tc_result * -I), 2, 8, tc_int_arg_x, tc_y); +- /* dg-output "-2,8i 2,8i, x 1234 1234, y 11110 11110" */ ++ /* { dg-output "-2,8i 2,8i, x 1234 1234, y 11110 11110" } */ + CHECK (creal (tc_result) == -2); + CHECK (cimag (tc_result) == 8); + CHECK (tc_int_arg_x == 1234); + diff --git a/dev-libs/libffi/files/libffi-3.4.6-tests.patch b/dev-libs/libffi/files/libffi-3.4.6-tests.patch new file mode 100644 index 000000000000..e24d01f4c028 --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-tests.patch @@ -0,0 +1,104 @@ +https://github.com/libffi/libffi/commit/efb98a72d8b9bdb71b4f972efced073bee3b30fc +https://github.com/libffi/libffi/commit/92d384df196a099fde384f9178864dbfe8c6b0fc + +From efb98a72d8b9bdb71b4f972efced073bee3b30fc Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Sun, 15 Sep 2024 07:31:33 -0400 +Subject: [PATCH] Robustify floating point comparison in test + +--- + testsuite/libffi.call/struct_int_float.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/testsuite/libffi.call/struct_int_float.c b/testsuite/libffi.call/struct_int_float.c +index dab1d1fed..82685814c 100644 +--- a/testsuite/libffi.call/struct_int_float.c ++++ b/testsuite/libffi.call/struct_int_float.c +@@ -54,35 +54,35 @@ int main (void) + values[4] = &ts_arg[4]; + args[5] = &ts_type; + values[5] = &ts_arg[5]; +- ++ + /* Initialize the cif */ + CHECK(ffi_prep_cif(&cif, ABI_NUM, 6, &ffi_type_float, args) == FFI_OK); +- ++ + ts_arg[0].i = 1; +- ts_arg[0].f = 1.11f; ++ ts_arg[0].f = 11.11f; + ts_arg[1].i = 2; +- ts_arg[1].f = 2.22f; ++ ts_arg[1].f = 22.22f; + ts_arg[2].i = 3; +- ts_arg[2].f = 3.33f; ++ ts_arg[2].f = 33.33f; + ts_arg[3].i = 4; +- ts_arg[3].f = 4.44f; ++ ts_arg[3].f = 44.44f; + ts_arg[4].i = 5; +- ts_arg[4].f = 5.55f; ++ ts_arg[4].f = 55.55f; + ts_arg[5].i = 6; +- ts_arg[5].f = 6.66f; +- ++ ts_arg[5].f = 66.66f; ++ + printf ("%g\n", ts_arg[0].f); + printf ("%g\n", ts_arg[1].f); + printf ("%g\n", ts_arg[2].f); + printf ("%g\n", ts_arg[3].f); + printf ("%g\n", ts_arg[4].f); + printf ("%g\n", ts_arg[5].f); +- ++ + ffi_call(&cif, FFI_FN(struct_int_float), &rfloat, values); + + printf ("%g\n", rfloat); +- +- CHECK(rfloat == 1.11f); ++ ++ CHECK(fabs(rfloat - 11.11) < FLT_EPSILON); + + exit(0); + } + +From 92d384df196a099fde384f9178864dbfe8c6b0fc Mon Sep 17 00:00:00 2001 +From: Anthony Green +Date: Sun, 15 Sep 2024 12:32:29 -0400 +Subject: [PATCH] Fix floating point compare + +--- + testsuite/libffi.call/struct_int_float.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/testsuite/libffi.call/struct_int_float.c b/testsuite/libffi.call/struct_int_float.c +index 82685814..66ef6c45 100644 +--- a/testsuite/libffi.call/struct_int_float.c ++++ b/testsuite/libffi.call/struct_int_float.c +@@ -14,11 +14,11 @@ typedef struct + } test_structure_int_float; + + static float ABI_ATTR struct_int_float(test_structure_int_float ts1, +- test_structure_int_float ts2, +- test_structure_int_float ts3, +- test_structure_int_float ts4, +- test_structure_int_float ts5, +- test_structure_int_float ts6) ++ test_structure_int_float ts2 __UNUSED__, ++ test_structure_int_float ts3 __UNUSED__, ++ test_structure_int_float ts4 __UNUSED__, ++ test_structure_int_float ts5 __UNUSED__, ++ test_structure_int_float ts6 __UNUSED__) + { + return ts1.f; + } +@@ -82,7 +82,7 @@ int main (void) + + printf ("%g\n", rfloat); + +- CHECK(fabs(rfloat - 11.11) < FLT_EPSILON); ++ CHECK(fabs(rfloat - 11.11) < 3 * FLT_EPSILON); + + exit(0); + } diff --git a/dev-libs/libffi/files/libffi-3.4.6-x86-sse.patch b/dev-libs/libffi/files/libffi-3.4.6-x86-sse.patch new file mode 100644 index 000000000000..75c0e892ef3a --- /dev/null +++ b/dev-libs/libffi/files/libffi-3.4.6-x86-sse.patch @@ -0,0 +1,124 @@ +https://github.com/libffi/libffi/commit/d21881f55ed4a44d464c9091871e69b0bb47611a + +From d21881f55ed4a44d464c9091871e69b0bb47611a Mon Sep 17 00:00:00 2001 +From: kellda <59569234+kellda@users.noreply.github.com> +Date: Sun, 15 Sep 2024 13:29:42 +0200 +Subject: [PATCH] Fix x86/ffi64 calls with 6 gp and some sse registers (#848) + +* Fix x86/ffi64 calls with 6 gp and some sse registers + +* Add test demonstating issue when mixing gp and sse registers +--- + src/x86/ffi64.c | 2 +- + testsuite/libffi.call/struct_int_float.c | 88 ++++++++++++++++++++++++ + 2 files changed, 89 insertions(+), 1 deletion(-) + create mode 100644 testsuite/libffi.call/struct_int_float.c + +diff --git a/src/x86/ffi64.c b/src/x86/ffi64.c +index 6a8e37fc5..39f0bfd33 100644 +--- a/src/x86/ffi64.c ++++ b/src/x86/ffi64.c +@@ -651,7 +651,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + break; + default: + reg_args->gpr[gprcount] = 0; +- memcpy (®_args->gpr[gprcount], a, size); ++ memcpy (®_args->gpr[gprcount], a, sizeof(UINT64)); + } + gprcount++; + break; +diff --git a/testsuite/libffi.call/struct_int_float.c b/testsuite/libffi.call/struct_int_float.c +new file mode 100644 +index 000000000..dab1d1fed +--- /dev/null ++++ b/testsuite/libffi.call/struct_int_float.c +@@ -0,0 +1,88 @@ ++/* Area: ffi_call ++ Purpose: Demonstrate structures with integers corrupting earlier floats ++ Limitations: none. ++ PR: #848 ++ Originator: kellda */ ++ ++/* { dg-do run } */ ++#include "ffitest.h" ++ ++typedef struct ++{ ++ unsigned long i; ++ float f; ++} test_structure_int_float; ++ ++static float ABI_ATTR struct_int_float(test_structure_int_float ts1, ++ test_structure_int_float ts2, ++ test_structure_int_float ts3, ++ test_structure_int_float ts4, ++ test_structure_int_float ts5, ++ test_structure_int_float ts6) ++{ ++ return ts1.f; ++} ++ ++int main (void) ++{ ++ ffi_cif cif; ++ ffi_type *args[MAX_ARGS]; ++ void *values[MAX_ARGS]; ++ ffi_type ts_type; ++ ffi_type *ts_type_elements[3]; ++ float rfloat; ++ ++ test_structure_int_float ts_arg[6]; ++ ++ ts_type.size = 0; ++ ts_type.alignment = 0; ++ ts_type.type = FFI_TYPE_STRUCT; ++ ts_type.elements = ts_type_elements; ++ ts_type_elements[0] = &ffi_type_ulong; ++ ts_type_elements[1] = &ffi_type_float; ++ ts_type_elements[2] = NULL; ++ ++ args[0] = &ts_type; ++ values[0] = &ts_arg[0]; ++ args[1] = &ts_type; ++ values[1] = &ts_arg[1]; ++ args[2] = &ts_type; ++ values[2] = &ts_arg[2]; ++ args[3] = &ts_type; ++ values[3] = &ts_arg[3]; ++ args[4] = &ts_type; ++ values[4] = &ts_arg[4]; ++ args[5] = &ts_type; ++ values[5] = &ts_arg[5]; ++ ++ /* Initialize the cif */ ++ CHECK(ffi_prep_cif(&cif, ABI_NUM, 6, &ffi_type_float, args) == FFI_OK); ++ ++ ts_arg[0].i = 1; ++ ts_arg[0].f = 1.11f; ++ ts_arg[1].i = 2; ++ ts_arg[1].f = 2.22f; ++ ts_arg[2].i = 3; ++ ts_arg[2].f = 3.33f; ++ ts_arg[3].i = 4; ++ ts_arg[3].f = 4.44f; ++ ts_arg[4].i = 5; ++ ts_arg[4].f = 5.55f; ++ ts_arg[5].i = 6; ++ ts_arg[5].f = 6.66f; ++ ++ printf ("%g\n", ts_arg[0].f); ++ printf ("%g\n", ts_arg[1].f); ++ printf ("%g\n", ts_arg[2].f); ++ printf ("%g\n", ts_arg[3].f); ++ printf ("%g\n", ts_arg[4].f); ++ printf ("%g\n", ts_arg[5].f); ++ ++ ffi_call(&cif, FFI_FN(struct_int_float), &rfloat, values); ++ ++ printf ("%g\n", rfloat); ++ ++ CHECK(rfloat == 1.11f); ++ ++ exit(0); ++} + diff --git a/dev-libs/libffi/libffi-3.4.6-r2.ebuild b/dev-libs/libffi/libffi-3.4.6-r2.ebuild new file mode 100644 index 000000000000..2235dc0d702f --- /dev/null +++ b/dev-libs/libffi/libffi-3.4.6-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal preserve-libs + +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Portable, high level programming interface to various calling conventions" +HOMEPAGE="https://sourceware.org/libffi/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/libffi/libffi" + inherit git-r3 +else + SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="MIT" +# This is a core package which is depended on by e.g. Python. +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users +# with FEATURES="-preserved-libs" or another package manager if SONAME changes. +SLOT="0/8" # SONAME=libffi.so.8 +IUSE="debug exec-static-trampoline pax-kernel static-libs test" + +RESTRICT="!test? ( test )" +BDEPEND="test? ( dev-util/dejagnu )" + +PATCHES=( + "${FILESDIR}"/${P}-arm64-bti.patch + "${FILESDIR}"/${P}-arm64-bti-spelling.patch + "${FILESDIR}"/${P}-arm64-support-pac.patch + "${FILESDIR}"/${P}-arm64-fix-build.patch + "${FILESDIR}"/${P}-sparc-struct-targs.patch + "${FILESDIR}"/${P}-test-typo.patch + "${FILESDIR}"/${P}-x86-sse.patch + "${FILESDIR}"/${P}-arm64-cfi.patch + "${FILESDIR}"/${P}-asan.patch + "${FILESDIR}"/${P}-tests.patch + "${FILESDIR}"/${P}-regenerate-autotools.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == arm64-*-darwin* ]] ; then + # ensure we use aarch64 asm, not x86 on arm64 + sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ + configure configure.host || die + fi +} + +multilib_src_configure() { + # --includedir= path maintains a few properties: + # 1. have stable name across libffi versions: some packages like + # dev-lang/ghc or kde-frameworks/networkmanager-qt embed + # ${includedir} at build-time. Don't require those to be + # rebuilt unless SONAME changes. bug #695788 + # + # We use /usr/.../${PN} (instead of former /usr/.../${P}). + # + # 2. have ${ABI}-specific location as ffi.h is target-dependent. + # + # We use /usr/$(get_libdir)/... to have ABI identifier. + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ + --disable-multi-os-directory \ + $(use_enable static-libs static) \ + $(use_enable exec-static-trampoline exec-static-tramp) \ + $(use_enable pax-kernel pax_emutramp) \ + $(use_enable debug) +} + +multilib_src_test() { + emake -Onone check +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name "*.la" -delete || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/libffi.so.7 +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7 +} diff --git a/dev-libs/libffi/libffi-9999.ebuild b/dev-libs/libffi/libffi-9999.ebuild new file mode 100644 index 000000000000..51d1f5c466e6 --- /dev/null +++ b/dev-libs/libffi/libffi-9999.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal preserve-libs + +MY_PV=${PV/_rc/-rc} +MY_P=${PN}-${MY_PV} + +DESCRIPTION="Portable, high level programming interface to various calling conventions" +HOMEPAGE="https://sourceware.org/libffi/" + +if [[ ${PV} == 9999 ]] ; then + EGIT_REPO_URI="https://github.com/libffi/libffi" + inherit git-r3 +else + SRC_URI="https://github.com/libffi/libffi/releases/download/v${MY_PV}/${MY_P}.tar.gz" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +S="${WORKDIR}"/${MY_P} + +LICENSE="MIT" +# This is a core package which is depended on by e.g. Python. +# Please use preserve-libs.eclass in pkg_{pre,post}inst to cover users +# with FEATURES="-preserved-libs" or another package manager if SONAME changes. +SLOT="0/8" # SONAME=libffi.so.8 +IUSE="debug exec-static-trampoline pax-kernel static-libs test" + +RESTRICT="!test? ( test )" +BDEPEND="test? ( dev-util/dejagnu )" + +src_prepare() { + default + + if [[ ${CHOST} == arm64-*-darwin* ]] ; then + # ensure we use aarch64 asm, not x86 on arm64 + sed -i -e 's/aarch64\*-\*-\*/arm64*-*-*|&/' \ + configure configure.host || die + fi +} + +multilib_src_configure() { + # --includedir= path maintains a few properties: + # 1. have stable name across libffi versions: some packages like + # dev-lang/ghc or kde-frameworks/networkmanager-qt embed + # ${includedir} at build-time. Don't require those to be + # rebuilt unless SONAME changes. bug #695788 + # + # We use /usr/.../${PN} (instead of former /usr/.../${P}). + # + # 2. have ${ABI}-specific location as ffi.h is target-dependent. + # + # We use /usr/$(get_libdir)/... to have ABI identifier. + ECONF_SOURCE="${S}" econf \ + --includedir="${EPREFIX}"/usr/$(get_libdir)/${PN}/include \ + --disable-multi-os-directory \ + $(use_enable static-libs static) \ + $(use_enable exec-static-trampoline exec-static-tramp) \ + $(use_enable pax-kernel pax_emutramp) \ + $(use_enable debug) +} + +multilib_src_test() { + emake -Onone check +} + +multilib_src_install_all() { + einstalldocs + find "${ED}" -name "*.la" -delete || die +} + +pkg_preinst() { + preserve_old_lib /usr/$(get_libdir)/libffi.so.7 +} + +pkg_postinst() { + preserve_old_lib_notify /usr/$(get_libdir)/libffi.so.7 +} diff --git a/dev-libs/libqtxdg/Manifest b/dev-libs/libqtxdg/Manifest index cc71632f0884..2c704947cacb 100644 --- a/dev-libs/libqtxdg/Manifest +++ b/dev-libs/libqtxdg/Manifest @@ -1,7 +1,9 @@ DIST libqtxdg-3.11.0.tar.xz 71688 BLAKE2B df5f9ebe6d964a23c89402419e4b6e27812a25d96d065e64c05348fe833e2c27c06e11260c8c58999b232eaf154404549100b81325e02ec7c10eaa40d68ff4cd SHA512 494140fa35e184c128c851f06501b5c62324a796d3f61ed47b750dbdffff756c1a42240d4458797e2f2f01c9b06b997f0fbfc76fe7f99866f7cad084ac1342f7 DIST libqtxdg-3.12.0.tar.xz 71684 BLAKE2B 909fe97ccd8815d9d923d440abef9f0e9cf28fa8e18220f6998e69ff17a1bbb28b37c734758c01cb0a9537464fb0dd2f38b1f61640fd8468c30f8aac57e62106 SHA512 9db46b0dddb027a24e1c19a2e3679014735cc246f15d32bc5fb9e778cd7d8fb57c9b105f819091308002f0a2eff8269920ecc0d7bd5ce8a01fbaf0b37e61a76e DIST libqtxdg-4.0.0.tar.xz 71508 BLAKE2B 823bfaba4ea1beb88b064d4935e7c660569b9215aa9f40b7ad6e3ffab965259467d968cd6b5f0c42c2912478d2766d52d52f0296d9eb3586c45ac5ddd7b97ed7 SHA512 4a8a32968e74ed54d700cf65c9cfb238001f58d93a9e374e18d60023615d6277f80459dd8477205ce31a6d8caf798cde70b91681df80b1bff3b754e0586868d2 +DIST libqtxdg-4.0.1.tar.xz 71964 BLAKE2B 11c45e8e27a539e8c9b001667479e7a7c447937f82fd17a4b89ed9ba9d263ea416664b8f0b288d41eb27a63842fe9de563fe34efa0097c6af63f1340f45f9006 SHA512 767210f6a42375da48db26f7f9e005c5bf18230cee58351d52849b7451e54b45e91aef1226a3f5b8db78cd68a18c9208a94a2077c964430cc3384027ef29898b EBUILD libqtxdg-3.11.0.ebuild 1193 BLAKE2B 60055e4009b7900a4d7d489dacb32ecf1f5a0efca9f9d8540131e550f9975c6ba7df6f53721c4dc92616153d00eee7560be39eadb6dfc0bc4c08d4c74fe7ea46 SHA512 772af66e9b8dc875bdbd4dd6fe30e631b2326574487d191e86fa3d967419b14d82dc06cfec81b0e85b596f72d83d24ebf7c4ee7dff50f809be99726846799f5c EBUILD libqtxdg-3.12.0.ebuild 1193 BLAKE2B a61c555c4313db88f2a0510cb622142401a47f717af7324bf710d4af0f04bae422330736f6976866335190eb5a94f0ef27471da6d501ebac595badeb43951802 SHA512 53992aeb65dee90268cda844f3877c14dd9431018230f7ef6e374298cc3a6e244af71f28e2900e977745382199e9a97222bdb2eabfe92d76f83d62e089b6d63d EBUILD libqtxdg-4.0.0.ebuild 1075 BLAKE2B 3101e61c1b1972d333e1d41d9683ad7afc2f3932686317893878af9af9e8261b040001f6b719ffdbef225ca227da569fc433ac57b189ca1696df1cacaf90d296 SHA512 7461450cdd0ca7ac586c235c7c6465275c3a8fa945fde165e90d5696bce5b6bb22a58a8cbd64ca390d375217e2f21a062e425b36f37f865ea3afd727649a3ce3 +EBUILD libqtxdg-4.0.1.ebuild 1077 BLAKE2B 2edcfd6c5526da8938e4384f33a0f698ac741d27c1126334b2579afbff71ca06a88396de9d56ff29cef69e47104aafda9a4865ec7d4748547c857f853c75f864 SHA512 ac21ce565c13575751efc35d38a594108e3377800894a40ec7ac37110d4ffe601a97c3b86d078564027f70882bd41aad49bdc76117d6f4a09cb0f73e852d571d MISC metadata.xml 315 BLAKE2B 6a1fa84e6e1b91af913f0b00257961e03ef8607723e7f585f57ee131d09a7e406e9cbcd77cd035e6e003a3eda582ede77580e0568457036e682cd569eb0b1c6c SHA512 d4ee7f4e49f8258a956b397b6ff352fe0f1d53cb350717b01f8eda431d7f62976c338b4768a6bd9c842f29fcd76023240c1f5a39df43ed4bda967c23ef0dfcbd diff --git a/dev-libs/libqtxdg/libqtxdg-4.0.1.ebuild b/dev-libs/libqtxdg/libqtxdg-4.0.1.ebuild new file mode 100644 index 000000000000..8a3e5e971426 --- /dev/null +++ b/dev-libs/libqtxdg/libqtxdg-4.0.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake optfeature virtualx + +DESCRIPTION="Qt Implementation of XDG Standards" +HOMEPAGE="https://lxqt-project.org/" + +if [[ ${PV} == 9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/lxqt/${PN}.git" +else + SRC_URI="https://github.com/lxqt/${PN}/releases/download/${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" +fi + +LICENSE="LGPL-2.1+ Nokia-Qt-LGPL-Exception-1.1" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + >=dev-util/lxqt-build-tools-2.0.0 + virtual/pkgconfig +" +RDEPEND=" + dev-libs/glib:2 + >=dev-qt/qtbase-6.6:6=[dbus,gui,widgets,xml] + >=dev-qt/qtsvg-6.6:6 + x11-misc/xdg-utils +" +DEPEND="${RDEPEND}" + +src_configure() { + local mycmakeargs=( + -DBUILD_TESTS=$(usex test) + ) + + cmake_src_configure +} + +src_test() { + # Tests don't work with C + LC_ALL=en_US.utf8 virtx cmake_src_test +} + +pkg_postinst() { + ! has_version lxqt-base/lxqt-meta && optfeature "features that require a terminal emulator" x11-terms/xterm +} diff --git a/dev-libs/libuv/Manifest b/dev-libs/libuv/Manifest index ce0efb0af3b5..2e92a9baa0e5 100644 --- a/dev-libs/libuv/Manifest +++ b/dev-libs/libuv/Manifest @@ -4,7 +4,10 @@ DIST libuv-1.48.0.tar.gz 1314877 BLAKE2B 7595797ab732109516ce280fa2efa3474e82e78 DIST libuv-1.48.0.tar.gz.sig 833 BLAKE2B f0982f7723fa81afe3fe668fc4497fb182a6093f38b185aba4f7359a3248062e7953acaba3f7fd739c9ff5b590664e4b7b81ee138442ffccd46c989c0a10345b SHA512 3a6441bb250badb7bb54a102dd7a1cf47ee4e0ed93ff0369c5b6a4b1e5440e613d85530f19c9ebdc586a97dfe1e06af09e2f90c13448e875dbaee1c703efa955 DIST libuv-1.49.0.tar.gz 1331420 BLAKE2B f939df07e7e120cdb5c489a6146b220d9d85aa511342c1d2c143b6754eeeea8435e9410891bd281c6ddccdcb5921239cac0950e5fb7c0dc7f258ed7fdc096187 SHA512 36da82ff3f9b54ebfc8bdbf668ef2ae8845591a9fd01daf4f1ea4d1ac4db93c3f7877f6fc5f0a542eb4ff1eade5fd747a0905d98fe1c55a6effabc1f4131d59d DIST libuv-1.49.0.tar.gz.sig 833 BLAKE2B aa37c82779d2e904b5b1cdac802573fe30a570f83a818f94eed87d4b7a45a83e6fa02f0f2a06e24a8b01561bbe1b647bc931670c78af79301ba0aa08e6c0c708 SHA512 ad86a158179f5b8961aba701f0fdc16906383158cceb1ab2e23a7d5caa31ee4d87e9260ba6d04aa16719254e9b8d9e85066e2352d02006d231f4898235525fe6 +DIST libuv-1.49.1.tar.gz 1332225 BLAKE2B 7a56817c94060629456a53026c142d74d72d2777a4e433bd370d76c93c8ae7a775d9cb9362241ce563948dd01a2b4bbe5d3bc10c014687fa9aff38b2fde98ccf SHA512 f0a55fd5e91b87418ec22b0bd607a9b46510296c8a33600878a6454033b0d1bc7b4b674255007e94b38057635c024f7cbff187e7c0f0e0d627604636c3ad3497 +DIST libuv-1.49.1.tar.gz.sig 833 BLAKE2B 826f6c97806a474c6b1f77b11b553d5f26d1c25261d9f25f4318552e1e4291cff56a4d5c9a7059ad938dc792e7015eab11d84132553e66c4ac164a847eb9d6dd SHA512 49ffdb678afb5c1c899745102e7d884d4a7bb933e88066cff82ef7c939bdbde5b2fa8e22094cdb75ed77697eef559dfa7f22d66d6a65b3a43a8a9d2cca4d7fd3 EBUILD libuv-1.48.0.ebuild 1490 BLAKE2B cd78b4c26ca5124eea32b282a8dee4f812dd7c3877ebfff63c396adae14219023ee104523bbd9a4ccffb9a5995d0778e4f3a4a6db27327210b7bc9d6c26e98ea SHA512 f1272e7c7ee9d2e3267fe4790613d2ec58806e121231db0be4a6879a05d784eb6f9a4fea84288bd6d2fd0ef09a0229b07ac3e0f41c67bf4071e05358a7efb900 EBUILD libuv-1.49.0.ebuild 1498 BLAKE2B 8af6d1e02f579ce490368cadca2d18f47bac3d628881c3a1c3718c5d679cd489b4ff4222dfc871057665ed27ec52372183d29f766c9b3dc1af5db7e27b9d7d05 SHA512 3cfb7f5bf91356f67977e772c67fb91edc94cb4c463d056f3f9e8c945b8be06815fbef84125f72eb5a67a95301d21a7f7bd663a4dac4d2e9640b205025a4b99b +EBUILD libuv-1.49.1.ebuild 1498 BLAKE2B 8af6d1e02f579ce490368cadca2d18f47bac3d628881c3a1c3718c5d679cd489b4ff4222dfc871057665ed27ec52372183d29f766c9b3dc1af5db7e27b9d7d05 SHA512 3cfb7f5bf91356f67977e772c67fb91edc94cb4c463d056f3f9e8c945b8be06815fbef84125f72eb5a67a95301d21a7f7bd663a4dac4d2e9640b205025a4b99b EBUILD libuv-9999.ebuild 1498 BLAKE2B 8af6d1e02f579ce490368cadca2d18f47bac3d628881c3a1c3718c5d679cd489b4ff4222dfc871057665ed27ec52372183d29f766c9b3dc1af5db7e27b9d7d05 SHA512 3cfb7f5bf91356f67977e772c67fb91edc94cb4c463d056f3f9e8c945b8be06815fbef84125f72eb5a67a95301d21a7f7bd663a4dac4d2e9640b205025a4b99b MISC metadata.xml 1426 BLAKE2B 79a040706bd2e88560fdf7cdd75226c51384f1b27f8f86798f3a694d1d4b02ce309edef4f1921f73e498533e37deff9051ebdaa6ae565defabe9d4546aa33bd4 SHA512 a6fa2c3217de06d7d324b37b00e0cb19e8d0b192cd10736d32f5d459c701c14a6aa296d7d4d292f7c56120953423df0068f3f71495941295c97e86c283b084d3 diff --git a/dev-libs/libuv/libuv-1.49.1.ebuild b/dev-libs/libuv/libuv-1.49.1.ebuild new file mode 100644 index 000000000000..859c1fae34d0 --- /dev/null +++ b/dev-libs/libuv/libuv-1.49.1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libuv.asc +inherit autotools verify-sig + +DESCRIPTION="Cross-platform asychronous I/O" +HOMEPAGE="https://github.com/libuv/libuv" + +if [[ ${PV} = 9999* ]]; then + EGIT_REPO_URI="https://github.com/libuv/libuv.git" + inherit git-r3 +else + SRC_URI=" + https://dist.libuv.org/dist/v${PV}/libuv-v${PV}.tar.gz -> ${P}.tar.gz + verify-sig? ( https://dist.libuv.org/dist/v${PV}/libuv-v${PV}.tar.gz.sign -> ${P}.tar.gz.sig ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" + S="${WORKDIR}/${PN}-v${PV}" +fi + +LICENSE="BSD BSD-2 ISC MIT" +SLOT="0/1" + +BDEPEND=" + dev-build/libtool + virtual/pkgconfig + verify-sig? ( sec-keys/openpgp-keys-libuv ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.48.0-test-thread-priority-portage.patch +) + +src_prepare() { + default + + if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then + eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch + fi + + # Upstream fails to ship a configure script and has missing m4 file. + echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ + > m4/libuv-extra-automake-flags.m4 || die + eautoreconf +} + +src_configure() { + local myeconfargs=( + cc_cv_cflags__g=no + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + find "${ED}" -name '*.la' -delete || die +} -- cgit v1.2.3