|
| 1 | +From bee7bb3310b356e99e3a0f75f23efbc97f1b0a24 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Russell Keith-Magee < [email protected]> |
| 3 | +Date: Mon, 26 Feb 2024 09:21:10 +0800 |
| 4 | +Subject: [PATCH] config.sub: Include support for arm64_32 and iOS/tvOS/watchOS |
| 5 | + simulators |
| 6 | + |
| 7 | + * Normalise the watchOS CPU architecture descriptor used by |
| 8 | + Apple (`arm64_32`). |
| 9 | + * Accept the `-simulator` suffix for descriptors for iOS, tvOS and |
| 10 | + watchOS. |
| 11 | + |
| 12 | +The following is the list of compiler triples generated by Apple's |
| 13 | +clang toolchains for iOS 12.0, tvOS 9.0, and watchOS 4.0: |
| 14 | + |
| 15 | + * `arm64-apple-ios12.0` |
| 16 | + * `x86_64-apple-ios12.0-simulator` |
| 17 | + * `arm64-apple-ios12.0-simulator` |
| 18 | + * `arm64-apple-tvos9.0` |
| 19 | + * `x86_64-apple-tvos9.0-simulator` |
| 20 | + * `arm64-apple-tvos9.0-simulator` |
| 21 | + * `arm64_32-apple-watchos4.0` |
| 22 | + * `arm64-apple-watchos4.0-simulator` |
| 23 | + |
| 24 | +The `-simulator` suffix is significant because iOS devices and iOS |
| 25 | +simulators have a different ABI. It is therefore essential that these |
| 26 | +can be differentiated in a compiler triple. |
| 27 | +--- |
| 28 | + config.sub | 5 ++++- |
| 29 | + 1 file changed, 4 insertions(+), 1 deletion(-) |
| 30 | + |
| 31 | +diff --git a/config.sub b/config.sub |
| 32 | +index 2c6a07a..1bb6a05 100755 |
| 33 | +--- a/config.sub |
| 34 | ++++ b/config.sub |
| 35 | +@@ -4,6 +4,7 @@ |
| 36 | + |
| 37 | + # shellcheck disable=SC2006,SC2268 # see below for rationale |
| 38 | + |
| 39 | ++# Patched 2024-02-03 to include support for arm64_32 and iOS/tvOS/watchOS simulators |
| 40 | + timestamp='2024-01-01' |
| 41 | + |
| 42 | + # This file is free software; you can redistribute it and/or modify it |
| 43 | +@@ -1127,7 +1128,7 @@ case $cpu-$vendor in |
| 44 | + xscale-* | xscalee[bl]-*) |
| 45 | + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
| 46 | + ;; |
| 47 | +- arm64-* | aarch64le-*) |
| 48 | ++ arm64-* | aarch64le-* | arm64_32-*) |
| 49 | + cpu=aarch64 |
| 50 | + ;; |
| 51 | + |
| 52 | +@@ -1866,6 +1867,8 @@ case $kernel-$os-$obj in |
| 53 | + ;; |
| 54 | + *-eabi*- | *-gnueabi*-) |
| 55 | + ;; |
| 56 | ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) |
| 57 | ++ ;; |
| 58 | + none--*) |
| 59 | + # None (no kernel, i.e. freestanding / bare metal), |
| 60 | + # can be paired with an machine code file format |
| 61 | +-- |
| 62 | +2.47.1 |
| 63 | + |
0 commit comments