From 3fd1fd6948a35aead173a854068f191a19da23d5 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Wed, 11 Jun 2025 07:15:36 -0700 Subject: [PATCH] build: update ffi, gettext, and libpng to fix Xcode 26 build --- UTM.xcodeproj/project.pbxproj | 36 +- patches/gettext-0.22.5.patch | 10 + patches/libffi-3.3.patch | 900 ---------------------------------- patches/sources | 4 +- 4 files changed, 30 insertions(+), 920 deletions(-) delete mode 100644 patches/libffi-3.3.patch diff --git a/UTM.xcodeproj/project.pbxproj b/UTM.xcodeproj/project.pbxproj index bb9cd528..5a4de9b8 100644 --- a/UTM.xcodeproj/project.pbxproj +++ b/UTM.xcodeproj/project.pbxproj @@ -303,8 +303,8 @@ CE03D08F24D9124200F76B84 /* gobject-2.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63F522653C7400FC7E63 /* gobject-2.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE03D09024D9124800F76B84 /* intl.8.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63DA22653C7300FC7E63 /* intl.8.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE03D09124D9124900F76B84 /* jpeg.62.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63D922653C7300FC7E63 /* jpeg.62.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - CE03D0C424D913AA00F76B84 /* ffi.7.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; }; - CE03D0C524D913AF00F76B84 /* ffi.7.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + CE03D0C424D913AA00F76B84 /* ffi.8.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; }; + CE03D0C524D913AF00F76B84 /* ffi.8.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE03D0C624D913C600F76B84 /* opus.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D640322653C7500FC7E63 /* opus.0.framework */; }; CE03D0C724D913E600F76B84 /* opus.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D640322653C7500FC7E63 /* opus.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE03D0C824D913FD00F76B84 /* pixman-1.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D641922653C7600FC7E63 /* pixman-1.0.framework */; }; @@ -495,7 +495,7 @@ CE2D934724AD46670059923A /* gstriff-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63DE22653C7400FC7E63 /* gstriff-1.0.0.framework */; }; CE2D934924AD46670059923A /* gstreamer-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E022653C7400FC7E63 /* gstreamer-1.0.0.framework */; }; CE2D934B24AD46670059923A /* json-glib-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E222653C7400FC7E63 /* json-glib-1.0.0.framework */; }; - CE2D934C24AD46670059923A /* ffi.7.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; }; + CE2D934C24AD46670059923A /* ffi.8.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; }; CE2D934D24AD46670059923A /* gstnet-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E522653C7400FC7E63 /* gstnet-1.0.0.framework */; }; CE2D934E24AD46670059923A /* gstbase-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; }; CE2D934F24AD46670059923A /* phodav-3.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE059DC0243BD67100338317 /* phodav-3.0.0.framework */; }; @@ -530,7 +530,7 @@ CE2D937824AD46670059923A /* gstcontroller-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63EE22653C7400FC7E63 /* gstcontroller-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE2D937924AD46670059923A /* gstallocators-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641122653C7500FC7E63 /* gstallocators-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE2D937A24AD46670059923A /* gstbase-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - CE2D937B24AD46670059923A /* ffi.7.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + CE2D937B24AD46670059923A /* ffi.8.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE2D937C24AD46670059923A /* ssl.1.1.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641722653C7500FC7E63 /* ssl.1.1.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE2D937D24AD46670059923A /* gio-2.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63F822653C7400FC7E63 /* gio-2.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CE2D937E24AD46670059923A /* png16.16.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D640522653C7500FC7E63 /* png16.16.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -769,7 +769,7 @@ CEA45F3F263519B5002FA97D /* gstriff-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63DE22653C7400FC7E63 /* gstriff-1.0.0.framework */; }; CEA45F41263519B5002FA97D /* gstreamer-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E022653C7400FC7E63 /* gstreamer-1.0.0.framework */; }; CEA45F42263519B5002FA97D /* json-glib-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E222653C7400FC7E63 /* json-glib-1.0.0.framework */; }; - CEA45F43263519B5002FA97D /* ffi.7.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; }; + CEA45F43263519B5002FA97D /* ffi.8.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; }; CEA45F44263519B5002FA97D /* gstnet-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E522653C7400FC7E63 /* gstnet-1.0.0.framework */; }; CEA45F45263519B5002FA97D /* gstbase-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; }; CEA45F46263519B5002FA97D /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = CEA45E20263519B5002FA97D /* Logging */; }; @@ -807,7 +807,7 @@ CEA45F74263519B5002FA97D /* gstcontroller-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63EE22653C7400FC7E63 /* gstcontroller-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEA45F75263519B5002FA97D /* gstallocators-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641122653C7500FC7E63 /* gstallocators-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEA45F76263519B5002FA97D /* gstbase-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - CEA45F77263519B5002FA97D /* ffi.7.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + CEA45F77263519B5002FA97D /* ffi.8.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEA45F78263519B5002FA97D /* ssl.1.1.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641722653C7500FC7E63 /* ssl.1.1.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEA45F7A263519B5002FA97D /* gio-2.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63F822653C7400FC7E63 /* gio-2.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEA45F7B263519B5002FA97D /* png16.16.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D640522653C7500FC7E63 /* png16.16.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -1141,7 +1141,7 @@ CEF7F6512AEEDCC400E34952 /* AVFAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84818C0B2898A07A009EDB67 /* AVFAudio.framework */; }; CEF7F6522AEEDCC400E34952 /* gstreamer-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E022653C7400FC7E63 /* gstreamer-1.0.0.framework */; }; CEF7F6532AEEDCC400E34952 /* json-glib-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E222653C7400FC7E63 /* json-glib-1.0.0.framework */; }; - CEF7F6542AEEDCC400E34952 /* ffi.7.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; }; + CEF7F6542AEEDCC400E34952 /* ffi.8.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; }; CEF7F6552AEEDCC400E34952 /* gstnet-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E522653C7400FC7E63 /* gstnet-1.0.0.framework */; }; CEF7F6562AEEDCC400E34952 /* gstbase-1.0.0.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; }; CEF7F6572AEEDCC400E34952 /* Logging in Frameworks */ = {isa = PBXBuildFile; productRef = CEF7F5842AEEDCC400E34952 /* Logging */; }; @@ -1182,7 +1182,7 @@ CEF7F6852AEEDCC400E34952 /* gstcontroller-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63EE22653C7400FC7E63 /* gstcontroller-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEF7F6862AEEDCC400E34952 /* gstallocators-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641122653C7500FC7E63 /* gstallocators-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEF7F6872AEEDCC400E34952 /* gstbase-1.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E822653C7400FC7E63 /* gstbase-1.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; - CEF7F6882AEEDCC400E34952 /* ffi.7.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.7.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + CEF7F6882AEEDCC400E34952 /* ffi.8.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63E322653C7400FC7E63 /* ffi.8.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEF7F6892AEEDCC400E34952 /* ssl.1.1.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D641722653C7500FC7E63 /* ssl.1.1.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEF7F68B2AEEDCC400E34952 /* gio-2.0.0.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D63F822653C7400FC7E63 /* gio-2.0.0.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; CEF7F68D2AEEDCC400E34952 /* png16.16.framework in Embed Libraries */ = {isa = PBXBuildFile; fileRef = CE2D640522653C7500FC7E63 /* png16.16.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -1330,7 +1330,7 @@ CE03D0CF24D9A33000F76B84 /* iconv.2.framework in Embed Libraries */, CE03D0CD24D9144500F76B84 /* crypto.1.1.framework in Embed Libraries */, CE03D08E24D9124100F76B84 /* gmodule-2.0.0.framework in Embed Libraries */, - CE03D0C524D913AF00F76B84 /* ffi.7.framework in Embed Libraries */, + CE03D0C524D913AF00F76B84 /* ffi.8.framework in Embed Libraries */, CEF83F8D250094E700557D15 /* gthread-2.0.0.framework in Embed Libraries */, CE064C662A563F4B003C833D /* swtpm.0.framework in Embed Libraries */, CE03D09024D9124800F76B84 /* intl.8.framework in Embed Libraries */, @@ -1388,7 +1388,7 @@ CE2D937824AD46670059923A /* gstcontroller-1.0.0.framework in Embed Libraries */, CE2D937924AD46670059923A /* gstallocators-1.0.0.framework in Embed Libraries */, CE2D937A24AD46670059923A /* gstbase-1.0.0.framework in Embed Libraries */, - CE2D937B24AD46670059923A /* ffi.7.framework in Embed Libraries */, + CE2D937B24AD46670059923A /* ffi.8.framework in Embed Libraries */, CE2D937C24AD46670059923A /* ssl.1.1.framework in Embed Libraries */, CEA9059125FC6A3300801E7C /* usbredirhost.1.framework in Embed Libraries */, CE2D937D24AD46670059923A /* gio-2.0.0.framework in Embed Libraries */, @@ -1485,7 +1485,7 @@ CEA45F74263519B5002FA97D /* gstcontroller-1.0.0.framework in Embed Libraries */, CEA45F75263519B5002FA97D /* gstallocators-1.0.0.framework in Embed Libraries */, CEA45F76263519B5002FA97D /* gstbase-1.0.0.framework in Embed Libraries */, - CEA45F77263519B5002FA97D /* ffi.7.framework in Embed Libraries */, + CEA45F77263519B5002FA97D /* ffi.8.framework in Embed Libraries */, CEA45F78263519B5002FA97D /* ssl.1.1.framework in Embed Libraries */, CEA45F7A263519B5002FA97D /* gio-2.0.0.framework in Embed Libraries */, CEA45F7B263519B5002FA97D /* png16.16.framework in Embed Libraries */, @@ -1559,7 +1559,7 @@ CEF7F6862AEEDCC400E34952 /* gstallocators-1.0.0.framework in Embed Libraries */, CED2971E2CE4263A00F1E3EB /* soup-3.0.0.framework in Embed Libraries */, CEF7F6872AEEDCC400E34952 /* gstbase-1.0.0.framework in Embed Libraries */, - CEF7F6882AEEDCC400E34952 /* ffi.7.framework in Embed Libraries */, + CEF7F6882AEEDCC400E34952 /* ffi.8.framework in Embed Libraries */, CEF7F6892AEEDCC400E34952 /* ssl.1.1.framework in Embed Libraries */, CEF7F68B2AEEDCC400E34952 /* gio-2.0.0.framework in Embed Libraries */, CEF7F68D2AEEDCC400E34952 /* png16.16.framework in Embed Libraries */, @@ -1835,7 +1835,7 @@ CE2D63E022653C7400FC7E63 /* gstreamer-1.0.0.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "gstreamer-1.0.0.framework"; path = "$(SYSROOT_DIR)/Frameworks/gstreamer-1.0.0.framework"; sourceTree = ""; }; CE2D63E122653C7400FC7E63 /* qemu-sh4eb-softmmu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "qemu-sh4eb-softmmu.framework"; path = "$(SYSROOT_DIR)/Frameworks/qemu-sh4eb-softmmu.framework"; sourceTree = ""; }; CE2D63E222653C7400FC7E63 /* json-glib-1.0.0.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "json-glib-1.0.0.framework"; path = "$(SYSROOT_DIR)/Frameworks/json-glib-1.0.0.framework"; sourceTree = ""; }; - CE2D63E322653C7400FC7E63 /* ffi.7.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ffi.7.framework; path = "$(SYSROOT_DIR)/Frameworks/ffi.7.framework"; sourceTree = ""; }; + CE2D63E322653C7400FC7E63 /* ffi.8.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ffi.8.framework; path = "$(SYSROOT_DIR)/Frameworks/ffi.8.framework"; sourceTree = ""; }; CE2D63E422653C7400FC7E63 /* qemu-microblaze-softmmu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "qemu-microblaze-softmmu.framework"; path = "$(SYSROOT_DIR)/Frameworks/qemu-microblaze-softmmu.framework"; sourceTree = ""; }; CE2D63E522653C7400FC7E63 /* gstnet-1.0.0.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "gstnet-1.0.0.framework"; path = "$(SYSROOT_DIR)/Frameworks/gstnet-1.0.0.framework"; sourceTree = ""; }; CE2D63E622653C7400FC7E63 /* qemu-cris-softmmu.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "qemu-cris-softmmu.framework"; path = "$(SYSROOT_DIR)/Frameworks/qemu-cris-softmmu.framework"; sourceTree = ""; }; @@ -2186,7 +2186,7 @@ CE2D934924AD46670059923A /* gstreamer-1.0.0.framework in Frameworks */, CE2D934B24AD46670059923A /* json-glib-1.0.0.framework in Frameworks */, CE89CB0E2B8B1B5A006B2CC2 /* VisionKeyboardKit in Frameworks */, - CE2D934C24AD46670059923A /* ffi.7.framework in Frameworks */, + CE2D934C24AD46670059923A /* ffi.8.framework in Frameworks */, CE2D934D24AD46670059923A /* gstnet-1.0.0.framework in Frameworks */, CE2D934E24AD46670059923A /* gstbase-1.0.0.framework in Frameworks */, CE020BA724AEDEF000B44AB6 /* Logging in Frameworks */, @@ -2249,7 +2249,7 @@ 848F71E6277A2466006A0240 /* SwiftTerm in Frameworks */, CE03D08824D90F0700F76B84 /* gio-2.0.0.framework in Frameworks */, CE0B6EEC24AD677200FE012D /* libgstautodetect.a in Frameworks */, - CE03D0C424D913AA00F76B84 /* ffi.7.framework in Frameworks */, + CE03D0C424D913AA00F76B84 /* ffi.8.framework in Frameworks */, CE03D0CC24D9144100F76B84 /* crypto.1.1.framework in Frameworks */, 84A0A8882A47D5C50038F329 /* QEMUKit in Frameworks */, 84B36D2227B3265400C22685 /* CocoaSpice in Frameworks */, @@ -2352,7 +2352,7 @@ CEA45F3F263519B5002FA97D /* gstriff-1.0.0.framework in Frameworks */, CEA45F41263519B5002FA97D /* gstreamer-1.0.0.framework in Frameworks */, CEA45F42263519B5002FA97D /* json-glib-1.0.0.framework in Frameworks */, - CEA45F43263519B5002FA97D /* ffi.7.framework in Frameworks */, + CEA45F43263519B5002FA97D /* ffi.8.framework in Frameworks */, CEA45F44263519B5002FA97D /* gstnet-1.0.0.framework in Frameworks */, CEA45F45263519B5002FA97D /* gstbase-1.0.0.framework in Frameworks */, CEA45F46263519B5002FA97D /* Logging in Frameworks */, @@ -2434,7 +2434,7 @@ CEF7F6512AEEDCC400E34952 /* AVFAudio.framework in Frameworks */, CEF7F6522AEEDCC400E34952 /* gstreamer-1.0.0.framework in Frameworks */, CEF7F6532AEEDCC400E34952 /* json-glib-1.0.0.framework in Frameworks */, - CEF7F6542AEEDCC400E34952 /* ffi.7.framework in Frameworks */, + CEF7F6542AEEDCC400E34952 /* ffi.8.framework in Frameworks */, CEF7F6552AEEDCC400E34952 /* gstnet-1.0.0.framework in Frameworks */, CEF7F6562AEEDCC400E34952 /* gstbase-1.0.0.framework in Frameworks */, CEF7F6572AEEDCC400E34952 /* Logging in Frameworks */, @@ -2582,7 +2582,7 @@ CE9D19642265425A00355E14 /* libgstvideotestsrc.a */, CE9D19572265425900355E14 /* libgstvolume.a */, CE2D640A22653C7500FC7E63 /* crypto.1.1.framework */, - CE2D63E322653C7400FC7E63 /* ffi.7.framework */, + CE2D63E322653C7400FC7E63 /* ffi.8.framework */, CE2D63F322653C7400FC7E63 /* gcrypt.20.framework */, CE2D63F822653C7400FC7E63 /* gio-2.0.0.framework */, CE2D640422653C7500FC7E63 /* glib-2.0.0.framework */, diff --git a/patches/gettext-0.22.5.patch b/patches/gettext-0.22.5.patch index d3a93cc6..15318792 100644 --- a/patches/gettext-0.22.5.patch +++ b/patches/gettext-0.22.5.patch @@ -70,3 +70,13 @@ diff --color -Naur a/libtextstyle/lib/get_progname_of.c b/libtextstyle/lib/get_p # endif #endif +--- a/gettext-tools/configure 2024-02-21 08:36:27 ++++ b/gettext-tools/configure 2025-06-10 15:27:46 +@@ -72592,6 +72592,7 @@ + REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1 + else + HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=0 ++ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR=1 + fi + + diff --git a/patches/libffi-3.3.patch b/patches/libffi-3.3.patch deleted file mode 100644 index 7e8ad38f..00000000 --- a/patches/libffi-3.3.patch +++ /dev/null @@ -1,900 +0,0 @@ -diff -ur libffi-3.3/configure libffi-3.3.new/configure ---- libffi-3.3/configure 2019-11-23 06:59:04.000000000 -0700 -+++ libffi-3.3.new/configure 2021-01-04 19:48:48.000000000 -0700 -@@ -3082,12 +3082,7 @@ - program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - - if test x"${MISSING+set}" != xset; then -- case $am_aux_dir in -- *\ * | *\ *) -- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; -- *) -- MISSING="\${SHELL} $am_aux_dir/missing" ;; -- esac -+ MISSING="\${SHELL} '$am_aux_dir/missing'" - fi - # Use eval to expand $SHELL - if eval "$MISSING --is-lightweight"; then -@@ -8413,16 +8408,11 @@ - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; -- darwin*) # darwin 5.x on -- # if running on 10.5 or later, the deployment target defaults -- # to the OS version, if on x86, and 10.4, the deployment -- # target defaults to 10.4. Don't you love it? -- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in -- 10.0,*86*-darwin8*|10.0,*-darwin[91]*) -- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; -- 10.[012][,.]*) -+ darwin*) -+ case ${MACOSX_DEPLOYMENT_TARGET},$host in -+ 10.[012],*|,*powerpc*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; -- 10.*) -+ *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - esac - ;; -@@ -12042,9 +12032,6 @@ - # before this can be enabled. - hardcode_into_libs=yes - -- # Add ABI-specific directories to the system library path. -- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" -- - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command -@@ -12053,7 +12040,7 @@ - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -@@ -16007,9 +15994,6 @@ - # before this can be enabled. - hardcode_into_libs=yes - -- # Add ABI-specific directories to the system library path. -- sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" -- - # Ideally, we could use ldconfig to report *all* directores which are - # searched for libraries, however this is still not possible. Aside from not - # being certain /sbin/ldconfig is available, command -@@ -16018,7 +16002,7 @@ - # appending ld.so.conf contents (and includes) to the search path. - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` -- sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" -+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on -@@ -18411,6 +18395,59 @@ - ;; - esac - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler supports pointer authentication" >&5 -+$as_echo_n "checking whether compiler supports pointer authentication... " >&6; } -+if ${libffi_cv_as_ptrauth+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ -+ libffi_cv_as_ptrauth=unknown -+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext -+/* end confdefs.h. */ -+ -+int -+main () -+{ -+ -+#ifdef __clang__ -+# if __has_feature(ptrauth_calls) -+# define HAVE_PTRAUTH 1 -+# endif -+#endif -+ -+#ifndef HAVE_PTRAUTH -+# error Pointer authentication not supported -+#endif -+ -+ ; -+ return 0; -+} -+_ACEOF -+if ac_fn_c_try_compile "$LINENO"; then : -+ libffi_cv_as_ptrauth=yes -+else -+ libffi_cv_as_ptrauth=no -+fi -+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -+ -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_ptrauth" >&5 -+$as_echo "$libffi_cv_as_ptrauth" >&6; } -+if test "x$libffi_cv_as_ptrauth" = xyes; then -+ -+$as_echo "#define HAVE_PTRAUTH 1" >>confdefs.h -+ -+fi -+ -+# Set additional defines for Apple Silicon. -+case "$target" in -+ aarch64-apple-darwin* | arm64-apple-darwin*) -+ -+$as_echo "#define FFI_TRAMPOLINE_WHOLE_DYLIB 1" >>confdefs.h -+ -+ ;; -+esac -+ - # On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. - # Check whether --enable-pax_emutramp was given. - if test "${enable_pax_emutramp+set}" = set; then : -@@ -21144,7 +21181,9 @@ - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - as_fn_error $? "Something went wrong bootstrapping makefile fragments -- for automatic dependency tracking. Try re-running configure with the -+ for automatic dependency tracking. If GNU make was not used, consider -+ re-running the configure script with MAKE=\"gmake\" (or whatever is -+ necessary). You can also try re-running configure with the - '--disable-dependency-tracking' option to at least be able to build - the package (albeit without support for automatic dependency tracking). - See \`config.log' for more details" "$LINENO" 5; } -diff -ur libffi-3.3/configure.ac libffi-3.3.new/configure.ac ---- libffi-3.3/configure.ac 2019-11-23 06:58:22.000000000 -0700 -+++ libffi-3.3.new/configure.ac 2021-01-04 19:48:35.000000000 -0700 -@@ -176,6 +176,35 @@ - ;; - esac - -+AC_CACHE_CHECK([whether compiler supports pointer authentication], -+ libffi_cv_as_ptrauth, [ -+ libffi_cv_as_ptrauth=unknown -+ AC_TRY_COMPILE(,[ -+#ifdef __clang__ -+# if __has_feature(ptrauth_calls) -+# define HAVE_PTRAUTH 1 -+# endif -+#endif -+ -+#ifndef HAVE_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, -+ [Define if your compiler supports pointer authentication.]) -+fi -+ -+# Set additional defines for Apple Silicon. -+case "$target" in -+ aarch64-apple-darwin* | arm64-apple-darwin*) -+ AC_DEFINE([FFI_TRAMPOLINE_WHOLE_DYLIB], 1, [Creating a separate libffi-trampolines.dylib and remapping the entire dylib]) -+ ;; -+esac -+ - # On PaX enable kernels that have MPROTECT enable we can't use PROT_EXEC. - AC_ARG_ENABLE(pax_emutramp, - [ --enable-pax_emutramp enable pax emulated trampolines, for we can't use PROT_EXEC], -diff -ur libffi-3.3/fficonfig.h.in libffi-3.3.new/fficonfig.h.in ---- libffi-3.3/fficonfig.h.in 2019-11-01 03:30:04.000000000 -0600 -+++ libffi-3.3.new/fficonfig.h.in 2021-01-04 19:48:48.000000000 -0700 -@@ -32,6 +32,10 @@ - /* Define this if you do not want support for aggregate types. */ - #undef FFI_NO_STRUCTS - -+/* Creating a separate libffi-trampolines.dylib and remapping the entire dylib -+ */ -+#undef FFI_TRAMPOLINE_WHOLE_DYLIB -+ - /* Define to 1 if you have `alloca', as a function or macro. */ - #undef HAVE_ALLOCA - -@@ -94,6 +98,9 @@ - /* Define if read-only mmap of a plain file works. */ - #undef HAVE_MMAP_FILE - -+/* Define if your compiler supports pointer authentication. */ -+#undef HAVE_PTRAUTH -+ - /* Define if .eh_frame sections should be read-only. */ - #undef HAVE_RO_EH_FRAME - -diff -ur libffi-3.3/include/ffi.h.in libffi-3.3.new/include/ffi.h.in ---- libffi-3.3/include/ffi.h.in 2019-11-13 05:57:22.000000000 -0700 -+++ libffi-3.3.new/include/ffi.h.in 2021-01-04 19:39:16.000000000 -0700 -@@ -349,6 +349,11 @@ - void *user_data, - void*codeloc); - -+#if defined(__x86_64__) || defined(__arm64__) -+FFI_API ffi_closure * -+ffi_find_closure_for_code(void *code); -+#endif -+ - #ifdef __sgi - # pragma pack 8 - #endif -diff -ur libffi-3.3/src/aarch64/ffi.c libffi-3.3.new/src/aarch64/ffi.c ---- libffi-3.3/src/aarch64/ffi.c 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/aarch64/ffi.c 2021-01-04 19:40:32.000000000 -0700 -@@ -62,6 +62,9 @@ - #if FFI_EXEC_TRAMPOLINE_TABLE - - #ifdef __MACH__ -+#ifdef HAVE_PTRAUTH -+#include -+#endif - #include - #endif - -@@ -599,11 +602,12 @@ - else if (flags & AARCH64_RET_NEED_COPY) - rsize = 16; - -- /* Allocate consectutive stack for everything we'll need. */ -- context = alloca (sizeof(struct call_context) + stack_bytes + 32 + rsize); -+ /* Allocate consectutive 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; - frame = (void*)((uintptr_t)stack + (uintptr_t)stack_bytes); -- rvalue = (rsize ? (void*)((uintptr_t)frame + 32) : orig_rvalue); -+ rvalue = (rsize ? (void*)((uintptr_t)frame + 40) : orig_rvalue); - - arg_init (&state); - for (i = 0, nargs = cif->nargs; i < nargs; i++) -@@ -643,12 +647,13 @@ - state.ngrn = N_X_ARG_REG; - /* Note that the default abi extends each argument - to a full 64-bit slot, while the iOS abi allocates -- only enough space. */ -+ only enough space, except for variadic arguments. */ - #ifdef __APPLE__ -- memcpy(d, a, s); --#else -- *(ffi_arg *)d = ext; -+ if (!state.allocating_variadic) -+ memcpy(d, a, s); -+ else - #endif -+ *(ffi_arg *)d = ext; - } - } - break; -@@ -756,6 +761,8 @@ - ffi_call_int (cif, fn, rvalue, avalue, NULL); - } - -+#if FFI_CLOSURES -+ - #ifdef FFI_GO_CLOSURES - void - ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, -@@ -789,7 +796,14 @@ - - #if FFI_EXEC_TRAMPOLINE_TABLE - #ifdef __MACH__ -+#ifdef HAVE_PTRAUTH -+ codeloc = ptrauth_auth_data(codeloc, ptrauth_key_function_pointer, 0); -+#endif -+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB -+ void **config = (void **)((uint8_t *)codeloc - 2*PAGE_MAX_SIZE); -+#else - void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE); -+#endif - config[0] = closure; - config[1] = start; - #endif -@@ -825,6 +839,22 @@ - return FFI_OK; - } - -+ffi_closure * -+ffi_find_closure_for_code(void *codeloc) -+{ -+#if FFI_EXEC_TRAMPOLINE_TABLE -+# ifdef FFI_TRAMPOLINE_WHOLE_DYLIB -+ void **config = (void **)((uint8_t *)codeloc - 2*PAGE_MAX_SIZE); -+# else -+ void **config = (void **)((uint8_t *)codeloc - PAGE_MAX_SIZE); -+# endif -+ return config[0]; -+#else -+ return (ffi_closure*)codeloc; -+#endif -+} -+ -+ - #ifdef FFI_GO_CLOSURES - extern void ffi_go_closure_SYSV (void) FFI_HIDDEN; - extern void ffi_go_closure_SYSV_V (void) FFI_HIDDEN; -@@ -1006,4 +1036,6 @@ - return flags; - } - -+#endif /* FFI_CLOSURES */ -+ - #endif /* (__aarch64__) || defined(__arm64__)|| defined (_M_ARM64)*/ -diff -ur libffi-3.3/src/aarch64/internal.h libffi-3.3.new/src/aarch64/internal.h ---- libffi-3.3/src/aarch64/internal.h 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/aarch64/internal.h 2021-01-04 19:39:16.000000000 -0700 -@@ -65,3 +65,24 @@ - #define N_X_ARG_REG 8 - #define N_V_ARG_REG 8 - #define CALL_CONTEXT_SIZE (N_V_ARG_REG * 16 + N_X_ARG_REG * 8) -+ -+/* 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 -diff -ur libffi-3.3/src/aarch64/sysv.S libffi-3.3.new/src/aarch64/sysv.S ---- libffi-3.3/src/aarch64/sysv.S 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/aarch64/sysv.S 2021-01-04 19:40:21.000000000 -0700 -@@ -78,9 +78,22 @@ - - cfi_startproc - CNAME(ffi_call_SYSV): -+ /* Sign the lr with x1 since that is where it will be stored */ -+ SIGN_LR_WITH_REG(x1) -+ - /* Use a stack frame allocated by our caller. */ -- cfi_def_cfa(x1, 32); -+#if defined(HAVE_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 - stp x29, x30, [x1] -+ mov x9, sp -+ str x9, [x1, #32] - mov x29, x1 - mov sp, x0 - cfi_def_cfa_register(x29) -@@ -111,13 +124,15 @@ - /* Deallocate the context, leaving the stacked arguments. */ - add sp, sp, #CALL_CONTEXT_SIZE - -- blr x9 /* call fn */ -+ BRANCH_AND_LINK_TO_REG x9 /* call fn */ - - ldp x3, x4, [x29, #16] /* reload rvalue and flags */ - - /* Partially deconstruct the stack frame. */ -- mov sp, x29 -+ ldr x9, [x29, #32] -+ mov sp, x9 - cfi_def_cfa_register (sp) -+ mov x2, x29 /* Preserve for auth */ - ldp x29, x30, [x29] - - /* Save the return value as directed. */ -@@ -131,71 +146,76 @@ - and therefore we want to extend to 64 bits; these types - have two consecutive entries allocated for them. */ - .align 4 --0: ret /* VOID */ -+0: b 99f /* VOID */ - nop - 1: str x0, [x3] /* INT64 */ -- ret -+ b 99f - 2: stp x0, x1, [x3] /* INT128 */ -- ret -+ b 99f - 3: brk #1000 /* UNUSED */ -- ret -+ b 99f - 4: brk #1000 /* UNUSED */ -- ret -+ b 99f - 5: brk #1000 /* UNUSED */ -- ret -+ b 99f - 6: brk #1000 /* UNUSED */ -- ret -+ b 99f - 7: brk #1000 /* UNUSED */ -- ret -+ b 99f - 8: st4 { v0.s, v1.s, v2.s, v3.s }[0], [x3] /* S4 */ -- ret -+ b 99f - 9: st3 { v0.s, v1.s, v2.s }[0], [x3] /* S3 */ -- ret -+ b 99f - 10: stp s0, s1, [x3] /* S2 */ -- ret -+ b 99f - 11: str s0, [x3] /* S1 */ -- ret -+ b 99f - 12: st4 { v0.d, v1.d, v2.d, v3.d }[0], [x3] /* D4 */ -- ret -+ b 99f - 13: st3 { v0.d, v1.d, v2.d }[0], [x3] /* D3 */ -- ret -+ b 99f - 14: stp d0, d1, [x3] /* D2 */ -- ret -+ b 99f - 15: str d0, [x3] /* D1 */ -- ret -+ b 99f - 16: str q3, [x3, #48] /* Q4 */ - nop - 17: str q2, [x3, #32] /* Q3 */ - nop - 18: stp q0, q1, [x3] /* Q2 */ -- ret -+ b 99f - 19: str q0, [x3] /* Q1 */ -- ret -+ b 99f - 20: uxtb w0, w0 /* UINT8 */ - str x0, [x3] --21: ret /* reserved */ -+21: b 99f /* reserved */ - nop - 22: uxth w0, w0 /* UINT16 */ - str x0, [x3] --23: ret /* reserved */ -+23: b 99f /* reserved */ - nop - 24: mov w0, w0 /* UINT32 */ - str x0, [x3] --25: ret /* reserved */ -+25: b 99f /* reserved */ - nop - 26: sxtb x0, w0 /* SINT8 */ - str x0, [x3] --27: ret /* reserved */ -+27: b 99f /* reserved */ - nop - 28: sxth x0, w0 /* SINT16 */ - str x0, [x3] --29: ret /* reserved */ -+29: b 99f /* reserved */ - nop - 30: sxtw x0, w0 /* SINT32 */ - str x0, [x3] --31: ret /* reserved */ -+31: b 99f /* reserved */ - nop - -+ /* Return now that result has been populated. */ -+99: -+ AUTH_LR_WITH_REG(x2) -+ ret -+ - cfi_endproc - - .globl CNAME(ffi_call_SYSV) -@@ -205,6 +225,8 @@ - .size CNAME(ffi_call_SYSV), .-CNAME(ffi_call_SYSV) - #endif - -+#if FFI_CLOSURES -+ - /* ffi_closure_SYSV - - Closure invocation glue. This is the low level code invoked directly by -@@ -224,6 +246,7 @@ - .align 4 - CNAME(ffi_closure_SYSV_V): - cfi_startproc -+ SIGN_LR - stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! - cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) - cfi_rel_offset (x29, 0) -@@ -247,6 +270,7 @@ - .align 4 - cfi_startproc - CNAME(ffi_closure_SYSV): -+ SIGN_LR - stp x29, x30, [sp, #-ffi_closure_SYSV_FS]! - cfi_adjust_cfa_offset (ffi_closure_SYSV_FS) - cfi_rel_offset (x29, 0) -@@ -263,7 +287,9 @@ - /* Load ffi_closure_inner arguments. */ - ldp PTR_REG(0), PTR_REG(1), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET] /* load cif, fn */ - ldr PTR_REG(2), [x17, #FFI_TRAMPOLINE_CLOSURE_OFFSET+PTR_SIZE*2] /* load user_data */ -+#ifdef FFI_GO_CLOSURES - .Ldo_closure: -+#endif - add x3, sp, #16 /* load context */ - add x4, sp, #ffi_closure_SYSV_FS /* load stack */ - add x5, sp, #16+CALL_CONTEXT_SIZE /* load rvalue */ -@@ -346,7 +372,7 @@ - cfi_adjust_cfa_offset (-ffi_closure_SYSV_FS) - cfi_restore (x29) - cfi_restore (x30) -- ret -+ AUTH_LR_AND_RET - cfi_endproc - - .globl CNAME(ffi_closure_SYSV) -@@ -432,6 +458,7 @@ - .size CNAME(ffi_go_closure_SYSV), . - CNAME(ffi_go_closure_SYSV) - #endif - #endif /* FFI_GO_CLOSURES */ -+#endif /* FFI_CLOSURES */ - #endif /* __arm64__ */ - - #if defined __ELF__ && defined __linux__ -Only in libffi-3.3.new/src/aarch64: trampoline.S -diff -ur libffi-3.3/src/arm/ffi.c libffi-3.3.new/src/arm/ffi.c ---- libffi-3.3/src/arm/ffi.c 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/arm/ffi.c 2021-01-04 19:39:16.000000000 -0700 -@@ -421,12 +421,14 @@ - ffi_call_int (cif, fn, rvalue, avalue, NULL); - } - -+#ifdef FFI_GO_CLOSURES - void - ffi_call_go (ffi_cif *cif, void (*fn) (void), void *rvalue, - void **avalue, void *closure) - { - ffi_call_int (cif, fn, rvalue, avalue, closure); - } -+#endif - - static void * - ffi_prep_incoming_args_SYSV (ffi_cif *cif, void *rvalue, -@@ -529,6 +531,8 @@ - return rvalue; - } - -+#if FFI_CLOSURES -+ - struct closure_frame - { - char vfp_space[8*8] __attribute__((aligned(8))); -@@ -564,8 +568,11 @@ - - void ffi_closure_SYSV (void) FFI_HIDDEN; - void ffi_closure_VFP (void) FFI_HIDDEN; -+ -+#ifdef FFI_GO_CLOSURES - void ffi_go_closure_SYSV (void) FFI_HIDDEN; - void ffi_go_closure_VFP (void) FFI_HIDDEN; -+#endif - - /* the cif must already be prep'ed */ - -@@ -622,6 +629,7 @@ - return FFI_OK; - } - -+#ifdef FFI_GO_CLOSURES - ffi_status - ffi_prep_go_closure (ffi_go_closure *closure, ffi_cif *cif, - void (*fun) (ffi_cif *, void *, void **, void *)) -@@ -643,6 +651,9 @@ - - return FFI_OK; - } -+#endif -+ -+#endif /* FFI_CLOSURES */ - - /* Below are routines for VFP hard-float support. */ - -diff -ur libffi-3.3/src/arm/sysv.S libffi-3.3.new/src/arm/sysv.S ---- libffi-3.3/src/arm/sysv.S 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/arm/sysv.S 2021-01-04 19:39:16.000000000 -0700 -@@ -208,6 +208,7 @@ - UNWIND(.fnend) - ARM_FUNC_END(ffi_call_SYSV) - -+#if FFI_CLOSURES - - /* - int ffi_closure_inner_* (cif, fun, user_data, frame) -@@ -354,6 +355,8 @@ - cfi_endproc - ARM_FUNC_END(ffi_closure_ret) - -+#endif /* FFI_CLOSURES */ -+ - #if FFI_EXEC_TRAMPOLINE_TABLE - - #ifdef __MACH__ -diff -ur libffi-3.3/src/closures.c libffi-3.3.new/src/closures.c ---- libffi-3.3/src/closures.c 2019-11-20 04:15:41.000000000 -0700 -+++ libffi-3.3.new/src/closures.c 2021-01-04 19:39:16.000000000 -0700 -@@ -148,10 +148,19 @@ - - #include - #include -+#ifdef HAVE_PTRAUTH -+#include -+#endif - #include - #include - -+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB -+#include -+#include -+#include -+#else - extern void *ffi_closure_trampoline_table_page; -+#endif - - typedef struct ffi_trampoline_table ffi_trampoline_table; - typedef struct ffi_trampoline_table_entry ffi_trampoline_table_entry; -@@ -160,7 +169,6 @@ - { - /* contiguous writable and executable pages */ - vm_address_t config_page; -- vm_address_t trampoline_page; - - /* free list tracking */ - uint16_t free_count; -@@ -180,6 +188,21 @@ struct ffi_trampoline_table_entry - /* Total number of trampolines that fit in one trampoline table */ - #define FFI_TRAMPOLINE_COUNT (PAGE_MAX_SIZE / FFI_TRAMPOLINE_SIZE) - -+/* The trampoline dylib has one page for the MACHO_HEADER and one page for the -+ * trampolines. iOS 12.0 and later, and macOS on Apple Silicon require that -+ * the entire dylib needs to be remapped as a unit. -+ * -+ * arm (legacy): Allocate two pages -- a config page and a placeholder for the trampolines -+ * arm64 (modern): Allocate three pages -- a config page and two placeholders for the trampoline dylib -+ */ -+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB -+#define FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT 3 -+#define FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET PAGE_MAX_SIZE -+#else -+#define FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT 2 -+#define FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET 0 -+#endif -+ - static pthread_mutex_t ffi_trampoline_lock = PTHREAD_MUTEX_INITIALIZER; - static ffi_trampoline_table *ffi_trampoline_tables = NULL; - -@@ -195,34 +218,67 @@ - kern_return_t kt; - uint16_t i; - -- /* Allocate two pages -- a config page and a placeholder page */ - config_page = 0x0; -- kt = vm_allocate (mach_task_self (), &config_page, PAGE_MAX_SIZE * 2, -+ /* The entire allocation is: -+ * config_page -+ * trampoline_segment -+ * -+ * trampoline_segment is: -+ * trampoline dylib mach-o header (if FFI_TRAMPOLINE_WHOLE_DYLIB) -+ * trampoline page -+ */ -+ kt = vm_allocate (mach_task_self (), &config_page, FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT * PAGE_MAX_SIZE, - VM_FLAGS_ANYWHERE); - if (kt != KERN_SUCCESS) - return NULL; - -- /* Remap the trampoline table on top of the placeholder page */ -- trampoline_page = config_page + PAGE_MAX_SIZE; -- trampoline_page_template = (vm_address_t)&ffi_closure_trampoline_table_page; -+ static void *trampoline_table_page; -+ -+#ifdef FFI_TRAMPOLINE_WHOLE_DYLIB -+ static dispatch_once_t trampoline_template_init_once; -+ -+ dispatch_once(&trampoline_template_init_once, ^{ -+ void * const trampoline_handle = dlopen("/usr/lib/libffi-trampolines.dylib", RTLD_NOW | RTLD_LOCAL | RTLD_FIRST); -+ assert(trampoline_handle); -+ -+ trampoline_table_page = dlsym(trampoline_handle, "ffi_closure_trampoline_table_page"); -+ assert(trampoline_table_page); -+ }); -+#else -+ trampoline_table_page = &ffi_closure_trampoline_table_page; -+#endif -+ -+#ifdef HAVE_PTRAUTH -+ trampoline_page_template = (uintptr_t)ptrauth_auth_data(trampoline_table_page, ptrauth_key_function_pointer, 0); -+#else -+ trampoline_page_template = (uintptr_t)trampoline_table_page; -+#endif -+ - #ifdef __arm__ - /* ffi_closure_trampoline_table_page can be thumb-biased on some ARM archs */ - trampoline_page_template &= ~1UL; - #endif -- kt = vm_remap (mach_task_self (), &trampoline_page, PAGE_MAX_SIZE, 0x0, -- VM_FLAGS_OVERWRITE, mach_task_self (), trampoline_page_template, -+ -+ vm_address_t trampoline_segment_template = trampoline_page_template - FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET; -+ vm_size_t trampoline_segment_size = (FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT - 1) * PAGE_MAX_SIZE; -+ -+ /* Remap the trampoline table on top of the placeholder page */ -+ vm_address_t trampoline_segment = config_page + PAGE_MAX_SIZE; -+ kt = vm_remap (mach_task_self(), &trampoline_segment, trampoline_segment_size, 0x0, -+ VM_FLAGS_FIXED | VM_FLAGS_OVERWRITE, mach_task_self(), trampoline_segment_template, - FALSE, &cur_prot, &max_prot, VM_INHERIT_SHARE); -- if (kt != KERN_SUCCESS) -+ if (kt != KERN_SUCCESS || !(cur_prot & VM_PROT_EXECUTE)) - { -- vm_deallocate (mach_task_self (), config_page, PAGE_MAX_SIZE * 2); -+ vm_deallocate (mach_task_self (), config_page, FFI_TRAMPOLINE_ALLOCATION_PAGE_COUNT * PAGE_MAX_SIZE); - return NULL; - } - -+ trampoline_page = trampoline_segment + FFI_TRAMPOLINE_PAGE_SEGMENT_OFFSET; -+ - /* We have valid trampoline and config pages */ - table = calloc (1, sizeof (ffi_trampoline_table)); - table->free_count = FFI_TRAMPOLINE_COUNT; - table->config_page = config_page; -- table->trampoline_page = trampoline_page; - - /* Create and initialize the free list */ - table->free_list_pool = -@@ -232,7 +278,10 @@ - { - ffi_trampoline_table_entry *entry = &table->free_list_pool[i]; - entry->trampoline = -- (void *) (table->trampoline_page + (i * FFI_TRAMPOLINE_SIZE)); -+ (void *) (trampoline_page + (i * FFI_TRAMPOLINE_SIZE)); -+#ifdef HAVE_PTRAUTH -+ entry->trampoline = ptrauth_sign_unauthenticated(entry->trampoline, ptrauth_key_function_pointer, 0); -+#endif - - if (i < table->free_count - 1) - entry->next = &table->free_list_pool[i + 1]; -diff -ur libffi-3.3/src/x86/ffi.c libffi-3.3.new/src/x86/ffi.c ---- libffi-3.3/src/x86/ffi.c 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/x86/ffi.c 2021-01-04 19:38:38.000000000 -0700 -@@ -397,12 +397,14 @@ - ffi_call_int (cif, fn, rvalue, avalue, NULL); - } - -+#ifdef FFI_GO_CLOSURES - void - ffi_call_go (ffi_cif *cif, void (*fn)(void), void *rvalue, - void **avalue, void *closure) - { - ffi_call_int (cif, fn, rvalue, avalue, closure); - } -+#endif - - /** private members **/ - -@@ -572,6 +574,8 @@ - return FFI_OK; - } - -+#ifdef FFI_GO_CLOSURES -+ - void FFI_HIDDEN ffi_go_closure_EAX(void); - void FFI_HIDDEN ffi_go_closure_ECX(void); - void FFI_HIDDEN ffi_go_closure_STDCALL(void); -@@ -608,6 +612,8 @@ - return FFI_OK; - } - -+#endif /* FFI_GO_CLOSURES */ -+ - /* ------- Native raw API support -------------------------------- */ - - #if !FFI_NO_RAW_API -diff -ur libffi-3.3/src/x86/ffi64.c libffi-3.3.new/src/x86/ffi64.c ---- libffi-3.3/src/x86/ffi64.c 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/x86/ffi64.c 2021-01-04 19:39:16.000000000 -0700 -@@ -688,6 +688,8 @@ - ffi_call_int (cif, fn, rvalue, avalue, NULL); - } - -+#ifdef FFI_GO_CLOSURES -+ - #ifndef __ILP32__ - extern void - ffi_call_go_efi64(ffi_cif *cif, void (*fn)(void), void *rvalue, -@@ -708,6 +710,7 @@ - ffi_call_int (cif, fn, rvalue, avalue, closure); - } - -+#endif /* FFI_GO_CLOSURES */ - - extern void ffi_closure_unix64(void) FFI_HIDDEN; - extern void ffi_closure_unix64_sse(void) FFI_HIDDEN; -@@ -761,6 +764,12 @@ - return FFI_OK; - } - -+ffi_closure * -+ffi_find_closure_for_code(void *code) -+{ -+ return (ffi_closure *) code; -+} -+ - int FFI_HIDDEN - ffi_closure_unix64_inner(ffi_cif *cif, - void (*fun)(ffi_cif*, void*, void**, void*), -@@ -854,6 +863,8 @@ - return flags; - } - -+#ifdef FFI_GO_CLOSURES -+ - extern void ffi_go_closure_unix64(void) FFI_HIDDEN; - extern void ffi_go_closure_unix64_sse(void) FFI_HIDDEN; - -@@ -883,4 +894,6 @@ - return FFI_OK; - } - -+#endif /* FFI_GO_CLOSURES */ -+ - #endif /* __x86_64__ */ -diff -ur libffi-3.3/src/x86/ffiw64.c libffi-3.3.new/src/x86/ffiw64.c ---- libffi-3.3/src/x86/ffiw64.c 2019-10-31 08:49:54.000000000 -0600 -+++ libffi-3.3.new/src/x86/ffiw64.c 2021-01-04 19:38:38.000000000 -0700 -@@ -187,7 +187,10 @@ - - - extern void ffi_closure_win64(void) FFI_HIDDEN; -+ -+#ifdef FFI_GO_CLOSURES - extern void ffi_go_closure_win64(void) FFI_HIDDEN; -+#endif - - ffi_status - EFI64(ffi_prep_closure_loc)(ffi_closure* closure, -@@ -225,6 +228,7 @@ - return FFI_OK; - } - -+#ifdef FFI_GO_CLOSURES - ffi_status - EFI64(ffi_prep_go_closure)(ffi_go_closure* closure, ffi_cif* cif, - void (*fun)(ffi_cif*, void*, void**, void*)) -@@ -244,6 +248,7 @@ - - return FFI_OK; - } -+#endif - - struct win64_closure_frame - { -diff -ur libffi-3.3/testsuite/libffi.closures/huge_struct.c libffi-3.3.new/testsuite/libffi.closures/huge_struct.c ---- libffi-3.3/testsuite/libffi.closures/huge_struct.c 2019-11-19 08:06:49.000000000 -0700 -+++ libffi-3.3.new/testsuite/libffi.closures/huge_struct.c 2021-01-04 19:39:02.000000000 -0700 -@@ -9,6 +9,8 @@ - /* { dg-options -mlong-double-128 { target powerpc64*-*-linux* } } */ - /* { dg-options -Wformat=0 { target moxie*-*-elf or1k-*-* } } */ - -+#include -+ - #include "ffitest.h" - - typedef struct BigStruct{ diff --git a/patches/sources b/patches/sources index 4bb8b0a0..033ce476 100644 --- a/patches/sources +++ b/patches/sources @@ -4,10 +4,10 @@ PKG_CONFIG_SRC="https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" # Source files for qemu -FFI_SRC="https://github.com/libffi/libffi/releases/download/v3.3/libffi-3.3.tar.gz" +FFI_SRC="https://github.com/libffi/libffi/releases/download/v3.5.0/libffi-3.5.0.tar.gz" ICONV_SRC="https://ftp.gnu.org/gnu/libiconv/libiconv-1.16.tar.gz" GETTEXT_SRC="https://ftp.gnu.org/gnu/gettext/gettext-0.22.5.tar.gz" -PNG_SRC="https://ftp.osuosl.org/pub/blfs/conglomeration/libpng/libpng-1.6.37.tar.xz" +PNG_SRC="https://ftp.osuosl.org/pub/blfs/conglomeration/libpng/libpng-1.6.48.tar.xz" JPEG_TURBO_SRC="https://ftp.osuosl.org/pub/blfs/conglomeration/libjpeg-turbo/libjpeg-turbo-1.5.3.tar.gz" GLIB_SRC="https://download.gnome.org/sources/glib/2.83/glib-2.83.0.tar.xz" GPG_ERROR_SRC="https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.38.tar.gz"