|
| 1 | +From 7a7c6fc48512405ede8b2db440b702e866364b00 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 | 6 ++++-- |
| 29 | + 1 file changed, 4 insertions(+), 2 deletions(-) |
| 30 | + |
| 31 | +diff --git a/config.sub b/config.sub |
| 32 | +index 4aaae46..335706d 100755 |
| 33 | +--- a/config.sub |
| 34 | ++++ b/config.sub |
| 35 | +@@ -4,7 +4,7 @@ |
| 36 | + |
| 37 | + # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale |
| 38 | + |
| 39 | +-timestamp='2024-05-27' |
| 40 | ++timestamp='2025-01-06' |
| 41 | + |
| 42 | + # This file is free software; you can redistribute it and/or modify it |
| 43 | + # under the terms of the GNU General Public License as published by |
| 44 | +@@ -1194,7 +1194,7 @@ case $cpu-$vendor in |
| 45 | + xscale-* | xscalee[bl]-*) |
| 46 | + cpu=`echo "$cpu" | sed 's/^xscale/arm/'` |
| 47 | + ;; |
| 48 | +- arm64-* | aarch64le-*) |
| 49 | ++ arm64-* | aarch64le-* | arm64_32-*) |
| 50 | + cpu=aarch64 |
| 51 | + ;; |
| 52 | + |
| 53 | +@@ -2249,6 +2249,8 @@ case $kernel-$os-$obj in |
| 54 | + ;; |
| 55 | + *-eabi*- | *-gnueabi*-) |
| 56 | + ;; |
| 57 | ++ ios*-simulator- | tvos*-simulator- | watchos*-simulator- ) |
| 58 | ++ ;; |
| 59 | + none--*) |
| 60 | + # None (no kernel, i.e. freestanding / bare metal), |
| 61 | + # can be paired with an machine code file format |
| 62 | +-- |
| 63 | +2.47.1 |
| 64 | + |
0 commit comments