From 1ad87d079e0578b09c286a01300e30dd486813eb Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Thu, 2 Jan 2025 10:40:59 +0000 Subject: [PATCH 01/14] Add support for MacCatalyst support --- Makefile | 22 +++++--- patch/libffi.patch | 134 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 9 deletions(-) create mode 100644 patch/libffi.patch diff --git a/Makefile b/Makefile index 18961f0..0f56b84 100644 --- a/Makefile +++ b/Makefile @@ -40,7 +40,7 @@ BUILD_NUMBER=custom BZIP2_VERSION=1.0.8 -XZ_VERSION=5.6.2 +XZ_VERSION=5.6.3 # Preference is to use OpenSSL 3; however, Cryptography 3.4.8 (and # probably some other packages as well) only works with 1.1.1, so @@ -57,8 +57,8 @@ LIBFFI_VERSION=3.4.6 CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar # iOS targets -TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 -VERSION_MIN-iOS=13.0 +TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 macosx.x86_64 macosx.arm64 +VERSION_MIN-iOS=14.2 CFLAGS-iOS=-mios-version-min=$(VERSION_MIN-iOS) # tvOS targets @@ -171,10 +171,12 @@ OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') SDK-$(target)=$$(basename $(target)) ARCH-$(target)=$$(subst .,,$$(suffix $(target))) -ifeq ($$(findstring simulator,$$(SDK-$(target))),) -TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) -else +ifneq ($$(findstring simulator,$$(SDK-$(target))),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator +else ifneq ($$(findstring macosx,$$(SDK-$(target))),) +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-ios$$(VERSION_MIN-$(os))-macabi +else +TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) endif SDK_ROOT-$(target)=$$(shell xcrun --sdk $$(SDK-$(target)) --show-sdk-path) @@ -251,7 +253,7 @@ $$(XZ_SRCDIR-$(target))/Makefile: $$(XZ_SRCDIR-$(target))/configure LDFLAGS="$$(LDFLAGS-$(target))" \ --disable-shared \ --enable-static \ - --host=$$(TARGET_TRIPLE-$(target)) \ + --host=$$(subst -macabi,,$$(TARGET_TRIPLE-$(target))) \ --build=$(HOST_ARCH)-apple-darwin \ --prefix="$$(XZ_INSTALL-$(target))" \ 2>&1 | tee -a ../xz-$(XZ_VERSION).config.log @@ -380,7 +382,7 @@ $$(MPDECIMAL_SRCDIR-$(target))/Makefile: $$(MPDECIMAL_SRCDIR-$(target))/configur LDFLAGS="$$(LDFLAGS-$(target))" \ --disable-shared \ --enable-static \ - --host=$$(TARGET_TRIPLE-$(target)) \ + --host=$$(subst -macabi,,$$(TARGET_TRIPLE-$(target))) \ --build=$(HOST_ARCH)-apple-darwin \ --prefix="$$(MPDECIMAL_INSTALL-$(target))" \ 2>&1 | tee -a ../xz-$(MPDECIMAL_VERSION).config.log @@ -550,9 +552,11 @@ $$(LIBFFI_SRCDIR-$(os))/darwin_common/include/ffi.h: downloads/libffi-$(LIBFFI_V @echo ">>> Unpack and configure libFFI sources on $(os)" mkdir -p $$(LIBFFI_SRCDIR-$(os)) tar zxf $$< --strip-components 1 -C $$(LIBFFI_SRCDIR-$(os)) + # Patch the source to add support for maccatalyst/remove i386+armv7 + cd $$(LIBFFI_SRCDIR-$(os)) && patch -p1 < $(PROJECT_DIR)/patch/libffi.patch # Configure the build cd $$(LIBFFI_SRCDIR-$(os)) && \ - python3 generate-darwin-source-and-headers.py --only-$(shell echo $(os) | tr '[:upper:]' '[:lower:]') \ + python3 generate-darwin-source-and-headers.py --only-$(shell echo $(os) | tr '[:upper:]' '[:lower:]') --disable-i386 --disable-armv7 \ 2>&1 | tee -a ../libffi-$(LIBFFI_VERSION).config.log ########################################################################### diff --git a/patch/libffi.patch b/patch/libffi.patch new file mode 100644 index 0000000..2a8c130 --- /dev/null +++ b/patch/libffi.patch @@ -0,0 +1,134 @@ +diff -ru libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/generate-darwin-source-and-headers.py +--- libffi-3.4.6-orig/generate-darwin-source-and-headers.py 2023-10-21 13:41:22 ++++ libffi-3.4.6/generate-darwin-source-and-headers.py 2025-01-02 08:50:53 +@@ -8,7 +8,7 @@ + + + class Platform(object): +- pass ++ abi = None + + + class i386_platform(Platform): +@@ -153,7 +153,22 @@ + arch = 'arm64_32' + version_min = '-mwatchos-version-min=4.0' + ++class macosx_x86_64_platform(x86_64_platform): ++ target = 'x86_64-apple-ios' ++ directory = 'darwin_ios' ++ sdk = 'macosx' ++ version_min = '-mios-version-min=14.2' ++ abi = 'macabi' + ++ ++class macosx_arm64_platform(arm64_platform): ++ target = 'arm64-apple-ios' ++ directory = 'darwin_ios' ++ sdk = 'macosx' ++ version_min = '-mios-version-min=14.2' ++ abi = 'macabi' ++ ++ + def mkdir_p(path): + try: + os.makedirs(path) +@@ -219,7 +234,7 @@ + "../configure", + f"--host={platform.target}", + ] + ( +- [] if platform.sdk == "macosx" else [f"--build={os.uname().machine}-apple-darwin"] ++ [] if platform.sdk == "macosx" and platform.abi != "macabi" else [f"--build={os.uname().machine}-apple-darwin"] + ), + env=env + ) +@@ -243,16 +258,24 @@ + generate_ios=True, + generate_tvos=True, + generate_watchos=True, ++ enable_maccatalyst=True, ++ enable_i386=True, ++ enable_armv7=True, + ): + copy_files('src', 'darwin_common/src', pattern='*.c') + copy_files('include', 'darwin_common/include', pattern='*.h') + + if generate_ios: +- copy_src_platform_files(ios_simulator_i386_platform) ++ if enable_i386: ++ copy_src_platform_files(ios_simulator_i386_platform) + copy_src_platform_files(ios_simulator_x86_64_platform) + copy_src_platform_files(ios_simulator_arm64_platform) +- copy_src_platform_files(ios_device_armv7_platform) ++ if enable_armv7: ++ copy_src_platform_files(ios_device_armv7_platform) + copy_src_platform_files(ios_device_arm64_platform) ++ if enable_maccatalyst: ++ copy_src_platform_files(macosx_x86_64_platform) ++ copy_src_platform_files(macosx_arm64_platform) + if generate_osx: + copy_src_platform_files(desktop_x86_64_platform) + copy_src_platform_files(desktop_arm64_platform) +@@ -261,20 +284,27 @@ + copy_src_platform_files(tvos_simulator_arm64_platform) + copy_src_platform_files(tvos_device_arm64_platform) + if generate_watchos: +- copy_src_platform_files(watchos_simulator_i386_platform) ++ if enable_i386: ++ copy_src_platform_files(watchos_simulator_i386_platform) + copy_src_platform_files(watchos_simulator_x86_64_platform) + copy_src_platform_files(watchos_simulator_arm64_platform) +- copy_src_platform_files(watchos_device_armv7k_platform) ++ if enable_armv7: ++ copy_src_platform_files(watchos_device_armv7k_platform) + copy_src_platform_files(watchos_device_arm64_32_platform) + + platform_headers = collections.defaultdict(set) + + if generate_ios: +- build_target(ios_simulator_i386_platform, platform_headers) ++ if enable_i386: ++ build_target(ios_simulator_i386_platform, platform_headers) + build_target(ios_simulator_x86_64_platform, platform_headers) + build_target(ios_simulator_arm64_platform, platform_headers) +- build_target(ios_device_armv7_platform, platform_headers) ++ if enable_armv7: ++ build_target(ios_device_armv7_platform, platform_headers) + build_target(ios_device_arm64_platform, platform_headers) ++ if enable_maccatalyst: ++ build_target(macosx_x86_64_platform, platform_headers) ++ build_target(macosx_arm64_platform, platform_headers) + if generate_osx: + build_target(desktop_x86_64_platform, platform_headers) + build_target(desktop_arm64_platform, platform_headers) +@@ -283,10 +313,12 @@ + build_target(tvos_simulator_arm64_platform, platform_headers) + build_target(tvos_device_arm64_platform, platform_headers) + if generate_watchos: +- build_target(watchos_simulator_i386_platform, platform_headers) ++ if enable_i386: ++ build_target(watchos_simulator_i386_platform, platform_headers) + build_target(watchos_simulator_x86_64_platform, platform_headers) + build_target(watchos_simulator_arm64_platform, platform_headers) +- build_target(watchos_device_armv7k_platform, platform_headers) ++ if enable_armv7: ++ build_target(watchos_device_armv7k_platform, platform_headers) + build_target(watchos_device_arm64_32_platform, platform_headers) + + mkdir_p('darwin_common/include') +@@ -302,6 +334,8 @@ + parser.add_argument('--only-osx', action='store_true', default=False) + parser.add_argument('--only-tvos', action='store_true', default=False) + parser.add_argument('--only-watchos', action='store_true', default=False) ++ parser.add_argument('--disable-i386', action='store_true', default=False) ++ parser.add_argument('--disable-armv7', action='store_true', default=False) + args = parser.parse_args() + + generate_source_and_headers( +@@ -309,4 +343,6 @@ + generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos, + generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos, + generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos, ++ enable_i386=not args.disable_i386, ++ enable_armv7=not args.disable_armv7, + ) From b914c335e90d955fcef8593f2fdf8fe5024c0652 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Fri, 3 Jan 2025 19:17:24 +0000 Subject: [PATCH 02/14] Rename to maccatalyst --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0f56b84..cf329dd 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ LIBFFI_VERSION=3.4.6 CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar # iOS targets -TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 macosx.x86_64 macosx.arm64 +TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 maccatalyst.x86_64 maccatalyst.arm64 VERSION_MIN-iOS=14.2 CFLAGS-iOS=-mios-version-min=$(VERSION_MIN-iOS) @@ -168,12 +168,12 @@ os=$2 OS_LOWER-$(target)=$(shell echo $(os) | tr '[:upper:]' '[:lower:]') # $(target) can be broken up into is composed of $(SDK).$(ARCH) -SDK-$(target)=$$(basename $(target)) +SDK-$(target)=$$(subst maccatalyst,macosx,$$(basename $(target))) ARCH-$(target)=$$(subst .,,$$(suffix $(target))) ifneq ($$(findstring simulator,$$(SDK-$(target))),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator -else ifneq ($$(findstring macosx,$$(SDK-$(target))),) +else ifneq ($$(findstring maccatalyst,$$(target)),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-ios$$(VERSION_MIN-$(os))-macabi else TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) From 6d57ba745f3390009e11b979a1a6c7c4fe8217c1 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sat, 4 Jan 2025 11:37:46 +0000 Subject: [PATCH 03/14] Fix for the libFFI build on maccatalyst --- Makefile | 2 +- patch/libffi.patch | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index cf329dd..5377f34 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target))) ifneq ($$(findstring simulator,$$(SDK-$(target))),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator -else ifneq ($$(findstring maccatalyst,$$(target)),) +else ifneq ($$(findstring macosx,$$(target)),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-ios$$(VERSION_MIN-$(os))-macabi else TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) diff --git a/patch/libffi.patch b/patch/libffi.patch index 2a8c130..42b72ce 100644 --- a/patch/libffi.patch +++ b/patch/libffi.patch @@ -1,6 +1,39 @@ -diff -ru libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/generate-darwin-source-and-headers.py +diff -ur libffi-3.4.6-orig/config.sub libffi-3.4.6/config.sub +--- libffi-3.4.6-orig/config.sub 2023-10-21 13:41:22 ++++ libffi-3.4.6/config.sub 2025-01-04 11:15:10 +@@ -127,6 +127,8 @@ + EOF + IFS=$saved_IFS + ++abi="" ++ + # Separate into logical components for further validation + case $1 in + *-*-*-*-*) +@@ -1324,6 +1326,11 @@ + kernel=nto + os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + ;; ++ ios-macabi) ++ kernel= ++ os=ios ++ abi="-macabi" ++ ;; + *-*) + # shellcheck disable=SC2162 + saved_IFS=$IFS +@@ -1881,7 +1888,7 @@ + ;; + esac + +-echo "$cpu-$vendor-${kernel:+$kernel-}$os" ++echo "$cpu-$vendor-${kernel:+$kernel-}$os${abi}" + exit + + # Local variables: +diff -ur libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/generate-darwin-source-and-headers.py --- libffi-3.4.6-orig/generate-darwin-source-and-headers.py 2023-10-21 13:41:22 -+++ libffi-3.4.6/generate-darwin-source-and-headers.py 2025-01-02 08:50:53 ++++ libffi-3.4.6/generate-darwin-source-and-headers.py 2025-01-04 09:18:08 @@ -8,7 +8,7 @@ @@ -15,7 +48,7 @@ diff -ru libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/ge version_min = '-mwatchos-version-min=4.0' +class macosx_x86_64_platform(x86_64_platform): -+ target = 'x86_64-apple-ios' ++ target = 'x86_64-apple-ios-macabi' + directory = 'darwin_ios' + sdk = 'macosx' + version_min = '-mios-version-min=14.2' @@ -23,7 +56,7 @@ diff -ru libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/ge + +class macosx_arm64_platform(arm64_platform): -+ target = 'arm64-apple-ios' ++ target = 'arm64-apple-ios-macabi' + directory = 'darwin_ios' + sdk = 'macosx' + version_min = '-mios-version-min=14.2' From 29648d4a5a9554a940329572fec8cc1c934a8f19 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 23 Feb 2025 10:39:25 +0000 Subject: [PATCH 04/14] Tidy up the Mac Catalyst support --- Makefile | 6 +- patch/libffi.patch | 75 +- patch/mpdecimal.patch | 2 +- patch/xz.patch | 2382 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 2423 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile index 38b8471..7a0cad7 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ ARCH-$(target)=$$(subst .,,$$(suffix $(target))) ifneq ($$(findstring simulator,$$(SDK-$(target))),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os))-simulator -else ifneq ($$(findstring macosx,$$(target)),) +else ifneq ($$(findstring maccatalyst,$$(target)),) TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-ios$$(VERSION_MIN-$(os))-macabi else TARGET_TRIPLE-$(target)=$$(ARCH-$(target))-apple-$$(OS_LOWER-$(target))$$(VERSION_MIN-$(os)) @@ -253,7 +253,7 @@ $$(XZ_SRCDIR-$(target))/Makefile: $$(XZ_SRCDIR-$(target))/configure LDFLAGS="$$(LDFLAGS-$(target))" \ --disable-shared \ --enable-static \ - --host=$$(subst -macabi,,$$(TARGET_TRIPLE-$(target))) \ + --host=$$(TARGET_TRIPLE-$(target)) \ --build=$(HOST_ARCH)-apple-darwin \ --prefix="$$(XZ_INSTALL-$(target))" \ 2>&1 | tee -a ../xz-$(XZ_VERSION).config.log @@ -382,7 +382,7 @@ $$(MPDECIMAL_SRCDIR-$(target))/Makefile: $$(MPDECIMAL_SRCDIR-$(target))/configur LDFLAGS="$$(LDFLAGS-$(target))" \ --disable-shared \ --enable-static \ - --host=$$(subst -macabi,,$$(TARGET_TRIPLE-$(target))) \ + --host=$$(TARGET_TRIPLE-$(target)) \ --build=$(HOST_ARCH)-apple-darwin \ --prefix="$$(MPDECIMAL_INSTALL-$(target))" \ 2>&1 | tee -a ../xz-$(MPDECIMAL_VERSION).config.log diff --git a/patch/libffi.patch b/patch/libffi.patch index 42b72ce..ea5d8b4 100644 --- a/patch/libffi.patch +++ b/patch/libffi.patch @@ -1,39 +1,52 @@ -diff -ur libffi-3.4.6-orig/config.sub libffi-3.4.6/config.sub ---- libffi-3.4.6-orig/config.sub 2023-10-21 13:41:22 -+++ libffi-3.4.6/config.sub 2025-01-04 11:15:10 -@@ -127,6 +127,8 @@ - EOF - IFS=$saved_IFS +diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub +--- libffi-3.4.7-orig/config.sub 2024-12-13 10:38:19 ++++ libffi-3.4.7/config.sub 2025-02-23 09:47:29 +@@ -4,6 +4,7 @@ -+abi="" -+ - # Separate into logical components for further validation - case $1 in - *-*-*-*-*) -@@ -1324,6 +1326,11 @@ - kernel=nto - os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` + # shellcheck disable=SC2006,SC2268 # see below for rationale + ++# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators + timestamp='2024-01-01' + + # This file is free software; you can redistribute it and/or modify it +@@ -1127,7 +1128,10 @@ + xscale-* | xscalee[bl]-*) + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; -+ ios-macabi) -+ kernel= -+ os=ios -+ abi="-macabi" +- arm64-* | arm64_32-* | aarch64le-*) ++ arm64-apple) ++ cpu=arm64 + ;; - *-*) - # shellcheck disable=SC2162 - saved_IFS=$IFS -@@ -1881,7 +1888,7 @@ ++ arm64-* | aarch64le-* | arm64_32-*) + cpu=aarch64 ;; - esac --echo "$cpu-$vendor-${kernel:+$kernel-}$os" -+echo "$cpu-$vendor-${kernel:+$kernel-}$os${abi}" - exit - - # Local variables: -diff -ur libffi-3.4.6-orig/generate-darwin-source-and-headers.py libffi-3.4.6/generate-darwin-source-and-headers.py ---- libffi-3.4.6-orig/generate-darwin-source-and-headers.py 2023-10-21 13:41:22 -+++ libffi-3.4.6/generate-darwin-source-and-headers.py 2025-01-04 09:18:08 +@@ -1768,7 +1772,7 @@ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ +- | fiwix* | mlibc* | cos* | mbr* | ironclad* ) ++ | fiwix* | mlibc* | cos* | mbr* | ironclad* | macabi) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +@@ -1864,9 +1868,11 @@ + ;; + os2-emx-) + ;; +- ios*-simulator* | tvos*-simulator* | watchos*-simulator*) +- ;; + *-eabi*- | *-gnueabi*-) ++ ;; ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ;; ++ ios*-macabi- ) + ;; + none--*) + # None (no kernel, i.e. freestanding / bare metal), +diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/generate-darwin-source-and-headers.py +--- libffi-3.4.7-orig/generate-darwin-source-and-headers.py 2024-06-01 18:42:02 ++++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-02-23 09:40:26 @@ -8,7 +8,7 @@ diff --git a/patch/mpdecimal.patch b/patch/mpdecimal.patch index f0cf088..8819cd1 100644 --- a/patch/mpdecimal.patch +++ b/patch/mpdecimal.patch @@ -15,7 +15,7 @@ diff -ur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub ;; *-eabi* | *-gnueabi*) + ;; -+ ios*-simulator | tvos*-simulator | watchos*-simulator) ++ ios*-simulator | tvos*-simulator | watchos*-simulator | ios*-macabi ) ;; none-coff* | none-elf*) # None (no kernel, i.e. freestanding / bare metal), diff --git a/patch/xz.patch b/patch/xz.patch index c9da484..aa695f1 100644 --- a/patch/xz.patch +++ b/patch/xz.patch @@ -1,7 +1,7 @@ -diff -ru xz-5.4.7-orig/build-aux/config.sub xz-5.4.7/build-aux/config.sub ---- xz-5.4.7-orig/build-aux/config.sub 2024-05-29 23:13:51 -+++ xz-5.4.7/build-aux/config.sub 2024-07-24 14:20:00 -@@ -1127,7 +1127,7 @@ +diff -Naur xz-5.6.4-orig/build-aux/config.sub xz-5.6.4/build-aux/config.sub +--- xz-5.6.4-orig/build-aux/config.sub 2025-01-23 09:58:05 ++++ xz-5.6.4/build-aux/config.sub 2025-02-23 10:33:28 +@@ -1194,7 +1194,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; @@ -10,12 +10,2380 @@ diff -ru xz-5.4.7-orig/build-aux/config.sub xz-5.4.7/build-aux/config.sub cpu=aarch64 ;; -@@ -1865,6 +1865,8 @@ - os2-emx-) +@@ -2149,7 +2149,8 @@ + | xenix* \ + | xray* \ + | zephyr* \ +- | zvmoe* ) ++ | zvmoe* \ ++ | macabi ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +@@ -2248,6 +2249,8 @@ + rtmk-nova-) ;; *-eabi*- | *-gnueabi*-) + ;; -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | ios*-macabi- ) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), +diff -Naur xz-5.6.4-orig/build-aux/config.sub.orig xz-5.6.4/build-aux/config.sub.orig +--- xz-5.6.4-orig/build-aux/config.sub.orig 1970-01-01 01:00:00 ++++ xz-5.6.4/build-aux/config.sub.orig 2025-01-23 09:58:05 +@@ -0,0 +1,2354 @@ ++#! /bin/sh ++# Configuration validation subroutine script. ++# Copyright 1992-2024 Free Software Foundation, Inc. ++ ++# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale ++ ++timestamp='2024-05-27' ++ ++# This file is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, see . ++# ++# As a special exception to the GNU General Public License, if you ++# distribute this file as part of a program that contains a ++# configuration script generated by Autoconf, you may include it under ++# the same distribution terms that you use for the rest of that ++# program. This Exception is an additional permission under section 7 ++# of the GNU General Public License, version 3 ("GPLv3"). ++ ++ ++# Please send patches to . ++# ++# Configuration subroutine to validate and canonicalize a configuration type. ++# Supply the specified configuration type as an argument. ++# If it is invalid, we print an error message on stderr and exit with code 1. ++# Otherwise, we print the canonical config type on stdout and succeed. ++ ++# You can get the latest version of this script from: ++# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub ++ ++# This file is supposed to be the same for all GNU packages ++# and recognize all the CPU types, system types and aliases ++# that are meaningful with *any* GNU software. ++# Each package is responsible for reporting which valid configurations ++# it does not support. The user should be able to distinguish ++# a failure to support a valid configuration from a meaningless ++# configuration. ++ ++# The goal of this file is to map all the various variations of a given ++# machine specification into a single specification in the form: ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or in some cases, the newer four-part form: ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# It is wrong to echo any other type of specification. ++ ++# The "shellcheck disable" line above the timestamp inhibits complaints ++# about features and limitations of the classic Bourne shell that were ++# superseded or lifted in POSIX. However, this script identifies a wide ++# variety of pre-POSIX systems that do not have POSIX shells at all, and ++# even some reasonably current systems (Solaris 10 as case-in-point) still ++# have a pre-POSIX /bin/sh. ++ ++me=`echo "$0" | sed -e 's,.*/,,'` ++ ++usage="\ ++Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS ++ ++Canonicalize a configuration name. ++ ++Options: ++ -h, --help print this help, then exit ++ -t, --time-stamp print date of last modification, then exit ++ -v, --version print version number, then exit ++ ++Report bugs and patches to ." ++ ++version="\ ++GNU config.sub ($timestamp) ++ ++Copyright 1992-2024 Free Software Foundation, Inc. ++ ++This is free software; see the source for copying conditions. There is NO ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ++ ++help=" ++Try '$me --help' for more information." ++ ++# Parse command line ++while test $# -gt 0 ; do ++ case $1 in ++ --time-stamp | --time* | -t ) ++ echo "$timestamp" ; exit ;; ++ --version | -v ) ++ echo "$version" ; exit ;; ++ --help | --h* | -h ) ++ echo "$usage"; exit ;; ++ -- ) # Stop option processing ++ shift; break ;; ++ - ) # Use stdin as input. ++ break ;; ++ -* ) ++ echo "$me: invalid option $1$help" >&2 ++ exit 1 ;; ++ ++ *local*) ++ # First pass through any local machine types. ++ echo "$1" ++ exit ;; ++ ++ * ) ++ break ;; ++ esac ++done ++ ++case $# in ++ 0) echo "$me: missing argument$help" >&2 ++ exit 1;; ++ 1) ;; ++ *) echo "$me: too many arguments$help" >&2 ++ exit 1;; ++esac ++ ++# Split fields of configuration type ++saved_IFS=$IFS ++IFS="-" read field1 field2 field3 field4 <&2 ++ exit 1 ++ ;; ++ *-*-*-*) ++ basic_machine=$field1-$field2 ++ basic_os=$field3-$field4 ++ ;; ++ *-*-*) ++ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two ++ # parts ++ maybe_os=$field2-$field3 ++ case $maybe_os in ++ cloudabi*-eabi* \ ++ | kfreebsd*-gnu* \ ++ | knetbsd*-gnu* \ ++ | kopensolaris*-gnu* \ ++ | linux-* \ ++ | managarm-* \ ++ | netbsd*-eabi* \ ++ | netbsd*-gnu* \ ++ | nto-qnx* \ ++ | os2-emx* \ ++ | rtmk-nova* \ ++ | storm-chaos* \ ++ | uclinux-gnu* \ ++ | uclinux-uclibc* \ ++ | windows-* ) ++ basic_machine=$field1 ++ basic_os=$maybe_os ++ ;; ++ android-linux) ++ basic_machine=$field1-unknown ++ basic_os=linux-android ++ ;; ++ *) ++ basic_machine=$field1-$field2 ++ basic_os=$field3 ++ ;; ++ esac ++ ;; ++ *-*) ++ case $field1-$field2 in ++ # Shorthands that happen to contain a single dash ++ convex-c[12] | convex-c3[248]) ++ basic_machine=$field2-convex ++ basic_os= ++ ;; ++ decstation-3100) ++ basic_machine=mips-dec ++ basic_os= ++ ;; ++ *-*) ++ # Second component is usually, but not always the OS ++ case $field2 in ++ # Do not treat sunos as a manufacturer ++ sun*os*) ++ basic_machine=$field1 ++ basic_os=$field2 ++ ;; ++ # Manufacturers ++ 3100* \ ++ | 32* \ ++ | 3300* \ ++ | 3600* \ ++ | 7300* \ ++ | acorn \ ++ | altos* \ ++ | apollo \ ++ | apple \ ++ | atari \ ++ | att* \ ++ | axis \ ++ | be \ ++ | bull \ ++ | cbm \ ++ | ccur \ ++ | cisco \ ++ | commodore \ ++ | convergent* \ ++ | convex* \ ++ | cray \ ++ | crds \ ++ | dec* \ ++ | delta* \ ++ | dg \ ++ | digital \ ++ | dolphin \ ++ | encore* \ ++ | gould \ ++ | harris \ ++ | highlevel \ ++ | hitachi* \ ++ | hp \ ++ | ibm* \ ++ | intergraph \ ++ | isi* \ ++ | knuth \ ++ | masscomp \ ++ | microblaze* \ ++ | mips* \ ++ | motorola* \ ++ | ncr* \ ++ | news \ ++ | next \ ++ | ns \ ++ | oki \ ++ | omron* \ ++ | pc533* \ ++ | rebel \ ++ | rom68k \ ++ | rombug \ ++ | semi \ ++ | sequent* \ ++ | siemens \ ++ | sgi* \ ++ | siemens \ ++ | sim \ ++ | sni \ ++ | sony* \ ++ | stratus \ ++ | sun \ ++ | sun[234]* \ ++ | tektronix \ ++ | tti* \ ++ | ultra \ ++ | unicom* \ ++ | wec \ ++ | winbond \ ++ | wrs) ++ basic_machine=$field1-$field2 ++ basic_os= ++ ;; ++ zephyr*) ++ basic_machine=$field1-unknown ++ basic_os=$field2 ++ ;; ++ *) ++ basic_machine=$field1 ++ basic_os=$field2 ++ ;; ++ esac ++ ;; ++ esac ++ ;; ++ *) ++ # Convert single-component short-hands not valid as part of ++ # multi-component configurations. ++ case $field1 in ++ 386bsd) ++ basic_machine=i386-pc ++ basic_os=bsd ++ ;; ++ a29khif) ++ basic_machine=a29k-amd ++ basic_os=udi ++ ;; ++ adobe68k) ++ basic_machine=m68010-adobe ++ basic_os=scout ++ ;; ++ alliant) ++ basic_machine=fx80-alliant ++ basic_os= ++ ;; ++ altos | altos3068) ++ basic_machine=m68k-altos ++ basic_os= ++ ;; ++ am29k) ++ basic_machine=a29k-none ++ basic_os=bsd ++ ;; ++ amdahl) ++ basic_machine=580-amdahl ++ basic_os=sysv ++ ;; ++ amiga) ++ basic_machine=m68k-unknown ++ basic_os= ++ ;; ++ amigaos | amigados) ++ basic_machine=m68k-unknown ++ basic_os=amigaos ++ ;; ++ amigaunix | amix) ++ basic_machine=m68k-unknown ++ basic_os=sysv4 ++ ;; ++ apollo68) ++ basic_machine=m68k-apollo ++ basic_os=sysv ++ ;; ++ apollo68bsd) ++ basic_machine=m68k-apollo ++ basic_os=bsd ++ ;; ++ aros) ++ basic_machine=i386-pc ++ basic_os=aros ++ ;; ++ aux) ++ basic_machine=m68k-apple ++ basic_os=aux ++ ;; ++ balance) ++ basic_machine=ns32k-sequent ++ basic_os=dynix ++ ;; ++ blackfin) ++ basic_machine=bfin-unknown ++ basic_os=linux ++ ;; ++ cegcc) ++ basic_machine=arm-unknown ++ basic_os=cegcc ++ ;; ++ cray) ++ basic_machine=j90-cray ++ basic_os=unicos ++ ;; ++ crds | unos) ++ basic_machine=m68k-crds ++ basic_os= ++ ;; ++ da30) ++ basic_machine=m68k-da30 ++ basic_os= ++ ;; ++ decstation | pmax | pmin | dec3100 | decstatn) ++ basic_machine=mips-dec ++ basic_os= ++ ;; ++ delta88) ++ basic_machine=m88k-motorola ++ basic_os=sysv3 ++ ;; ++ dicos) ++ basic_machine=i686-pc ++ basic_os=dicos ++ ;; ++ djgpp) ++ basic_machine=i586-pc ++ basic_os=msdosdjgpp ++ ;; ++ ebmon29k) ++ basic_machine=a29k-amd ++ basic_os=ebmon ++ ;; ++ es1800 | OSE68k | ose68k | ose | OSE) ++ basic_machine=m68k-ericsson ++ basic_os=ose ++ ;; ++ gmicro) ++ basic_machine=tron-gmicro ++ basic_os=sysv ++ ;; ++ go32) ++ basic_machine=i386-pc ++ basic_os=go32 ++ ;; ++ h8300hms) ++ basic_machine=h8300-hitachi ++ basic_os=hms ++ ;; ++ h8300xray) ++ basic_machine=h8300-hitachi ++ basic_os=xray ++ ;; ++ h8500hms) ++ basic_machine=h8500-hitachi ++ basic_os=hms ++ ;; ++ harris) ++ basic_machine=m88k-harris ++ basic_os=sysv3 ++ ;; ++ hp300 | hp300hpux) ++ basic_machine=m68k-hp ++ basic_os=hpux ++ ;; ++ hp300bsd) ++ basic_machine=m68k-hp ++ basic_os=bsd ++ ;; ++ hppaosf) ++ basic_machine=hppa1.1-hp ++ basic_os=osf ++ ;; ++ hppro) ++ basic_machine=hppa1.1-hp ++ basic_os=proelf ++ ;; ++ i386mach) ++ basic_machine=i386-mach ++ basic_os=mach ++ ;; ++ isi68 | isi) ++ basic_machine=m68k-isi ++ basic_os=sysv ++ ;; ++ m68knommu) ++ basic_machine=m68k-unknown ++ basic_os=linux ++ ;; ++ magnum | m3230) ++ basic_machine=mips-mips ++ basic_os=sysv ++ ;; ++ merlin) ++ basic_machine=ns32k-utek ++ basic_os=sysv ++ ;; ++ mingw64) ++ basic_machine=x86_64-pc ++ basic_os=mingw64 ++ ;; ++ mingw32) ++ basic_machine=i686-pc ++ basic_os=mingw32 ++ ;; ++ mingw32ce) ++ basic_machine=arm-unknown ++ basic_os=mingw32ce ++ ;; ++ monitor) ++ basic_machine=m68k-rom68k ++ basic_os=coff ++ ;; ++ morphos) ++ basic_machine=powerpc-unknown ++ basic_os=morphos ++ ;; ++ moxiebox) ++ basic_machine=moxie-unknown ++ basic_os=moxiebox ++ ;; ++ msdos) ++ basic_machine=i386-pc ++ basic_os=msdos ++ ;; ++ msys) ++ basic_machine=i686-pc ++ basic_os=msys ++ ;; ++ mvs) ++ basic_machine=i370-ibm ++ basic_os=mvs ++ ;; ++ nacl) ++ basic_machine=le32-unknown ++ basic_os=nacl ++ ;; ++ ncr3000) ++ basic_machine=i486-ncr ++ basic_os=sysv4 ++ ;; ++ netbsd386) ++ basic_machine=i386-pc ++ basic_os=netbsd ++ ;; ++ netwinder) ++ basic_machine=armv4l-rebel ++ basic_os=linux ++ ;; ++ news | news700 | news800 | news900) ++ basic_machine=m68k-sony ++ basic_os=newsos ++ ;; ++ news1000) ++ basic_machine=m68030-sony ++ basic_os=newsos ++ ;; ++ necv70) ++ basic_machine=v70-nec ++ basic_os=sysv ++ ;; ++ nh3000) ++ basic_machine=m68k-harris ++ basic_os=cxux ++ ;; ++ nh[45]000) ++ basic_machine=m88k-harris ++ basic_os=cxux ++ ;; ++ nindy960) ++ basic_machine=i960-intel ++ basic_os=nindy ++ ;; ++ mon960) ++ basic_machine=i960-intel ++ basic_os=mon960 ++ ;; ++ nonstopux) ++ basic_machine=mips-compaq ++ basic_os=nonstopux ++ ;; ++ os400) ++ basic_machine=powerpc-ibm ++ basic_os=os400 ++ ;; ++ OSE68000 | ose68000) ++ basic_machine=m68000-ericsson ++ basic_os=ose ++ ;; ++ os68k) ++ basic_machine=m68k-none ++ basic_os=os68k ++ ;; ++ paragon) ++ basic_machine=i860-intel ++ basic_os=osf ++ ;; ++ parisc) ++ basic_machine=hppa-unknown ++ basic_os=linux ++ ;; ++ psp) ++ basic_machine=mipsallegrexel-sony ++ basic_os=psp ++ ;; ++ pw32) ++ basic_machine=i586-unknown ++ basic_os=pw32 ++ ;; ++ rdos | rdos64) ++ basic_machine=x86_64-pc ++ basic_os=rdos ++ ;; ++ rdos32) ++ basic_machine=i386-pc ++ basic_os=rdos ++ ;; ++ rom68k) ++ basic_machine=m68k-rom68k ++ basic_os=coff ++ ;; ++ sa29200) ++ basic_machine=a29k-amd ++ basic_os=udi ++ ;; ++ sei) ++ basic_machine=mips-sei ++ basic_os=seiux ++ ;; ++ sequent) ++ basic_machine=i386-sequent ++ basic_os= ++ ;; ++ sps7) ++ basic_machine=m68k-bull ++ basic_os=sysv2 ++ ;; ++ st2000) ++ basic_machine=m68k-tandem ++ basic_os= ++ ;; ++ stratus) ++ basic_machine=i860-stratus ++ basic_os=sysv4 ++ ;; ++ sun2) ++ basic_machine=m68000-sun ++ basic_os= ++ ;; ++ sun2os3) ++ basic_machine=m68000-sun ++ basic_os=sunos3 ++ ;; ++ sun2os4) ++ basic_machine=m68000-sun ++ basic_os=sunos4 ++ ;; ++ sun3) ++ basic_machine=m68k-sun ++ basic_os= ++ ;; ++ sun3os3) ++ basic_machine=m68k-sun ++ basic_os=sunos3 ++ ;; ++ sun3os4) ++ basic_machine=m68k-sun ++ basic_os=sunos4 ++ ;; ++ sun4) ++ basic_machine=sparc-sun ++ basic_os= ++ ;; ++ sun4os3) ++ basic_machine=sparc-sun ++ basic_os=sunos3 ++ ;; ++ sun4os4) ++ basic_machine=sparc-sun ++ basic_os=sunos4 ++ ;; ++ sun4sol2) ++ basic_machine=sparc-sun ++ basic_os=solaris2 ++ ;; ++ sun386 | sun386i | roadrunner) ++ basic_machine=i386-sun ++ basic_os= ++ ;; ++ sv1) ++ basic_machine=sv1-cray ++ basic_os=unicos ++ ;; ++ symmetry) ++ basic_machine=i386-sequent ++ basic_os=dynix ++ ;; ++ t3e) ++ basic_machine=alphaev5-cray ++ basic_os=unicos ++ ;; ++ t90) ++ basic_machine=t90-cray ++ basic_os=unicos ++ ;; ++ toad1) ++ basic_machine=pdp10-xkl ++ basic_os=tops20 ++ ;; ++ tpf) ++ basic_machine=s390x-ibm ++ basic_os=tpf ++ ;; ++ udi29k) ++ basic_machine=a29k-amd ++ basic_os=udi ++ ;; ++ ultra3) ++ basic_machine=a29k-nyu ++ basic_os=sym1 ++ ;; ++ v810 | necv810) ++ basic_machine=v810-nec ++ basic_os=none ++ ;; ++ vaxv) ++ basic_machine=vax-dec ++ basic_os=sysv ++ ;; ++ vms) ++ basic_machine=vax-dec ++ basic_os=vms ++ ;; ++ vsta) ++ basic_machine=i386-pc ++ basic_os=vsta ++ ;; ++ vxworks960) ++ basic_machine=i960-wrs ++ basic_os=vxworks ++ ;; ++ vxworks68) ++ basic_machine=m68k-wrs ++ basic_os=vxworks ++ ;; ++ vxworks29k) ++ basic_machine=a29k-wrs ++ basic_os=vxworks ++ ;; ++ xbox) ++ basic_machine=i686-pc ++ basic_os=mingw32 ++ ;; ++ ymp) ++ basic_machine=ymp-cray ++ basic_os=unicos ++ ;; ++ *) ++ basic_machine=$1 ++ basic_os= ++ ;; ++ esac ++ ;; ++esac ++ ++# Decode 1-component or ad-hoc basic machines ++case $basic_machine in ++ # Here we handle the default manufacturer of certain CPU types. It is in ++ # some cases the only manufacturer, in others, it is the most popular. ++ w89k) ++ cpu=hppa1.1 ++ vendor=winbond ++ ;; ++ op50n) ++ cpu=hppa1.1 ++ vendor=oki ++ ;; ++ op60c) ++ cpu=hppa1.1 ++ vendor=oki ++ ;; ++ ibm*) ++ cpu=i370 ++ vendor=ibm ++ ;; ++ orion105) ++ cpu=clipper ++ vendor=highlevel ++ ;; ++ mac | mpw | mac-mpw) ++ cpu=m68k ++ vendor=apple ++ ;; ++ pmac | pmac-mpw) ++ cpu=powerpc ++ vendor=apple ++ ;; ++ ++ # Recognize the various machine names and aliases which stand ++ # for a CPU type and a company and sometimes even an OS. ++ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) ++ cpu=m68000 ++ vendor=att ++ ;; ++ 3b*) ++ cpu=we32k ++ vendor=att ++ ;; ++ bluegene*) ++ cpu=powerpc ++ vendor=ibm ++ basic_os=cnk ++ ;; ++ decsystem10* | dec10*) ++ cpu=pdp10 ++ vendor=dec ++ basic_os=tops10 ++ ;; ++ decsystem20* | dec20*) ++ cpu=pdp10 ++ vendor=dec ++ basic_os=tops20 ++ ;; ++ delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) ++ cpu=m68k ++ vendor=motorola ++ ;; ++ # This used to be dpx2*, but that gets the RS6000-based ++ # DPX/20 and the x86-based DPX/2-100 wrong. See ++ # https://oldskool.silicium.org/stations/bull_dpx20.htm ++ # https://www.feb-patrimoine.com/english/bull_dpx2.htm ++ # https://www.feb-patrimoine.com/english/unix_and_bull.htm ++ dpx2 | dpx2[23]00 | dpx2[23]xx) ++ cpu=m68k ++ vendor=bull ++ ;; ++ dpx2100 | dpx21xx) ++ cpu=i386 ++ vendor=bull ++ ;; ++ dpx20) ++ cpu=rs6000 ++ vendor=bull ++ ;; ++ encore | umax | mmax) ++ cpu=ns32k ++ vendor=encore ++ ;; ++ elxsi) ++ cpu=elxsi ++ vendor=elxsi ++ basic_os=${basic_os:-bsd} ++ ;; ++ fx2800) ++ cpu=i860 ++ vendor=alliant ++ ;; ++ genix) ++ cpu=ns32k ++ vendor=ns ++ ;; ++ h3050r* | hiux*) ++ cpu=hppa1.1 ++ vendor=hitachi ++ basic_os=hiuxwe2 ++ ;; ++ hp3k9[0-9][0-9] | hp9[0-9][0-9]) ++ cpu=hppa1.0 ++ vendor=hp ++ ;; ++ hp9k2[0-9][0-9] | hp9k31[0-9]) ++ cpu=m68000 ++ vendor=hp ++ ;; ++ hp9k3[2-9][0-9]) ++ cpu=m68k ++ vendor=hp ++ ;; ++ hp9k6[0-9][0-9] | hp6[0-9][0-9]) ++ cpu=hppa1.0 ++ vendor=hp ++ ;; ++ hp9k7[0-79][0-9] | hp7[0-79][0-9]) ++ cpu=hppa1.1 ++ vendor=hp ++ ;; ++ hp9k78[0-9] | hp78[0-9]) ++ # FIXME: really hppa2.0-hp ++ cpu=hppa1.1 ++ vendor=hp ++ ;; ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) ++ # FIXME: really hppa2.0-hp ++ cpu=hppa1.1 ++ vendor=hp ++ ;; ++ hp9k8[0-9][13679] | hp8[0-9][13679]) ++ cpu=hppa1.1 ++ vendor=hp ++ ;; ++ hp9k8[0-9][0-9] | hp8[0-9][0-9]) ++ cpu=hppa1.0 ++ vendor=hp ++ ;; ++ i*86v32) ++ cpu=`echo "$1" | sed -e 's/86.*/86/'` ++ vendor=pc ++ basic_os=sysv32 ++ ;; ++ i*86v4*) ++ cpu=`echo "$1" | sed -e 's/86.*/86/'` ++ vendor=pc ++ basic_os=sysv4 ++ ;; ++ i*86v) ++ cpu=`echo "$1" | sed -e 's/86.*/86/'` ++ vendor=pc ++ basic_os=sysv ++ ;; ++ i*86sol2) ++ cpu=`echo "$1" | sed -e 's/86.*/86/'` ++ vendor=pc ++ basic_os=solaris2 ++ ;; ++ j90 | j90-cray) ++ cpu=j90 ++ vendor=cray ++ basic_os=${basic_os:-unicos} ++ ;; ++ iris | iris4d) ++ cpu=mips ++ vendor=sgi ++ case $basic_os in ++ irix*) ++ ;; ++ *) ++ basic_os=irix4 ++ ;; ++ esac ++ ;; ++ miniframe) ++ cpu=m68000 ++ vendor=convergent ++ ;; ++ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) ++ cpu=m68k ++ vendor=atari ++ basic_os=mint ++ ;; ++ news-3600 | risc-news) ++ cpu=mips ++ vendor=sony ++ basic_os=newsos ++ ;; ++ next | m*-next) ++ cpu=m68k ++ vendor=next ++ ;; ++ np1) ++ cpu=np1 ++ vendor=gould ++ ;; ++ op50n-* | op60c-*) ++ cpu=hppa1.1 ++ vendor=oki ++ basic_os=proelf ++ ;; ++ pa-hitachi) ++ cpu=hppa1.1 ++ vendor=hitachi ++ basic_os=hiuxwe2 ++ ;; ++ pbd) ++ cpu=sparc ++ vendor=tti ++ ;; ++ pbb) ++ cpu=m68k ++ vendor=tti ++ ;; ++ pc532) ++ cpu=ns32k ++ vendor=pc532 ++ ;; ++ pn) ++ cpu=pn ++ vendor=gould ++ ;; ++ power) ++ cpu=power ++ vendor=ibm ++ ;; ++ ps2) ++ cpu=i386 ++ vendor=ibm ++ ;; ++ rm[46]00) ++ cpu=mips ++ vendor=siemens ++ ;; ++ rtpc | rtpc-*) ++ cpu=romp ++ vendor=ibm ++ ;; ++ sde) ++ cpu=mipsisa32 ++ vendor=sde ++ basic_os=${basic_os:-elf} ++ ;; ++ simso-wrs) ++ cpu=sparclite ++ vendor=wrs ++ basic_os=vxworks ++ ;; ++ tower | tower-32) ++ cpu=m68k ++ vendor=ncr ++ ;; ++ vpp*|vx|vx-*) ++ cpu=f301 ++ vendor=fujitsu ++ ;; ++ w65) ++ cpu=w65 ++ vendor=wdc ++ ;; ++ w89k-*) ++ cpu=hppa1.1 ++ vendor=winbond ++ basic_os=proelf ++ ;; ++ none) ++ cpu=none ++ vendor=none ++ ;; ++ leon|leon[3-9]) ++ cpu=sparc ++ vendor=$basic_machine ++ ;; ++ leon-*|leon[3-9]-*) ++ cpu=sparc ++ vendor=`echo "$basic_machine" | sed 's/-.*//'` ++ ;; ++ ++ *-*) ++ saved_IFS=$IFS ++ IFS="-" read cpu vendor <&2 ++ exit 1 ++ ;; ++ esac ++ ;; ++esac ++ ++# Here we canonicalize certain aliases for manufacturers. ++case $vendor in ++ digital*) ++ vendor=dec ++ ;; ++ commodore*) ++ vendor=cbm ++ ;; ++ *) ++ ;; ++esac ++ ++# Decode manufacturer-specific aliases for certain operating systems. ++ ++if test x"$basic_os" != x ++then ++ ++# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just ++# set os. ++obj= ++case $basic_os in ++ gnu/linux*) ++ kernel=linux ++ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ++ ;; ++ os2-emx) ++ kernel=os2 ++ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ++ ;; ++ nto-qnx*) ++ kernel=nto ++ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ++ ;; ++ *-*) ++ saved_IFS=$IFS ++ IFS="-" read kernel os <&2 ++ fi ++ ;; ++ *) ++ echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 ++ exit 1 ++ ;; ++esac ++ ++case $obj in ++ aout* | coff* | elf* | pe*) ++ ;; ++ '') ++ # empty is fine ++ ;; ++ *) ++ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we handle the constraint that a (synthetic) cpu and os are ++# valid only in combination with each other and nowhere else. ++case $cpu-$os in ++ # The "javascript-unknown-ghcjs" triple is used by GHC; we ++ # accept it here in order to tolerate that, but reject any ++ # variations. ++ javascript-ghcjs) ++ ;; ++ javascript-* | *-ghcjs) ++ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# As a final step for OS-related things, validate the OS-kernel combination ++# (given a valid OS), if there is a kernel. ++case $kernel-$os-$obj in ++ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ ++ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ ++ | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) ++ ;; ++ uclinux-uclibc*- | uclinux-gnu*- ) ++ ;; ++ managarm-mlibc*- | managarm-kernel*- ) ++ ;; ++ windows*-msvc*-) ++ ;; ++ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ ++ | -uclibc*- ) ++ # These are just libc implementations, not actual OSes, and thus ++ # require a kernel. ++ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 ++ exit 1 ++ ;; ++ -kernel*- ) ++ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 ++ exit 1 ++ ;; ++ *-kernel*- ) ++ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 ++ exit 1 ++ ;; ++ *-msvc*- ) ++ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 ++ exit 1 ++ ;; ++ kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) ++ ;; ++ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ++ ;; ++ nto-qnx*-) ++ ;; ++ os2-emx-) ++ ;; ++ rtmk-nova-) ++ ;; ++ *-eabi*- | *-gnueabi*-) ++ ;; ++ none--*) ++ # None (no kernel, i.e. freestanding / bare metal), ++ # can be paired with an machine code file format ++ ;; ++ -*-) ++ # Blank kernel with real OS is always fine. ++ ;; ++ --*) ++ # Blank kernel and OS with real machine code file format is always fine. ++ ;; ++ *-*-*) ++ echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we handle the case where we know the os, and the CPU type, but not the ++# manufacturer. We pick the logical manufacturer. ++case $vendor in ++ unknown) ++ case $cpu-$os in ++ *-riscix*) ++ vendor=acorn ++ ;; ++ *-sunos* | *-solaris*) ++ vendor=sun ++ ;; ++ *-cnk* | *-aix*) ++ vendor=ibm ++ ;; ++ *-beos*) ++ vendor=be ++ ;; ++ *-hpux*) ++ vendor=hp ++ ;; ++ *-mpeix*) ++ vendor=hp ++ ;; ++ *-hiux*) ++ vendor=hitachi ++ ;; ++ *-unos*) ++ vendor=crds ++ ;; ++ *-dgux*) ++ vendor=dg ++ ;; ++ *-luna*) ++ vendor=omron ++ ;; ++ *-genix*) ++ vendor=ns ++ ;; ++ *-clix*) ++ vendor=intergraph ++ ;; ++ *-mvs* | *-opened*) ++ vendor=ibm ++ ;; ++ *-os400*) ++ vendor=ibm ++ ;; ++ s390-* | s390x-*) ++ vendor=ibm ++ ;; ++ *-ptx*) ++ vendor=sequent ++ ;; ++ *-tpf*) ++ vendor=ibm ++ ;; ++ *-vxsim* | *-vxworks* | *-windiss*) ++ vendor=wrs ++ ;; ++ *-aux*) ++ vendor=apple ++ ;; ++ *-hms*) ++ vendor=hitachi ++ ;; ++ *-mpw* | *-macos*) ++ vendor=apple ++ ;; ++ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) ++ vendor=atari ++ ;; ++ *-vos*) ++ vendor=stratus ++ ;; ++ esac ++ ;; ++esac ++ ++echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" ++exit ++ ++# Local variables: ++# eval: (add-hook 'before-save-hook 'time-stamp) ++# time-stamp-start: "timestamp='" ++# time-stamp-format: "%:y-%02m-%02d" ++# time-stamp-end: "'" ++# End: From 821324ee23935b85b0f9242020feed378f18aef2 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 23 Feb 2025 20:59:22 +0000 Subject: [PATCH 05/14] Tidy up the Mac Catalyst support --- patch/mpdecimal.patch | 409 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 399 insertions(+), 10 deletions(-) diff --git a/patch/mpdecimal.patch b/patch/mpdecimal.patch index 8819cd1..6ec0554 100644 --- a/patch/mpdecimal.patch +++ b/patch/mpdecimal.patch @@ -1,21 +1,410 @@ -diff -ur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub ---- mpdecimal-4.0.0-orig/config.sub 2024-01-10 08:25:00 -+++ mpdecimal-4.0.0/config.sub 2024-07-24 13:16:35 -@@ -1127,7 +1127,7 @@ +diff -Naur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub +--- mpdecimal-4.0.0-orig/config.sub 2024-01-10 00:25:00 ++++ mpdecimal-4.0.0/config.sub 2025-02-23 20:09:01 +@@ -1,10 +1,11 @@ + #! /bin/sh + # Configuration validation subroutine script. +-# Copyright 1992-2023 Free Software Foundation, Inc. ++# Copyright 1992-2024 Free Software Foundation, Inc. + + # shellcheck disable=SC2006,SC2268 # see below for rationale + +-timestamp='2023-07-31' ++# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators ++timestamp='2024-01-01' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -76,7 +77,7 @@ + version="\ + GNU config.sub ($timestamp) + +-Copyright 1992-2023 Free Software Foundation, Inc. ++Copyright 1992-2024 Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -1127,7 +1128,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-* | aarch64le-*) -+ arm64-* | arm64_32-* | aarch64le-*) ++ arm64-* | aarch64le-* | arm64_32-*) cpu=aarch64 ;; -@@ -1792,6 +1792,8 @@ - os2-emx) +@@ -1177,11 +1178,11 @@ + + *) + # Recognize the canonical CPU types that are allowed with any +- # company name (aarch64c added by mpdecimal project). ++ # company name. + case $cpu in + 1750a | 580 \ + | a29k \ +- | aarch64 | aarch64_be | aarch64c \ ++ | aarch64 | aarch64_be | aarch64c | arm64ec \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ +@@ -1200,6 +1201,7 @@ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ ++ | javascript \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ +@@ -1221,6 +1223,7 @@ + | moxie \ + | mt \ + | msp430 \ ++ | nanomips* \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ +@@ -1252,6 +1255,7 @@ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ ++ | vc4 \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ +@@ -1284,11 +1288,12 @@ + + # Decode manufacturer-specific aliases for certain operating systems. + +-if test x$basic_os != x ++if test x"$basic_os" != x + then + + # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just + # set os. ++obj= + case $basic_os in + gnu/linux*) + kernel=linux +@@ -1488,10 +1493,16 @@ + os=eabi + ;; + *) +- os=elf ++ os= ++ obj=elf + ;; + esac + ;; ++ aout* | coff* | elf* | pe*) ++ # These are machine code file formats, not OSes ++ obj=$os ++ os= ++ ;; + *) + # No normalization, but not necessarily accepted, that comes below. + ;; +@@ -1510,12 +1521,15 @@ + # system, and we'll never get to this point. + + kernel= ++obj= + case $cpu-$vendor in + score-*) +- os=elf ++ os= ++ obj=elf + ;; + spu-*) +- os=elf ++ os= ++ obj=elf + ;; + *-acorn) + os=riscix1.2 +@@ -1525,28 +1539,35 @@ + os=gnu + ;; + arm*-semi) +- os=aout ++ os= ++ obj=aout + ;; + c4x-* | tic4x-*) +- os=coff ++ os= ++ obj=coff + ;; + c8051-*) +- os=elf ++ os= ++ obj=elf + ;; + clipper-intergraph) + os=clix + ;; + hexagon-*) +- os=elf ++ os= ++ obj=elf + ;; + tic54x-*) +- os=coff ++ os= ++ obj=coff + ;; + tic55x-*) +- os=coff ++ os= ++ obj=coff + ;; + tic6x-*) +- os=coff ++ os= ++ obj=coff + ;; + # This must come before the *-dec entry. + pdp10-*) +@@ -1568,19 +1589,24 @@ + os=sunos3 + ;; + m68*-cisco) +- os=aout ++ os= ++ obj=aout + ;; + mep-*) +- os=elf ++ os= ++ obj=elf + ;; + mips*-cisco) +- os=elf ++ os= ++ obj=elf + ;; +- mips*-*) +- os=elf ++ mips*-*|nanomips*-*) ++ os= ++ obj=elf + ;; + or32-*) +- os=coff ++ os= ++ obj=coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=sysv3 +@@ -1589,7 +1615,8 @@ + os=sunos4.1.1 + ;; + pru-*) +- os=elf ++ os= ++ obj=elf + ;; + *-be) + os=beos +@@ -1670,10 +1697,12 @@ + os=uxpv + ;; + *-rom68k) +- os=coff ++ os= ++ obj=coff + ;; + *-*bug) +- os=coff ++ os= ++ obj=coff + ;; + *-apple) + os=macos +@@ -1691,10 +1720,11 @@ + + fi + +-# Now, validate our (potentially fixed-up) OS. ++# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). ++ + case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. +- musl* | newlib* | relibc* | uclibc*) ++ llvm* | musl* | newlib* | relibc* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) +@@ -1702,6 +1732,9 @@ + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; ++ # See `case $cpu-$os` validation below ++ ghcjs) ++ ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. +@@ -1719,11 +1752,11 @@ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ +- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ +- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ ++ | bosx* | nextstep* | cxux* | oabi* \ ++ | ptx* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ +- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ ++ | cygwin* | msys* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ +@@ -1736,71 +1769,119 @@ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ +- | fiwix* | mlibc* | cos* | mbr* ) ++ | fiwix* | mlibc* | cos* | mbr* | ironclad* | macabi) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; ++ # This refers to builds using the UEFI calling convention ++ # (which depends on the architecture) and PE file format. ++ # Note that this is both a different calling convention and ++ # different file format than that of GNU-EFI ++ # (x86_64-w64-mingw32). ++ uefi) ++ ;; + none) + ;; + kernel* | msvc* ) + # Restricted further below + ;; ++ '') ++ if test x"$obj" = x ++ then ++ echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 ++ fi ++ ;; + *) + echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 + exit 1 ;; - *-eabi* | *-gnueabi*) + esac + ++case $obj in ++ aout* | coff* | elf* | pe*) ++ ;; ++ '') ++ # empty is fine ++ ;; ++ *) ++ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 ++ exit 1 ++ ;; ++esac ++ ++# Here we handle the constraint that a (synthetic) cpu and os are ++# valid only in combination with each other and nowhere else. ++case $cpu-$os in ++ # The "javascript-unknown-ghcjs" triple is used by GHC; we ++ # accept it here in order to tolerate that, but reject any ++ # variations. ++ javascript-ghcjs) + ;; -+ ios*-simulator | tvos*-simulator | watchos*-simulator | ios*-macabi ) ++ javascript-* | *-ghcjs) ++ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 ++ exit 1 ++ ;; ++esac ++ + # As a final step for OS-related things, validate the OS-kernel combination + # (given a valid OS), if there is a kernel. +-case $kernel-$os in +- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ +- | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ++case $kernel-$os-$obj in ++ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ ++ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ ++ | linux-relibc*- | linux-uclibc*- ) + ;; +- uclinux-uclibc* ) ++ uclinux-uclibc*- ) + ;; +- managarm-mlibc* | managarm-kernel* ) ++ managarm-mlibc*- | managarm-kernel*- ) + ;; +- windows*-gnu* | windows*-msvc*) ++ windows*-msvc*-) ;; - none-coff* | none-elf*) +- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) ++ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ ++ | -uclibc*- ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 + exit 1 + ;; +- -kernel* ) ++ -kernel*- ) + echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 + exit 1 + ;; +- *-kernel* ) ++ *-kernel*- ) + echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 + exit 1 + ;; +- *-msvc* ) ++ *-msvc*- ) + echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 + exit 1 + ;; +- kfreebsd*-gnu* | kopensolaris*-gnu*) ++ kfreebsd*-gnu*- | kopensolaris*-gnu*-) + ;; +- vxworks-simlinux | vxworks-simwindows | vxworks-spe) ++ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) + ;; +- nto-qnx*) ++ nto-qnx*-) + ;; +- os2-emx) ++ os2-emx-) + ;; +- *-eabi* | *-gnueabi*) ++ *-eabi*- | *-gnueabi*-) + ;; +- none-coff* | none-elf*) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ++ ;; ++ ios*-macabi- ) ++ ;; ++ none--*) # None (no kernel, i.e. freestanding / bare metal), +- # can be paired with an output format "OS" ++ # can be paired with an machine code file format + ;; +- -*) ++ -*-) + # Blank kernel with real OS is always fine. + ;; +- *-*) ++ --*) ++ # Blank kernel and OS with real machine code file format is always fine. ++ ;; ++ *-*-*) + echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 + exit 1 + ;; +@@ -1884,7 +1965,7 @@ + ;; + esac + +-echo "$cpu-$vendor-${kernel:+$kernel-}$os" ++echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" + exit + + # Local variables: From 7f4b45b78436b50a60b32b2f283457235f8434ab Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Wed, 26 Feb 2025 19:47:51 +0000 Subject: [PATCH 06/14] Tidy up the Mac Catalyst support --- patch/libffi.patch | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/patch/libffi.patch b/patch/libffi.patch index ea5d8b4..e17e06d 100644 --- a/patch/libffi.patch +++ b/patch/libffi.patch @@ -1,6 +1,5 @@ -diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub --- libffi-3.4.7-orig/config.sub 2024-12-13 10:38:19 -+++ libffi-3.4.7/config.sub 2025-02-23 09:47:29 ++++ libffi-3.4.7/config.sub 2025-02-26 18:50:21 @@ -4,6 +4,7 @@ # shellcheck disable=SC2006,SC2268 # see below for rationale @@ -9,19 +8,16 @@ diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it -@@ -1127,7 +1128,10 @@ +@@ -1127,7 +1128,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-* | arm64_32-* | aarch64le-*) -+ arm64-apple) -+ cpu=arm64 -+ ;; + arm64-* | aarch64le-* | arm64_32-*) cpu=aarch64 ;; -@@ -1768,7 +1772,7 @@ +@@ -1768,7 +1769,7 @@ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ @@ -30,20 +26,21 @@ diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -1864,9 +1868,11 @@ +@@ -1864,10 +1865,12 @@ ;; os2-emx-) ;; - ios*-simulator* | tvos*-simulator* | watchos*-simulator*) - ;; *-eabi*- | *-gnueabi*-) -+ ;; + ;; + ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) + ;; + ios*-macabi- ) - ;; ++ ;; none--*) # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/generate-darwin-source-and-headers.py --- libffi-3.4.7-orig/generate-darwin-source-and-headers.py 2024-06-01 18:42:02 +++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-02-23 09:40:26 From 5a757dedfe440b8ca0778df64d3cef5542259b0c Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 9 Mar 2025 17:38:52 +0000 Subject: [PATCH 07/14] Add MacCatalyst target --- Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7a0cad7..29dc54e 100644 --- a/Makefile +++ b/Makefile @@ -4,32 +4,38 @@ # - iOS - build everything for iOS # - tvOS - build everything for tvOS # - watchOS - build everything for watchOS +# - MacCatalyst - build everything for MacCatalyst # - BZip2 - build BZip2 for all platforms # - BZip2-iOS - build BZip2 for iOS # - BZip2-tvOS - build BZip2 for tvOS # - BZip2-watchOS - build BZip2 for watchOS +# - BZip2-MacCatalyst - build BZip2 for MacCatalyst # - XZ - build XZ for all platforms # - XZ-iOS - build XZ for iOS # - XZ-tvOS - build XZ for tvOS # - XZ-watchOS - build XZ for watchOS +# - XZ-MacCatalyst - build XZ for MacCatalyst # - OpenSSL - build OpenSSL for all platforms # - OpenSSL-iOS - build OpenSSL for iOS # - OpenSSL-tvOS - build OpenSSL for tvOS # - OpenSSL-watchOS - build OpenSSL for watchOS +# - OpenSSL-MacCatalyst - build OpenSSL for MacCatalyst # - mpdecimal - build mpdecimal for all platforms # - mpdecimal-iOS - build mpdecimal for iOS # - mpdecimal-tvOS - build mpdecimal for tvOS # - mpdecimal-watchOS - build mpdecimal for watchOS +# - mpdecimal-MacCatalyst - build mpdecimal for MacCatalyst # - libFFI-iOS - build libFFI for iOS # - libFFI-tvOS - build libFFI for tvOS # - libFFI-watchOS - build libFFI for watchOS +# - libFFI-MacCatalyst - build libFFI for MacCatalyst # Current directory PROJECT_DIR=$(shell pwd) # Supported OS and products PRODUCTS=BZip2 XZ OpenSSL libFFI -OS_LIST=iOS tvOS watchOS +OS_LIST=iOS tvOS watchOS MacCatalyst # The versions to compile by default. # In practice, these should be @@ -57,10 +63,15 @@ LIBFFI_VERSION=3.4.7 CURL_FLAGS=--disable --fail --location --create-dirs --progress-bar # iOS targets -TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 maccatalyst.x86_64 maccatalyst.arm64 -VERSION_MIN-iOS=14.2 +TARGETS-iOS=iphonesimulator.x86_64 iphonesimulator.arm64 iphoneos.arm64 +VERSION_MIN-iOS=13.0 CFLAGS-iOS=-mios-version-min=$(VERSION_MIN-iOS) +# MacCatalyst targets +TARGETS-MacCatalyst=maccatalyst.x86_64 maccatalyst.arm64 +VERSION_MIN-MacCatalyst=14.2 +CFLAGS-MacCatalyst=-mios-version-min=$(VERSION_MIN-MacCatalyst) + # tvOS targets TARGETS-tvOS=appletvsimulator.x86_64 appletvsimulator.arm64 appletvos.arm64 VERSION_MIN-tvOS=9.0 From ff2c07c173edc76131df369cbd5e2d7cbbe437ff Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 9 Mar 2025 17:39:37 +0000 Subject: [PATCH 08/14] Fix the libffi patch, revert incidental changes --- patch/libffi.patch | 86 ++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/patch/libffi.patch b/patch/libffi.patch index e17e06d..0641a63 100644 --- a/patch/libffi.patch +++ b/patch/libffi.patch @@ -1,23 +1,7 @@ +diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub --- libffi-3.4.7-orig/config.sub 2024-12-13 10:38:19 -+++ libffi-3.4.7/config.sub 2025-02-26 18:50:21 -@@ -4,6 +4,7 @@ - - # shellcheck disable=SC2006,SC2268 # see below for rationale - -+# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators - timestamp='2024-01-01' - - # This file is free software; you can redistribute it and/or modify it -@@ -1127,7 +1128,7 @@ - xscale-* | xscalee[bl]-*) - cpu=`echo "$cpu" | sed 's/^xscale/arm/'` - ;; -- arm64-* | arm64_32-* | aarch64le-*) -+ arm64-* | aarch64le-* | arm64_32-*) - cpu=aarch64 - ;; - -@@ -1768,7 +1769,7 @@ ++++ libffi-3.4.7/config.sub 2025-03-09 14:09:03 +@@ -1768,7 +1768,7 @@ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ @@ -26,24 +10,21 @@ ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -1864,10 +1865,12 @@ - ;; +@@ -1865,8 +1865,10 @@ os2-emx-) ;; -- ios*-simulator* | tvos*-simulator* | watchos*-simulator*) + ios*-simulator* | tvos*-simulator* | watchos*-simulator*) - ;; ++ ;; *-eabi*- | *-gnueabi*-) - ;; -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) + ;; + ios*-macabi- ) -+ ;; + ;; none--*) # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an machine code file format diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/generate-darwin-source-and-headers.py --- libffi-3.4.7-orig/generate-darwin-source-and-headers.py 2024-06-01 18:42:02 -+++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-02-23 09:40:26 ++++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-03-09 14:29:38 @@ -8,7 +8,7 @@ @@ -59,7 +40,7 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ +class macosx_x86_64_platform(x86_64_platform): + target = 'x86_64-apple-ios-macabi' -+ directory = 'darwin_ios' ++ directory = 'darwin_maccatalyst' + sdk = 'macosx' + version_min = '-mios-version-min=14.2' + abi = 'macabi' @@ -67,7 +48,7 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ + +class macosx_arm64_platform(arm64_platform): + target = 'arm64-apple-ios-macabi' -+ directory = 'darwin_ios' ++ directory = 'darwin_maccatalyst' + sdk = 'macosx' + version_min = '-mios-version-min=14.2' + abi = 'macabi' @@ -89,7 +70,7 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ generate_ios=True, generate_tvos=True, generate_watchos=True, -+ enable_maccatalyst=True, ++ generate_maccatalyst=True, + enable_i386=True, + enable_armv7=True, ): @@ -106,9 +87,9 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ + if enable_armv7: + copy_src_platform_files(ios_device_armv7_platform) copy_src_platform_files(ios_device_arm64_platform) -+ if enable_maccatalyst: -+ copy_src_platform_files(macosx_x86_64_platform) -+ copy_src_platform_files(macosx_arm64_platform) ++ if generate_maccatalyst: ++ copy_src_platform_files(macosx_x86_64_platform) ++ copy_src_platform_files(macosx_arm64_platform) if generate_osx: copy_src_platform_files(desktop_x86_64_platform) copy_src_platform_files(desktop_arm64_platform) @@ -138,9 +119,9 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ + if enable_armv7: + build_target(ios_device_armv7_platform, platform_headers) build_target(ios_device_arm64_platform, platform_headers) -+ if enable_maccatalyst: -+ build_target(macosx_x86_64_platform, platform_headers) -+ build_target(macosx_arm64_platform, platform_headers) ++ if generate_maccatalyst: ++ build_target(macosx_x86_64_platform, platform_headers) ++ build_target(macosx_arm64_platform, platform_headers) if generate_osx: build_target(desktop_x86_64_platform, platform_headers) build_target(desktop_arm64_platform, platform_headers) @@ -159,19 +140,36 @@ diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/ build_target(watchos_device_arm64_32_platform, platform_headers) mkdir_p('darwin_common/include') -@@ -302,6 +334,8 @@ - parser.add_argument('--only-osx', action='store_true', default=False) - parser.add_argument('--only-tvos', action='store_true', default=False) - parser.add_argument('--only-watchos', action='store_true', default=False) +@@ -298,15 +330,24 @@ + + if __name__ == '__main__': + parser = argparse.ArgumentParser() +- parser.add_argument('--only-ios', action='store_true', default=False) +- parser.add_argument('--only-osx', action='store_true', default=False) +- parser.add_argument('--only-tvos', action='store_true', default=False) +- parser.add_argument('--only-watchos', action='store_true', default=False) ++ only_group = parser.add_mutually_exclusive_group() ++ # Enforce only one of these options to be specified, default is all ++ only_group.add_argument('--only-ios', action='store_true', default=False) ++ only_group.add_argument('--only-osx', action='store_true', default=False) ++ only_group.add_argument('--only-tvos', action='store_true', default=False) ++ only_group.add_argument('--only-watchos', action='store_true', default=False) ++ only_group.add_argument('--only-maccatalyst', action='store_true', default=False) + parser.add_argument('--disable-i386', action='store_true', default=False) + parser.add_argument('--disable-armv7', action='store_true', default=False) args = parser.parse_args() ++ enable_all = not any((args.only_ios, args.only_osx, args.only_tvos, args.only_watchos, args.only_maccatalyst)) generate_source_and_headers( -@@ -309,4 +343,6 @@ - generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos, - generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos, - generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos, +- generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos, +- generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos, +- generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos, +- generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos, ++ generate_osx=enable_all or args.only_osx, ++ generate_ios=enable_all or args.only_ios, ++ generate_tvos=enable_all or args.only_tvos, ++ generate_watchos=enable_all or args.only_watchos, ++ generate_maccatalyst=enable_all or args.only_maccatalyst, + enable_i386=not args.disable_i386, + enable_armv7=not args.disable_armv7, ) From a05125cca58a4ebe97e0d081cbe319fa558000d7 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 9 Mar 2025 19:39:52 +0000 Subject: [PATCH 09/14] Revert mpdecimal patches --- patch/mpdecimal.patch | 402 ++---------------------------------------- 1 file changed, 12 insertions(+), 390 deletions(-) diff --git a/patch/mpdecimal.patch b/patch/mpdecimal.patch index 6ec0554..200f252 100644 --- a/patch/mpdecimal.patch +++ b/patch/mpdecimal.patch @@ -1,410 +1,32 @@ diff -Naur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub --- mpdecimal-4.0.0-orig/config.sub 2024-01-10 00:25:00 -+++ mpdecimal-4.0.0/config.sub 2025-02-23 20:09:01 -@@ -1,10 +1,11 @@ - #! /bin/sh - # Configuration validation subroutine script. --# Copyright 1992-2023 Free Software Foundation, Inc. -+# Copyright 1992-2024 Free Software Foundation, Inc. - - # shellcheck disable=SC2006,SC2268 # see below for rationale - --timestamp='2023-07-31' -+# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators -+timestamp='2024-01-01' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -76,7 +77,7 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright 1992-2023 Free Software Foundation, Inc. -+Copyright 1992-2024 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -1127,7 +1128,7 @@ ++++ mpdecimal-4.0.0/config.sub 2025-03-09 19:38:32 +@@ -1127,7 +1127,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-* | aarch64le-*) -+ arm64-* | aarch64le-* | arm64_32-*) ++ arm64-* | arm64_32-* | aarch64le-*) cpu=aarch64 ;; -@@ -1177,11 +1178,11 @@ - - *) - # Recognize the canonical CPU types that are allowed with any -- # company name (aarch64c added by mpdecimal project). -+ # company name. - case $cpu in - 1750a | 580 \ - | a29k \ -- | aarch64 | aarch64_be | aarch64c \ -+ | aarch64 | aarch64_be | aarch64c | arm64ec \ - | abacus \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ -@@ -1200,6 +1201,7 @@ - | d10v | d30v | dlx | dsp16xx \ - | e2k | elxsi | epiphany \ - | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ -+ | javascript \ - | h8300 | h8500 \ - | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ -@@ -1221,6 +1223,7 @@ - | moxie \ - | mt \ - | msp430 \ -+ | nanomips* \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ -@@ -1252,6 +1255,7 @@ - | ubicom32 \ - | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ - | vax \ -+ | vc4 \ - | visium \ - | w65 \ - | wasm32 | wasm64 \ -@@ -1284,11 +1288,12 @@ - - # Decode manufacturer-specific aliases for certain operating systems. - --if test x$basic_os != x -+if test x"$basic_os" != x - then - - # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just - # set os. -+obj= - case $basic_os in - gnu/linux*) - kernel=linux -@@ -1488,10 +1493,16 @@ - os=eabi - ;; - *) -- os=elf -+ os= -+ obj=elf - ;; - esac - ;; -+ aout* | coff* | elf* | pe*) -+ # These are machine code file formats, not OSes -+ obj=$os -+ os= -+ ;; - *) - # No normalization, but not necessarily accepted, that comes below. - ;; -@@ -1510,12 +1521,15 @@ - # system, and we'll never get to this point. - - kernel= -+obj= - case $cpu-$vendor in - score-*) -- os=elf -+ os= -+ obj=elf - ;; - spu-*) -- os=elf -+ os= -+ obj=elf - ;; - *-acorn) - os=riscix1.2 -@@ -1525,28 +1539,35 @@ - os=gnu - ;; - arm*-semi) -- os=aout -+ os= -+ obj=aout - ;; - c4x-* | tic4x-*) -- os=coff -+ os= -+ obj=coff - ;; - c8051-*) -- os=elf -+ os= -+ obj=elf - ;; - clipper-intergraph) - os=clix - ;; - hexagon-*) -- os=elf -+ os= -+ obj=elf - ;; - tic54x-*) -- os=coff -+ os= -+ obj=coff - ;; - tic55x-*) -- os=coff -+ os= -+ obj=coff - ;; - tic6x-*) -- os=coff -+ os= -+ obj=coff - ;; - # This must come before the *-dec entry. - pdp10-*) -@@ -1568,19 +1589,24 @@ - os=sunos3 - ;; - m68*-cisco) -- os=aout -+ os= -+ obj=aout - ;; - mep-*) -- os=elf -+ os= -+ obj=elf - ;; - mips*-cisco) -- os=elf -+ os= -+ obj=elf - ;; -- mips*-*) -- os=elf -+ mips*-*|nanomips*-*) -+ os= -+ obj=elf - ;; - or32-*) -- os=coff -+ os= -+ obj=coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=sysv3 -@@ -1589,7 +1615,8 @@ - os=sunos4.1.1 - ;; - pru-*) -- os=elf -+ os= -+ obj=elf - ;; - *-be) - os=beos -@@ -1670,10 +1697,12 @@ - os=uxpv - ;; - *-rom68k) -- os=coff -+ os= -+ obj=coff - ;; - *-*bug) -- os=coff -+ os= -+ obj=coff - ;; - *-apple) - os=macos -@@ -1691,10 +1720,11 @@ - - fi - --# Now, validate our (potentially fixed-up) OS. -+# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). -+ - case $os in - # Sometimes we do "kernel-libc", so those need to count as OSes. -- musl* | newlib* | relibc* | uclibc*) -+ llvm* | musl* | newlib* | relibc* | uclibc*) - ;; - # Likewise for "kernel-abi" - eabi* | gnueabi*) -@@ -1702,6 +1732,9 @@ - # VxWorks passes extra cpu info in the 4th filed. - simlinux | simwindows | spe) - ;; -+ # See `case $cpu-$os` validation below -+ ghcjs) -+ ;; - # Now accept the basic system types. - # The portable systems comes first. - # Each alternative MUST end in a * to match a version number. -@@ -1719,11 +1752,11 @@ - | mirbsd* | netbsd* | dicos* | openedition* | ose* \ - | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ - | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ -- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ -- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ -+ | bosx* | nextstep* | cxux* | oabi* \ -+ | ptx* | ecoff* | winnt* | domain* | vsta* \ - | udi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* | serenity* \ -- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ -+ | cygwin* | msys* | moss* | proelf* | rtems* \ - | midipix* | mingw32* | mingw64* | mint* \ - | uxpv* | beos* | mpeix* | udk* | moxiebox* \ - | interix* | uwin* | mks* | rhapsody* | darwin* \ -@@ -1736,71 +1769,119 @@ +@@ -1736,7 +1736,7 @@ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ - | fiwix* | mlibc* | cos* | mbr* ) -+ | fiwix* | mlibc* | cos* | mbr* | ironclad* | macabi) ++ | fiwix* | mlibc* | cos* | mbr* | macabi ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) - # Don't forget version if it is 3.2v4 or newer. +@@ -1793,6 +1793,10 @@ ;; -+ # This refers to builds using the UEFI calling convention -+ # (which depends on the architecture) and PE file format. -+ # Note that this is both a different calling convention and -+ # different file format than that of GNU-EFI -+ # (x86_64-w64-mingw32). -+ uefi) -+ ;; - none) + *-eabi* | *-gnueabi*) ;; - kernel* | msvc* ) - # Restricted further below - ;; -+ '') -+ if test x"$obj" = x -+ then -+ echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 -+ fi -+ ;; - *) - echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 - exit 1 - ;; - esac - -+case $obj in -+ aout* | coff* | elf* | pe*) ++ ios*-simulator | tvos*-simulator | watchos*-simulator) + ;; -+ '') -+ # empty is fine -+ ;; -+ *) -+ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 -+ exit 1 -+ ;; -+esac -+ -+# Here we handle the constraint that a (synthetic) cpu and os are -+# valid only in combination with each other and nowhere else. -+case $cpu-$os in -+ # The "javascript-unknown-ghcjs" triple is used by GHC; we -+ # accept it here in order to tolerate that, but reject any -+ # variations. -+ javascript-ghcjs) -+ ;; -+ javascript-* | *-ghcjs) -+ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 -+ exit 1 -+ ;; -+esac -+ - # As a final step for OS-related things, validate the OS-kernel combination - # (given a valid OS), if there is a kernel. --case $kernel-$os in -- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ -- | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) -+case $kernel-$os-$obj in -+ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ -+ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ -+ | linux-relibc*- | linux-uclibc*- ) - ;; -- uclinux-uclibc* ) -+ uclinux-uclibc*- ) - ;; -- managarm-mlibc* | managarm-kernel* ) -+ managarm-mlibc*- | managarm-kernel*- ) - ;; -- windows*-gnu* | windows*-msvc*) -+ windows*-msvc*-) - ;; -- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) -+ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ -+ | -uclibc*- ) - # These are just libc implementations, not actual OSes, and thus - # require a kernel. - echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 - exit 1 - ;; -- -kernel* ) -+ -kernel*- ) - echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 - exit 1 - ;; -- *-kernel* ) -+ *-kernel*- ) - echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 - exit 1 - ;; -- *-msvc* ) -+ *-msvc*- ) - echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 - exit 1 - ;; -- kfreebsd*-gnu* | kopensolaris*-gnu*) -+ kfreebsd*-gnu*- | kopensolaris*-gnu*-) - ;; -- vxworks-simlinux | vxworks-simwindows | vxworks-spe) -+ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) - ;; -- nto-qnx*) -+ nto-qnx*-) - ;; -- os2-emx) -+ os2-emx-) - ;; -- *-eabi* | *-gnueabi*) -+ *-eabi*- | *-gnueabi*-) - ;; -- none-coff* | none-elf*) -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) -+ ;; -+ ios*-macabi- ) -+ ;; -+ none--*) ++ ios*-macabi) ++ ;; + none-coff* | none-elf*) # None (no kernel, i.e. freestanding / bare metal), -- # can be paired with an output format "OS" -+ # can be paired with an machine code file format - ;; -- -*) -+ -*-) - # Blank kernel with real OS is always fine. - ;; -- *-*) -+ --*) -+ # Blank kernel and OS with real machine code file format is always fine. -+ ;; -+ *-*-*) - echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 - exit 1 - ;; -@@ -1884,7 +1965,7 @@ - ;; - esac - --echo "$cpu-$vendor-${kernel:+$kernel-}$os" -+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" - exit - - # Local variables: + # can be paired with an output format "OS" From 84b0045705a70bb5a2742698d363aa7041a5ef42 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 9 Mar 2025 20:12:37 +0000 Subject: [PATCH 10/14] Revert the xz.patch --- patch/xz.patch | 2382 +----------------------------------------------- 1 file changed, 7 insertions(+), 2375 deletions(-) diff --git a/patch/xz.patch b/patch/xz.patch index aa695f1..c9da484 100644 --- a/patch/xz.patch +++ b/patch/xz.patch @@ -1,7 +1,7 @@ -diff -Naur xz-5.6.4-orig/build-aux/config.sub xz-5.6.4/build-aux/config.sub ---- xz-5.6.4-orig/build-aux/config.sub 2025-01-23 09:58:05 -+++ xz-5.6.4/build-aux/config.sub 2025-02-23 10:33:28 -@@ -1194,7 +1194,7 @@ +diff -ru xz-5.4.7-orig/build-aux/config.sub xz-5.4.7/build-aux/config.sub +--- xz-5.4.7-orig/build-aux/config.sub 2024-05-29 23:13:51 ++++ xz-5.4.7/build-aux/config.sub 2024-07-24 14:20:00 +@@ -1127,7 +1127,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; @@ -10,2380 +10,12 @@ diff -Naur xz-5.6.4-orig/build-aux/config.sub xz-5.6.4/build-aux/config.sub cpu=aarch64 ;; -@@ -2149,7 +2149,8 @@ - | xenix* \ - | xray* \ - | zephyr* \ -- | zvmoe* ) -+ | zvmoe* \ -+ | macabi ) - ;; - # This one is extra strict with allowed versions - sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -2248,6 +2249,8 @@ - rtmk-nova-) +@@ -1865,6 +1865,8 @@ + os2-emx-) ;; *-eabi*- | *-gnueabi*-) + ;; -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | ios*-macabi- ) ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), -diff -Naur xz-5.6.4-orig/build-aux/config.sub.orig xz-5.6.4/build-aux/config.sub.orig ---- xz-5.6.4-orig/build-aux/config.sub.orig 1970-01-01 01:00:00 -+++ xz-5.6.4/build-aux/config.sub.orig 2025-01-23 09:58:05 -@@ -0,0 +1,2354 @@ -+#! /bin/sh -+# Configuration validation subroutine script. -+# Copyright 1992-2024 Free Software Foundation, Inc. -+ -+# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale -+ -+timestamp='2024-05-27' -+ -+# This file is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation, either version 3 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, see . -+# -+# As a special exception to the GNU General Public License, if you -+# distribute this file as part of a program that contains a -+# configuration script generated by Autoconf, you may include it under -+# the same distribution terms that you use for the rest of that -+# program. This Exception is an additional permission under section 7 -+# of the GNU General Public License, version 3 ("GPLv3"). -+ -+ -+# Please send patches to . -+# -+# Configuration subroutine to validate and canonicalize a configuration type. -+# Supply the specified configuration type as an argument. -+# If it is invalid, we print an error message on stderr and exit with code 1. -+# Otherwise, we print the canonical config type on stdout and succeed. -+ -+# You can get the latest version of this script from: -+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub -+ -+# This file is supposed to be the same for all GNU packages -+# and recognize all the CPU types, system types and aliases -+# that are meaningful with *any* GNU software. -+# Each package is responsible for reporting which valid configurations -+# it does not support. The user should be able to distinguish -+# a failure to support a valid configuration from a meaningless -+# configuration. -+ -+# The goal of this file is to map all the various variations of a given -+# machine specification into a single specification in the form: -+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -+# or in some cases, the newer four-part form: -+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -+# It is wrong to echo any other type of specification. -+ -+# The "shellcheck disable" line above the timestamp inhibits complaints -+# about features and limitations of the classic Bourne shell that were -+# superseded or lifted in POSIX. However, this script identifies a wide -+# variety of pre-POSIX systems that do not have POSIX shells at all, and -+# even some reasonably current systems (Solaris 10 as case-in-point) still -+# have a pre-POSIX /bin/sh. -+ -+me=`echo "$0" | sed -e 's,.*/,,'` -+ -+usage="\ -+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS -+ -+Canonicalize a configuration name. -+ -+Options: -+ -h, --help print this help, then exit -+ -t, --time-stamp print date of last modification, then exit -+ -v, --version print version number, then exit -+ -+Report bugs and patches to ." -+ -+version="\ -+GNU config.sub ($timestamp) -+ -+Copyright 1992-2024 Free Software Foundation, Inc. -+ -+This is free software; see the source for copying conditions. There is NO -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -+ -+help=" -+Try '$me --help' for more information." -+ -+# Parse command line -+while test $# -gt 0 ; do -+ case $1 in -+ --time-stamp | --time* | -t ) -+ echo "$timestamp" ; exit ;; -+ --version | -v ) -+ echo "$version" ; exit ;; -+ --help | --h* | -h ) -+ echo "$usage"; exit ;; -+ -- ) # Stop option processing -+ shift; break ;; -+ - ) # Use stdin as input. -+ break ;; -+ -* ) -+ echo "$me: invalid option $1$help" >&2 -+ exit 1 ;; -+ -+ *local*) -+ # First pass through any local machine types. -+ echo "$1" -+ exit ;; -+ -+ * ) -+ break ;; -+ esac -+done -+ -+case $# in -+ 0) echo "$me: missing argument$help" >&2 -+ exit 1;; -+ 1) ;; -+ *) echo "$me: too many arguments$help" >&2 -+ exit 1;; -+esac -+ -+# Split fields of configuration type -+saved_IFS=$IFS -+IFS="-" read field1 field2 field3 field4 <&2 -+ exit 1 -+ ;; -+ *-*-*-*) -+ basic_machine=$field1-$field2 -+ basic_os=$field3-$field4 -+ ;; -+ *-*-*) -+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two -+ # parts -+ maybe_os=$field2-$field3 -+ case $maybe_os in -+ cloudabi*-eabi* \ -+ | kfreebsd*-gnu* \ -+ | knetbsd*-gnu* \ -+ | kopensolaris*-gnu* \ -+ | linux-* \ -+ | managarm-* \ -+ | netbsd*-eabi* \ -+ | netbsd*-gnu* \ -+ | nto-qnx* \ -+ | os2-emx* \ -+ | rtmk-nova* \ -+ | storm-chaos* \ -+ | uclinux-gnu* \ -+ | uclinux-uclibc* \ -+ | windows-* ) -+ basic_machine=$field1 -+ basic_os=$maybe_os -+ ;; -+ android-linux) -+ basic_machine=$field1-unknown -+ basic_os=linux-android -+ ;; -+ *) -+ basic_machine=$field1-$field2 -+ basic_os=$field3 -+ ;; -+ esac -+ ;; -+ *-*) -+ case $field1-$field2 in -+ # Shorthands that happen to contain a single dash -+ convex-c[12] | convex-c3[248]) -+ basic_machine=$field2-convex -+ basic_os= -+ ;; -+ decstation-3100) -+ basic_machine=mips-dec -+ basic_os= -+ ;; -+ *-*) -+ # Second component is usually, but not always the OS -+ case $field2 in -+ # Do not treat sunos as a manufacturer -+ sun*os*) -+ basic_machine=$field1 -+ basic_os=$field2 -+ ;; -+ # Manufacturers -+ 3100* \ -+ | 32* \ -+ | 3300* \ -+ | 3600* \ -+ | 7300* \ -+ | acorn \ -+ | altos* \ -+ | apollo \ -+ | apple \ -+ | atari \ -+ | att* \ -+ | axis \ -+ | be \ -+ | bull \ -+ | cbm \ -+ | ccur \ -+ | cisco \ -+ | commodore \ -+ | convergent* \ -+ | convex* \ -+ | cray \ -+ | crds \ -+ | dec* \ -+ | delta* \ -+ | dg \ -+ | digital \ -+ | dolphin \ -+ | encore* \ -+ | gould \ -+ | harris \ -+ | highlevel \ -+ | hitachi* \ -+ | hp \ -+ | ibm* \ -+ | intergraph \ -+ | isi* \ -+ | knuth \ -+ | masscomp \ -+ | microblaze* \ -+ | mips* \ -+ | motorola* \ -+ | ncr* \ -+ | news \ -+ | next \ -+ | ns \ -+ | oki \ -+ | omron* \ -+ | pc533* \ -+ | rebel \ -+ | rom68k \ -+ | rombug \ -+ | semi \ -+ | sequent* \ -+ | siemens \ -+ | sgi* \ -+ | siemens \ -+ | sim \ -+ | sni \ -+ | sony* \ -+ | stratus \ -+ | sun \ -+ | sun[234]* \ -+ | tektronix \ -+ | tti* \ -+ | ultra \ -+ | unicom* \ -+ | wec \ -+ | winbond \ -+ | wrs) -+ basic_machine=$field1-$field2 -+ basic_os= -+ ;; -+ zephyr*) -+ basic_machine=$field1-unknown -+ basic_os=$field2 -+ ;; -+ *) -+ basic_machine=$field1 -+ basic_os=$field2 -+ ;; -+ esac -+ ;; -+ esac -+ ;; -+ *) -+ # Convert single-component short-hands not valid as part of -+ # multi-component configurations. -+ case $field1 in -+ 386bsd) -+ basic_machine=i386-pc -+ basic_os=bsd -+ ;; -+ a29khif) -+ basic_machine=a29k-amd -+ basic_os=udi -+ ;; -+ adobe68k) -+ basic_machine=m68010-adobe -+ basic_os=scout -+ ;; -+ alliant) -+ basic_machine=fx80-alliant -+ basic_os= -+ ;; -+ altos | altos3068) -+ basic_machine=m68k-altos -+ basic_os= -+ ;; -+ am29k) -+ basic_machine=a29k-none -+ basic_os=bsd -+ ;; -+ amdahl) -+ basic_machine=580-amdahl -+ basic_os=sysv -+ ;; -+ amiga) -+ basic_machine=m68k-unknown -+ basic_os= -+ ;; -+ amigaos | amigados) -+ basic_machine=m68k-unknown -+ basic_os=amigaos -+ ;; -+ amigaunix | amix) -+ basic_machine=m68k-unknown -+ basic_os=sysv4 -+ ;; -+ apollo68) -+ basic_machine=m68k-apollo -+ basic_os=sysv -+ ;; -+ apollo68bsd) -+ basic_machine=m68k-apollo -+ basic_os=bsd -+ ;; -+ aros) -+ basic_machine=i386-pc -+ basic_os=aros -+ ;; -+ aux) -+ basic_machine=m68k-apple -+ basic_os=aux -+ ;; -+ balance) -+ basic_machine=ns32k-sequent -+ basic_os=dynix -+ ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ basic_os=linux -+ ;; -+ cegcc) -+ basic_machine=arm-unknown -+ basic_os=cegcc -+ ;; -+ cray) -+ basic_machine=j90-cray -+ basic_os=unicos -+ ;; -+ crds | unos) -+ basic_machine=m68k-crds -+ basic_os= -+ ;; -+ da30) -+ basic_machine=m68k-da30 -+ basic_os= -+ ;; -+ decstation | pmax | pmin | dec3100 | decstatn) -+ basic_machine=mips-dec -+ basic_os= -+ ;; -+ delta88) -+ basic_machine=m88k-motorola -+ basic_os=sysv3 -+ ;; -+ dicos) -+ basic_machine=i686-pc -+ basic_os=dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ basic_os=msdosdjgpp -+ ;; -+ ebmon29k) -+ basic_machine=a29k-amd -+ basic_os=ebmon -+ ;; -+ es1800 | OSE68k | ose68k | ose | OSE) -+ basic_machine=m68k-ericsson -+ basic_os=ose -+ ;; -+ gmicro) -+ basic_machine=tron-gmicro -+ basic_os=sysv -+ ;; -+ go32) -+ basic_machine=i386-pc -+ basic_os=go32 -+ ;; -+ h8300hms) -+ basic_machine=h8300-hitachi -+ basic_os=hms -+ ;; -+ h8300xray) -+ basic_machine=h8300-hitachi -+ basic_os=xray -+ ;; -+ h8500hms) -+ basic_machine=h8500-hitachi -+ basic_os=hms -+ ;; -+ harris) -+ basic_machine=m88k-harris -+ basic_os=sysv3 -+ ;; -+ hp300 | hp300hpux) -+ basic_machine=m68k-hp -+ basic_os=hpux -+ ;; -+ hp300bsd) -+ basic_machine=m68k-hp -+ basic_os=bsd -+ ;; -+ hppaosf) -+ basic_machine=hppa1.1-hp -+ basic_os=osf -+ ;; -+ hppro) -+ basic_machine=hppa1.1-hp -+ basic_os=proelf -+ ;; -+ i386mach) -+ basic_machine=i386-mach -+ basic_os=mach -+ ;; -+ isi68 | isi) -+ basic_machine=m68k-isi -+ basic_os=sysv -+ ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ basic_os=linux -+ ;; -+ magnum | m3230) -+ basic_machine=mips-mips -+ basic_os=sysv -+ ;; -+ merlin) -+ basic_machine=ns32k-utek -+ basic_os=sysv -+ ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ basic_os=mingw64 -+ ;; -+ mingw32) -+ basic_machine=i686-pc -+ basic_os=mingw32 -+ ;; -+ mingw32ce) -+ basic_machine=arm-unknown -+ basic_os=mingw32ce -+ ;; -+ monitor) -+ basic_machine=m68k-rom68k -+ basic_os=coff -+ ;; -+ morphos) -+ basic_machine=powerpc-unknown -+ basic_os=morphos -+ ;; -+ moxiebox) -+ basic_machine=moxie-unknown -+ basic_os=moxiebox -+ ;; -+ msdos) -+ basic_machine=i386-pc -+ basic_os=msdos -+ ;; -+ msys) -+ basic_machine=i686-pc -+ basic_os=msys -+ ;; -+ mvs) -+ basic_machine=i370-ibm -+ basic_os=mvs -+ ;; -+ nacl) -+ basic_machine=le32-unknown -+ basic_os=nacl -+ ;; -+ ncr3000) -+ basic_machine=i486-ncr -+ basic_os=sysv4 -+ ;; -+ netbsd386) -+ basic_machine=i386-pc -+ basic_os=netbsd -+ ;; -+ netwinder) -+ basic_machine=armv4l-rebel -+ basic_os=linux -+ ;; -+ news | news700 | news800 | news900) -+ basic_machine=m68k-sony -+ basic_os=newsos -+ ;; -+ news1000) -+ basic_machine=m68030-sony -+ basic_os=newsos -+ ;; -+ necv70) -+ basic_machine=v70-nec -+ basic_os=sysv -+ ;; -+ nh3000) -+ basic_machine=m68k-harris -+ basic_os=cxux -+ ;; -+ nh[45]000) -+ basic_machine=m88k-harris -+ basic_os=cxux -+ ;; -+ nindy960) -+ basic_machine=i960-intel -+ basic_os=nindy -+ ;; -+ mon960) -+ basic_machine=i960-intel -+ basic_os=mon960 -+ ;; -+ nonstopux) -+ basic_machine=mips-compaq -+ basic_os=nonstopux -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ basic_os=os400 -+ ;; -+ OSE68000 | ose68000) -+ basic_machine=m68000-ericsson -+ basic_os=ose -+ ;; -+ os68k) -+ basic_machine=m68k-none -+ basic_os=os68k -+ ;; -+ paragon) -+ basic_machine=i860-intel -+ basic_os=osf -+ ;; -+ parisc) -+ basic_machine=hppa-unknown -+ basic_os=linux -+ ;; -+ psp) -+ basic_machine=mipsallegrexel-sony -+ basic_os=psp -+ ;; -+ pw32) -+ basic_machine=i586-unknown -+ basic_os=pw32 -+ ;; -+ rdos | rdos64) -+ basic_machine=x86_64-pc -+ basic_os=rdos -+ ;; -+ rdos32) -+ basic_machine=i386-pc -+ basic_os=rdos -+ ;; -+ rom68k) -+ basic_machine=m68k-rom68k -+ basic_os=coff -+ ;; -+ sa29200) -+ basic_machine=a29k-amd -+ basic_os=udi -+ ;; -+ sei) -+ basic_machine=mips-sei -+ basic_os=seiux -+ ;; -+ sequent) -+ basic_machine=i386-sequent -+ basic_os= -+ ;; -+ sps7) -+ basic_machine=m68k-bull -+ basic_os=sysv2 -+ ;; -+ st2000) -+ basic_machine=m68k-tandem -+ basic_os= -+ ;; -+ stratus) -+ basic_machine=i860-stratus -+ basic_os=sysv4 -+ ;; -+ sun2) -+ basic_machine=m68000-sun -+ basic_os= -+ ;; -+ sun2os3) -+ basic_machine=m68000-sun -+ basic_os=sunos3 -+ ;; -+ sun2os4) -+ basic_machine=m68000-sun -+ basic_os=sunos4 -+ ;; -+ sun3) -+ basic_machine=m68k-sun -+ basic_os= -+ ;; -+ sun3os3) -+ basic_machine=m68k-sun -+ basic_os=sunos3 -+ ;; -+ sun3os4) -+ basic_machine=m68k-sun -+ basic_os=sunos4 -+ ;; -+ sun4) -+ basic_machine=sparc-sun -+ basic_os= -+ ;; -+ sun4os3) -+ basic_machine=sparc-sun -+ basic_os=sunos3 -+ ;; -+ sun4os4) -+ basic_machine=sparc-sun -+ basic_os=sunos4 -+ ;; -+ sun4sol2) -+ basic_machine=sparc-sun -+ basic_os=solaris2 -+ ;; -+ sun386 | sun386i | roadrunner) -+ basic_machine=i386-sun -+ basic_os= -+ ;; -+ sv1) -+ basic_machine=sv1-cray -+ basic_os=unicos -+ ;; -+ symmetry) -+ basic_machine=i386-sequent -+ basic_os=dynix -+ ;; -+ t3e) -+ basic_machine=alphaev5-cray -+ basic_os=unicos -+ ;; -+ t90) -+ basic_machine=t90-cray -+ basic_os=unicos -+ ;; -+ toad1) -+ basic_machine=pdp10-xkl -+ basic_os=tops20 -+ ;; -+ tpf) -+ basic_machine=s390x-ibm -+ basic_os=tpf -+ ;; -+ udi29k) -+ basic_machine=a29k-amd -+ basic_os=udi -+ ;; -+ ultra3) -+ basic_machine=a29k-nyu -+ basic_os=sym1 -+ ;; -+ v810 | necv810) -+ basic_machine=v810-nec -+ basic_os=none -+ ;; -+ vaxv) -+ basic_machine=vax-dec -+ basic_os=sysv -+ ;; -+ vms) -+ basic_machine=vax-dec -+ basic_os=vms -+ ;; -+ vsta) -+ basic_machine=i386-pc -+ basic_os=vsta -+ ;; -+ vxworks960) -+ basic_machine=i960-wrs -+ basic_os=vxworks -+ ;; -+ vxworks68) -+ basic_machine=m68k-wrs -+ basic_os=vxworks -+ ;; -+ vxworks29k) -+ basic_machine=a29k-wrs -+ basic_os=vxworks -+ ;; -+ xbox) -+ basic_machine=i686-pc -+ basic_os=mingw32 -+ ;; -+ ymp) -+ basic_machine=ymp-cray -+ basic_os=unicos -+ ;; -+ *) -+ basic_machine=$1 -+ basic_os= -+ ;; -+ esac -+ ;; -+esac -+ -+# Decode 1-component or ad-hoc basic machines -+case $basic_machine in -+ # Here we handle the default manufacturer of certain CPU types. It is in -+ # some cases the only manufacturer, in others, it is the most popular. -+ w89k) -+ cpu=hppa1.1 -+ vendor=winbond -+ ;; -+ op50n) -+ cpu=hppa1.1 -+ vendor=oki -+ ;; -+ op60c) -+ cpu=hppa1.1 -+ vendor=oki -+ ;; -+ ibm*) -+ cpu=i370 -+ vendor=ibm -+ ;; -+ orion105) -+ cpu=clipper -+ vendor=highlevel -+ ;; -+ mac | mpw | mac-mpw) -+ cpu=m68k -+ vendor=apple -+ ;; -+ pmac | pmac-mpw) -+ cpu=powerpc -+ vendor=apple -+ ;; -+ -+ # Recognize the various machine names and aliases which stand -+ # for a CPU type and a company and sometimes even an OS. -+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) -+ cpu=m68000 -+ vendor=att -+ ;; -+ 3b*) -+ cpu=we32k -+ vendor=att -+ ;; -+ bluegene*) -+ cpu=powerpc -+ vendor=ibm -+ basic_os=cnk -+ ;; -+ decsystem10* | dec10*) -+ cpu=pdp10 -+ vendor=dec -+ basic_os=tops10 -+ ;; -+ decsystem20* | dec20*) -+ cpu=pdp10 -+ vendor=dec -+ basic_os=tops20 -+ ;; -+ delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) -+ cpu=m68k -+ vendor=motorola -+ ;; -+ # This used to be dpx2*, but that gets the RS6000-based -+ # DPX/20 and the x86-based DPX/2-100 wrong. See -+ # https://oldskool.silicium.org/stations/bull_dpx20.htm -+ # https://www.feb-patrimoine.com/english/bull_dpx2.htm -+ # https://www.feb-patrimoine.com/english/unix_and_bull.htm -+ dpx2 | dpx2[23]00 | dpx2[23]xx) -+ cpu=m68k -+ vendor=bull -+ ;; -+ dpx2100 | dpx21xx) -+ cpu=i386 -+ vendor=bull -+ ;; -+ dpx20) -+ cpu=rs6000 -+ vendor=bull -+ ;; -+ encore | umax | mmax) -+ cpu=ns32k -+ vendor=encore -+ ;; -+ elxsi) -+ cpu=elxsi -+ vendor=elxsi -+ basic_os=${basic_os:-bsd} -+ ;; -+ fx2800) -+ cpu=i860 -+ vendor=alliant -+ ;; -+ genix) -+ cpu=ns32k -+ vendor=ns -+ ;; -+ h3050r* | hiux*) -+ cpu=hppa1.1 -+ vendor=hitachi -+ basic_os=hiuxwe2 -+ ;; -+ hp3k9[0-9][0-9] | hp9[0-9][0-9]) -+ cpu=hppa1.0 -+ vendor=hp -+ ;; -+ hp9k2[0-9][0-9] | hp9k31[0-9]) -+ cpu=m68000 -+ vendor=hp -+ ;; -+ hp9k3[2-9][0-9]) -+ cpu=m68k -+ vendor=hp -+ ;; -+ hp9k6[0-9][0-9] | hp6[0-9][0-9]) -+ cpu=hppa1.0 -+ vendor=hp -+ ;; -+ hp9k7[0-79][0-9] | hp7[0-79][0-9]) -+ cpu=hppa1.1 -+ vendor=hp -+ ;; -+ hp9k78[0-9] | hp78[0-9]) -+ # FIXME: really hppa2.0-hp -+ cpu=hppa1.1 -+ vendor=hp -+ ;; -+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) -+ # FIXME: really hppa2.0-hp -+ cpu=hppa1.1 -+ vendor=hp -+ ;; -+ hp9k8[0-9][13679] | hp8[0-9][13679]) -+ cpu=hppa1.1 -+ vendor=hp -+ ;; -+ hp9k8[0-9][0-9] | hp8[0-9][0-9]) -+ cpu=hppa1.0 -+ vendor=hp -+ ;; -+ i*86v32) -+ cpu=`echo "$1" | sed -e 's/86.*/86/'` -+ vendor=pc -+ basic_os=sysv32 -+ ;; -+ i*86v4*) -+ cpu=`echo "$1" | sed -e 's/86.*/86/'` -+ vendor=pc -+ basic_os=sysv4 -+ ;; -+ i*86v) -+ cpu=`echo "$1" | sed -e 's/86.*/86/'` -+ vendor=pc -+ basic_os=sysv -+ ;; -+ i*86sol2) -+ cpu=`echo "$1" | sed -e 's/86.*/86/'` -+ vendor=pc -+ basic_os=solaris2 -+ ;; -+ j90 | j90-cray) -+ cpu=j90 -+ vendor=cray -+ basic_os=${basic_os:-unicos} -+ ;; -+ iris | iris4d) -+ cpu=mips -+ vendor=sgi -+ case $basic_os in -+ irix*) -+ ;; -+ *) -+ basic_os=irix4 -+ ;; -+ esac -+ ;; -+ miniframe) -+ cpu=m68000 -+ vendor=convergent -+ ;; -+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) -+ cpu=m68k -+ vendor=atari -+ basic_os=mint -+ ;; -+ news-3600 | risc-news) -+ cpu=mips -+ vendor=sony -+ basic_os=newsos -+ ;; -+ next | m*-next) -+ cpu=m68k -+ vendor=next -+ ;; -+ np1) -+ cpu=np1 -+ vendor=gould -+ ;; -+ op50n-* | op60c-*) -+ cpu=hppa1.1 -+ vendor=oki -+ basic_os=proelf -+ ;; -+ pa-hitachi) -+ cpu=hppa1.1 -+ vendor=hitachi -+ basic_os=hiuxwe2 -+ ;; -+ pbd) -+ cpu=sparc -+ vendor=tti -+ ;; -+ pbb) -+ cpu=m68k -+ vendor=tti -+ ;; -+ pc532) -+ cpu=ns32k -+ vendor=pc532 -+ ;; -+ pn) -+ cpu=pn -+ vendor=gould -+ ;; -+ power) -+ cpu=power -+ vendor=ibm -+ ;; -+ ps2) -+ cpu=i386 -+ vendor=ibm -+ ;; -+ rm[46]00) -+ cpu=mips -+ vendor=siemens -+ ;; -+ rtpc | rtpc-*) -+ cpu=romp -+ vendor=ibm -+ ;; -+ sde) -+ cpu=mipsisa32 -+ vendor=sde -+ basic_os=${basic_os:-elf} -+ ;; -+ simso-wrs) -+ cpu=sparclite -+ vendor=wrs -+ basic_os=vxworks -+ ;; -+ tower | tower-32) -+ cpu=m68k -+ vendor=ncr -+ ;; -+ vpp*|vx|vx-*) -+ cpu=f301 -+ vendor=fujitsu -+ ;; -+ w65) -+ cpu=w65 -+ vendor=wdc -+ ;; -+ w89k-*) -+ cpu=hppa1.1 -+ vendor=winbond -+ basic_os=proelf -+ ;; -+ none) -+ cpu=none -+ vendor=none -+ ;; -+ leon|leon[3-9]) -+ cpu=sparc -+ vendor=$basic_machine -+ ;; -+ leon-*|leon[3-9]-*) -+ cpu=sparc -+ vendor=`echo "$basic_machine" | sed 's/-.*//'` -+ ;; -+ -+ *-*) -+ saved_IFS=$IFS -+ IFS="-" read cpu vendor <&2 -+ exit 1 -+ ;; -+ esac -+ ;; -+esac -+ -+# Here we canonicalize certain aliases for manufacturers. -+case $vendor in -+ digital*) -+ vendor=dec -+ ;; -+ commodore*) -+ vendor=cbm -+ ;; -+ *) -+ ;; -+esac -+ -+# Decode manufacturer-specific aliases for certain operating systems. -+ -+if test x"$basic_os" != x -+then -+ -+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just -+# set os. -+obj= -+case $basic_os in -+ gnu/linux*) -+ kernel=linux -+ os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` -+ ;; -+ os2-emx) -+ kernel=os2 -+ os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` -+ ;; -+ nto-qnx*) -+ kernel=nto -+ os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` -+ ;; -+ *-*) -+ saved_IFS=$IFS -+ IFS="-" read kernel os <&2 -+ fi -+ ;; -+ *) -+ echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 -+ exit 1 -+ ;; -+esac -+ -+case $obj in -+ aout* | coff* | elf* | pe*) -+ ;; -+ '') -+ # empty is fine -+ ;; -+ *) -+ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 -+ exit 1 -+ ;; -+esac -+ -+# Here we handle the constraint that a (synthetic) cpu and os are -+# valid only in combination with each other and nowhere else. -+case $cpu-$os in -+ # The "javascript-unknown-ghcjs" triple is used by GHC; we -+ # accept it here in order to tolerate that, but reject any -+ # variations. -+ javascript-ghcjs) -+ ;; -+ javascript-* | *-ghcjs) -+ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 -+ exit 1 -+ ;; -+esac -+ -+# As a final step for OS-related things, validate the OS-kernel combination -+# (given a valid OS), if there is a kernel. -+case $kernel-$os-$obj in -+ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ -+ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ -+ | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) -+ ;; -+ uclinux-uclibc*- | uclinux-gnu*- ) -+ ;; -+ managarm-mlibc*- | managarm-kernel*- ) -+ ;; -+ windows*-msvc*-) -+ ;; -+ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ -+ | -uclibc*- ) -+ # These are just libc implementations, not actual OSes, and thus -+ # require a kernel. -+ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 -+ exit 1 -+ ;; -+ -kernel*- ) -+ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 -+ exit 1 -+ ;; -+ *-kernel*- ) -+ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 -+ exit 1 -+ ;; -+ *-msvc*- ) -+ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 -+ exit 1 -+ ;; -+ kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) -+ ;; -+ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) -+ ;; -+ nto-qnx*-) -+ ;; -+ os2-emx-) -+ ;; -+ rtmk-nova-) -+ ;; -+ *-eabi*- | *-gnueabi*-) -+ ;; -+ none--*) -+ # None (no kernel, i.e. freestanding / bare metal), -+ # can be paired with an machine code file format -+ ;; -+ -*-) -+ # Blank kernel with real OS is always fine. -+ ;; -+ --*) -+ # Blank kernel and OS with real machine code file format is always fine. -+ ;; -+ *-*-*) -+ echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 -+ exit 1 -+ ;; -+esac -+ -+# Here we handle the case where we know the os, and the CPU type, but not the -+# manufacturer. We pick the logical manufacturer. -+case $vendor in -+ unknown) -+ case $cpu-$os in -+ *-riscix*) -+ vendor=acorn -+ ;; -+ *-sunos* | *-solaris*) -+ vendor=sun -+ ;; -+ *-cnk* | *-aix*) -+ vendor=ibm -+ ;; -+ *-beos*) -+ vendor=be -+ ;; -+ *-hpux*) -+ vendor=hp -+ ;; -+ *-mpeix*) -+ vendor=hp -+ ;; -+ *-hiux*) -+ vendor=hitachi -+ ;; -+ *-unos*) -+ vendor=crds -+ ;; -+ *-dgux*) -+ vendor=dg -+ ;; -+ *-luna*) -+ vendor=omron -+ ;; -+ *-genix*) -+ vendor=ns -+ ;; -+ *-clix*) -+ vendor=intergraph -+ ;; -+ *-mvs* | *-opened*) -+ vendor=ibm -+ ;; -+ *-os400*) -+ vendor=ibm -+ ;; -+ s390-* | s390x-*) -+ vendor=ibm -+ ;; -+ *-ptx*) -+ vendor=sequent -+ ;; -+ *-tpf*) -+ vendor=ibm -+ ;; -+ *-vxsim* | *-vxworks* | *-windiss*) -+ vendor=wrs -+ ;; -+ *-aux*) -+ vendor=apple -+ ;; -+ *-hms*) -+ vendor=hitachi -+ ;; -+ *-mpw* | *-macos*) -+ vendor=apple -+ ;; -+ *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) -+ vendor=atari -+ ;; -+ *-vos*) -+ vendor=stratus -+ ;; -+ esac -+ ;; -+esac -+ -+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" -+exit -+ -+# Local variables: -+# eval: (add-hook 'before-save-hook 'time-stamp) -+# time-stamp-start: "timestamp='" -+# time-stamp-format: "%:y-%02m-%02d" -+# time-stamp-end: "'" -+# End: From d5a17e5f2918c12e8cef399a863cadf01db52b30 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Sun, 9 Mar 2025 20:16:48 +0000 Subject: [PATCH 11/14] Minumal xz patch --- patch/xz.patch | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/patch/xz.patch b/patch/xz.patch index c9da484..9ad8854 100644 --- a/patch/xz.patch +++ b/patch/xz.patch @@ -1,7 +1,6 @@ -diff -ru xz-5.4.7-orig/build-aux/config.sub xz-5.4.7/build-aux/config.sub ---- xz-5.4.7-orig/build-aux/config.sub 2024-05-29 23:13:51 -+++ xz-5.4.7/build-aux/config.sub 2024-07-24 14:20:00 -@@ -1127,7 +1127,7 @@ +--- xz-5.6.4-orig/build-aux/config.sub 2025-01-23 09:58:05 ++++ xz-5.6.4/build-aux/config.sub 2025-03-09 20:15:18 +@@ -1194,7 +1194,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; @@ -10,12 +9,22 @@ diff -ru xz-5.4.7-orig/build-aux/config.sub xz-5.4.7/build-aux/config.sub cpu=aarch64 ;; -@@ -1865,6 +1865,8 @@ - os2-emx-) +@@ -2149,7 +2149,8 @@ + | xenix* \ + | xray* \ + | zephyr* \ +- | zvmoe* ) ++ | zvmoe* \ ++ | macabi ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) +@@ -2249,6 +2250,8 @@ ;; *-eabi*- | *-gnueabi*-) -+ ;; -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) ;; ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | ios*-macabi-) ++ ;; none--*) # None (no kernel, i.e. freestanding / bare metal), + # can be paired with an machine code file format From ba3c97bcc43867a136347281229b7c07f81d8534 Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Tue, 11 Mar 2025 20:03:44 +0000 Subject: [PATCH 12/14] Fix the xz and libffi patches --- patch/mpdecimal.patch | 14 ++++++-------- patch/xz.patch | 8 ++++---- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/patch/mpdecimal.patch b/patch/mpdecimal.patch index 200f252..df27d9c 100644 --- a/patch/mpdecimal.patch +++ b/patch/mpdecimal.patch @@ -1,6 +1,6 @@ -diff -Naur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub +diff -Naur --mi mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub --- mpdecimal-4.0.0-orig/config.sub 2024-01-10 00:25:00 -+++ mpdecimal-4.0.0/config.sub 2025-03-09 19:38:32 ++++ mpdecimal-4.0.0/config.sub 2025-03-11 19:35:50 @@ -1127,7 +1127,7 @@ xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` @@ -19,14 +19,12 @@ diff -Naur mpdecimal-4.0.0-orig/config.sub mpdecimal-4.0.0/config.sub ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -1793,6 +1793,10 @@ +@@ -1792,6 +1792,8 @@ + os2-emx) ;; *-eabi* | *-gnueabi*) - ;; -+ ios*-simulator | tvos*-simulator | watchos*-simulator) + ;; -+ ios*-macabi) -+ ;; ++ ios*-simulator | tvos*-simulator | watchos*-simulator | ios*-macabi) + ;; none-coff* | none-elf*) # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an output format "OS" diff --git a/patch/xz.patch b/patch/xz.patch index 9ad8854..af2523f 100644 --- a/patch/xz.patch +++ b/patch/xz.patch @@ -19,12 +19,12 @@ ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -2249,6 +2250,8 @@ +@@ -2248,6 +2249,8 @@ + rtmk-nova-) ;; *-eabi*- | *-gnueabi*-) - ;; -+ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | ios*-macabi-) + ;; ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- | ios*-macabi-) + ;; none--*) # None (no kernel, i.e. freestanding / bare metal), - # can be paired with an machine code file format From ad0f881cb58b1e97860443dec9cbfb87e86ceecd Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Wed, 12 Mar 2025 18:50:22 +0000 Subject: [PATCH 13/14] Update the libffi patch --- patch/libffi.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/patch/libffi.patch b/patch/libffi.patch index 0641a63..42ce62c 100644 --- a/patch/libffi.patch +++ b/patch/libffi.patch @@ -1,6 +1,6 @@ diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub --- libffi-3.4.7-orig/config.sub 2024-12-13 10:38:19 -+++ libffi-3.4.7/config.sub 2025-03-09 14:09:03 ++++ libffi-3.4.7/config.sub 2025-03-11 19:17:04 @@ -1768,7 +1768,7 @@ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ @@ -10,18 +10,17 @@ diff -Naur libffi-3.4.7-orig/config.sub libffi-3.4.7/config.sub ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) -@@ -1865,8 +1865,10 @@ +@@ -1864,8 +1864,8 @@ + ;; os2-emx-) ;; - ios*-simulator* | tvos*-simulator* | watchos*-simulator*) +- ios*-simulator* | tvos*-simulator* | watchos*-simulator*) - ;; ++ ios*-simulator* | tvos*-simulator* | watchos*-simulator* | ios*macabi*) + ;; *-eabi*- | *-gnueabi*-) -+ ;; -+ ios*-macabi- ) ;; none--*) - # None (no kernel, i.e. freestanding / bare metal), diff -Naur libffi-3.4.7-orig/generate-darwin-source-and-headers.py libffi-3.4.7/generate-darwin-source-and-headers.py --- libffi-3.4.7-orig/generate-darwin-source-and-headers.py 2024-06-01 18:42:02 +++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-03-09 14:29:38 From 1a7a51ce0b183e0b8fa5f01fe16684b9bc492bdb Mon Sep 17 00:00:00 2001 From: Andrew Savva Date: Wed, 12 Mar 2025 19:01:32 +0000 Subject: [PATCH 14/14] Add MacCatalyst to the workflow --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6182c63..7d1d993 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -16,7 +16,7 @@ jobs: BUILD_NUMBER: ${{ steps.build-vars.outputs.BUILD_NUMBER }} strategy: matrix: - target: [ "iOS", "tvOS", "watchOS" ] + target: [ "iOS", "tvOS", "watchOS", "MacCatalyst" ] steps: - name: Checkout uses: actions/checkout@v4.2.2