darwin.libffi: backport automake-1.18 fix

Attempt to fix build failure reported at https://github.com/NixOS/nixpkgs/pull/340373#issuecomment-3122173611.
This commit is contained in:
Sergei Trofimovich
2025-07-26 21:43:22 +01:00
parent 6a1097d4c4
commit 73cfabbf21
2 changed files with 16 additions and 0 deletions
@@ -27,6 +27,8 @@ mkAppleDerivation (finalAttrs: {
./patches/llvm-18-compatibility.patch
# Fix a memory leak when using the trampoline dylib. See https://github.com/libffi/libffi/pull/621#discussion_r955298301.
./patches/fix-tramponline-memory-leak.patch
# Fix automake-18.18 compatibility, https://github.com/libffi/libffi/issues/853#issuecomment-2909994482
./patches/automake-1.18.patch
];
# Make sure libffi is using the trampolines dylib in this package not the system one.
@@ -0,0 +1,14 @@
The hunk is used from https://github.com/libffi/libffi/issues/853#issuecomment-2909994482
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,10 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4
+# Alias required by AX_ENABLE_BUILDDIR / config-ml
+.PHONY: all-configured
+all-configured: all
+
SUBDIRS = include testsuite man
if BUILD_DOCS
## This hack is needed because it doesn't seem possible to make a