diff --git a/BUILDING b/BUILDING index 0d56b4f64..222554fd7 100644 --- a/BUILDING +++ b/BUILDING @@ -562,6 +562,16 @@ as simple as specifying an `-arch` flag for the C compiler: ./configure --cross -m=tarm64osx CFLAGS="-arch arm64" CC_FOR_BUILD=cc make +To cross compile for iOS, provide an iOS SDK path and define the +`TARGET_OS_IPHONE` and `DISABLE_CURSES` macros: + + ./configure \ + --cross \ + -m=tarm64ios \ + CFLAGS="-arch arm64 -isysroot $(xcrun -sdk iphoneos --show-sdk-path) -DTARGET_OS_IPHONE -DDISABLE_CURSES -liconv" \ + CC_FOR_BUILD=clang + make + When additional configuration is needed for a *host* build (that is, when just `./configure --pb` would not be enough to build for the host platform), then more steps are needed. In that case, first build for diff --git a/boot/pb/equates.h b/boot/pb/equates.h index 540e02f24..d64e9e8f0 100644 --- a/boot/pb/equates.h +++ b/boot/pb/equates.h @@ -1,4 +1,4 @@ -/* equates.h for Chez Scheme Version 10.1.0-pre-release.1 */ +/* equates.h for Chez Scheme Version 10.1.0-pre-release.2 */ /* Do not edit this file. It is automatically generated and */ /* specifically tailored to the version of Chez Scheme named */ @@ -354,25 +354,27 @@ typedef uint64_t U64; #define long_bits 0x40 #define long_long_bits 0x40 #define machine_type 0x1 -#define machine_type_a6fb 0x23 -#define machine_type_a6le 0x21 -#define machine_type_a6nb 0x27 +#define machine_type_a6fb 0x25 +#define machine_type_a6ios 0x21 +#define machine_type_a6le 0x23 +#define machine_type_a6nb 0x29 #define machine_type_a6nt 0x1D -#define machine_type_a6ob 0x25 +#define machine_type_a6ob 0x27 #define machine_type_a6osx 0x1F -#define machine_type_a6s2 0x29 -#define machine_type_alist ((0 . any) (1 . pb) (2 . tpb) (3 . pb32l) (4 . tpb32l) (5 . pb32b) (6 . tpb32b) (7 . pb64l) (8 . tpb64l) (9 . pb64b) (10 . tpb64b) (11 . i3nt) (12 . ti3nt) (13 . i3osx) (14 . ti3osx) (15 . i3le) (16 . ti3le) (17 . i3fb) (18 . ti3fb) (19 . i3ob) (20 . ti3ob) (21 . i3nb) (22 . ti3nb) (23 . i3s2) (24 . ti3s2) (25 . i3qnx) (26 . ti3qnx) (27 . i3gnu) (28 . ti3gnu) (29 . a6nt) (30 . ta6nt) (31 . a6osx) (32 . ta6osx) (33 . a6le) (34 . ta6le) (35 . a6fb) (36 . ta6fb) (37 . a6ob) (38 . ta6ob) (39 . a6nb) (40 . ta6nb) (41 . a6s2) (42 . ta6s2) (43 . ppc32osx) (44 . tppc32osx) (45 . ppc32le) (46 . tppc32le) (47 . ppc32fb) (48 . tppc32fb) (49 . ppc32ob) (50 . tppc32ob) (51 . ppc32nb) (52 . tppc32nb) (53 . arm32le) (54 . tarm32le) (55 . arm32fb) (56 . tarm32fb) (57 . arm32ob) (58 . tarm32ob) (59 . arm32nb) (60 . tarm32nb) (61 . arm64nt) (62 . tarm64nt) (63 . arm64osx) (64 . tarm64osx) (65 . arm64le) (66 . tarm64le) (67 . arm64fb) (68 . tarm64fb) (69 . arm64ob) (70 . tarm64ob) (71 . arm64nb) (72 . tarm64nb) (73 . rv64le) (74 . trv64le) (75 . rv64fb) (76 . trv64fb) (77 . rv64ob) (78 . trv64ob) (79 . rv64nb) (80 . trv64nb) (81 . la64le) (82 . tla64le)) +#define machine_type_a6s2 0x2B +#define machine_type_alist ((0 . any) (1 . pb) (2 . tpb) (3 . pb32l) (4 . tpb32l) (5 . pb32b) (6 . tpb32b) (7 . pb64l) (8 . tpb64l) (9 . pb64b) (10 . tpb64b) (11 . i3nt) (12 . ti3nt) (13 . i3osx) (14 . ti3osx) (15 . i3le) (16 . ti3le) (17 . i3fb) (18 . ti3fb) (19 . i3ob) (20 . ti3ob) (21 . i3nb) (22 . ti3nb) (23 . i3s2) (24 . ti3s2) (25 . i3qnx) (26 . ti3qnx) (27 . i3gnu) (28 . ti3gnu) (29 . a6nt) (30 . ta6nt) (31 . a6osx) (32 . ta6osx) (33 . a6ios) (34 . ta6ios) (35 . a6le) (36 . ta6le) (37 . a6fb) (38 . ta6fb) (39 . a6ob) (40 . ta6ob) (41 . a6nb) (42 . ta6nb) (43 . a6s2) (44 . ta6s2) (45 . ppc32osx) (46 . tppc32osx) (47 . ppc32le) (48 . tppc32le) (49 . ppc32fb) (50 . tppc32fb) (51 . ppc32ob) (52 . tppc32ob) (53 . ppc32nb) (54 . tppc32nb) (55 . arm32le) (56 . tarm32le) (57 . arm32fb) (58 . tarm32fb) (59 . arm32ob) (60 . tarm32ob) (61 . arm32nb) (62 . tarm32nb) (63 . arm64nt) (64 . tarm64nt) (65 . arm64osx) (66 . tarm64osx) (67 . arm64ios) (68 . tarm64ios) (69 . arm64le) (70 . tarm64le) (71 . arm64fb) (72 . tarm64fb) (73 . arm64ob) (74 . tarm64ob) (75 . arm64nb) (76 . tarm64nb) (77 . rv64le) (78 . trv64le) (79 . rv64fb) (80 . trv64fb) (81 . rv64ob) (82 . trv64ob) (83 . rv64nb) (84 . trv64nb) (85 . la64le) (86 . tla64le)) #define machine_type_any 0x0 -#define machine_type_arm32fb 0x37 -#define machine_type_arm32le 0x35 -#define machine_type_arm32nb 0x3B -#define machine_type_arm32ob 0x39 -#define machine_type_arm64fb 0x43 -#define machine_type_arm64le 0x41 -#define machine_type_arm64nb 0x47 -#define machine_type_arm64nt 0x3D -#define machine_type_arm64ob 0x45 -#define machine_type_arm64osx 0x3F +#define machine_type_arm32fb 0x39 +#define machine_type_arm32le 0x37 +#define machine_type_arm32nb 0x3D +#define machine_type_arm32ob 0x3B +#define machine_type_arm64fb 0x47 +#define machine_type_arm64ios 0x43 +#define machine_type_arm64le 0x45 +#define machine_type_arm64nb 0x4B +#define machine_type_arm64nt 0x3F +#define machine_type_arm64ob 0x49 +#define machine_type_arm64osx 0x41 #define machine_type_i3fb 0x11 #define machine_type_i3gnu 0x1B #define machine_type_i3le 0xF @@ -382,40 +384,42 @@ typedef uint64_t U64; #define machine_type_i3osx 0xD #define machine_type_i3qnx 0x19 #define machine_type_i3s2 0x17 -#define machine_type_la64le 0x51 -#define machine_type_limit 0x53 +#define machine_type_la64le 0x55 +#define machine_type_limit 0x57 #define machine_type_name pb #define machine_type_pb 0x1 #define machine_type_pb32b 0x5 #define machine_type_pb32l 0x3 #define machine_type_pb64b 0x9 #define machine_type_pb64l 0x7 -#define machine_type_ppc32fb 0x2F -#define machine_type_ppc32le 0x2D -#define machine_type_ppc32nb 0x33 -#define machine_type_ppc32ob 0x31 -#define machine_type_ppc32osx 0x2B -#define machine_type_rv64fb 0x4B -#define machine_type_rv64le 0x49 -#define machine_type_rv64nb 0x4F -#define machine_type_rv64ob 0x4D -#define machine_type_ta6fb 0x24 -#define machine_type_ta6le 0x22 -#define machine_type_ta6nb 0x28 +#define machine_type_ppc32fb 0x31 +#define machine_type_ppc32le 0x2F +#define machine_type_ppc32nb 0x35 +#define machine_type_ppc32ob 0x33 +#define machine_type_ppc32osx 0x2D +#define machine_type_rv64fb 0x4F +#define machine_type_rv64le 0x4D +#define machine_type_rv64nb 0x53 +#define machine_type_rv64ob 0x51 +#define machine_type_ta6fb 0x26 +#define machine_type_ta6ios 0x22 +#define machine_type_ta6le 0x24 +#define machine_type_ta6nb 0x2A #define machine_type_ta6nt 0x1E -#define machine_type_ta6ob 0x26 +#define machine_type_ta6ob 0x28 #define machine_type_ta6osx 0x20 -#define machine_type_ta6s2 0x2A -#define machine_type_tarm32fb 0x38 -#define machine_type_tarm32le 0x36 -#define machine_type_tarm32nb 0x3C -#define machine_type_tarm32ob 0x3A -#define machine_type_tarm64fb 0x44 -#define machine_type_tarm64le 0x42 -#define machine_type_tarm64nb 0x48 -#define machine_type_tarm64nt 0x3E -#define machine_type_tarm64ob 0x46 -#define machine_type_tarm64osx 0x40 +#define machine_type_ta6s2 0x2C +#define machine_type_tarm32fb 0x3A +#define machine_type_tarm32le 0x38 +#define machine_type_tarm32nb 0x3E +#define machine_type_tarm32ob 0x3C +#define machine_type_tarm64fb 0x48 +#define machine_type_tarm64ios 0x44 +#define machine_type_tarm64le 0x46 +#define machine_type_tarm64nb 0x4C +#define machine_type_tarm64nt 0x40 +#define machine_type_tarm64ob 0x4A +#define machine_type_tarm64osx 0x42 #define machine_type_ti3fb 0x12 #define machine_type_ti3gnu 0x1C #define machine_type_ti3le 0x10 @@ -425,21 +429,21 @@ typedef uint64_t U64; #define machine_type_ti3osx 0xE #define machine_type_ti3qnx 0x1A #define machine_type_ti3s2 0x18 -#define machine_type_tla64le 0x52 +#define machine_type_tla64le 0x56 #define machine_type_tpb 0x2 #define machine_type_tpb32b 0x6 #define machine_type_tpb32l 0x4 #define machine_type_tpb64b 0xA #define machine_type_tpb64l 0x8 -#define machine_type_tppc32fb 0x30 -#define machine_type_tppc32le 0x2E -#define machine_type_tppc32nb 0x34 -#define machine_type_tppc32ob 0x32 -#define machine_type_tppc32osx 0x2C -#define machine_type_trv64fb 0x4C -#define machine_type_trv64le 0x4A -#define machine_type_trv64nb 0x50 -#define machine_type_trv64ob 0x4E +#define machine_type_tppc32fb 0x32 +#define machine_type_tppc32le 0x30 +#define machine_type_tppc32nb 0x36 +#define machine_type_tppc32ob 0x34 +#define machine_type_tppc32osx 0x2E +#define machine_type_trv64fb 0x50 +#define machine_type_trv64le 0x4E +#define machine_type_trv64nb 0x54 +#define machine_type_trv64ob 0x52 #define mask_any_stencil_vector 0x1F #define mask_bignum 0x1F #define mask_bignum_sign 0x20 @@ -1010,7 +1014,7 @@ typedef uint64_t U64; #define rtd_sealed 0x4 #define sbwp (ptr)0x4E #define scaled_shot_1_shot_flag -0x8 -#define scheme_version 0xA010001 +#define scheme_version 0xA010002 #define seginfo_generation_disp 0x1 #define seginfo_list_bits_disp 0x8 #define seginfo_space_disp 0x0 @@ -1550,7 +1554,7 @@ typedef uint64_t U64; #define VFASLHEADER_SINGLETONREF_COUNT(x) (*((uptr *)TO_VOIDP((uptr)(x)+104))) /* machine types */ -#define machine_type_names {"any", "pb", "tpb", "pb32l", "tpb32l", "pb32b", "tpb32b", "pb64l", "tpb64l", "pb64b", "tpb64b", "i3nt", "ti3nt", "i3osx", "ti3osx", "i3le", "ti3le", "i3fb", "ti3fb", "i3ob", "ti3ob", "i3nb", "ti3nb", "i3s2", "ti3s2", "i3qnx", "ti3qnx", "i3gnu", "ti3gnu", "a6nt", "ta6nt", "a6osx", "ta6osx", "a6le", "ta6le", "a6fb", "ta6fb", "a6ob", "ta6ob", "a6nb", "ta6nb", "a6s2", "ta6s2", "ppc32osx", "tppc32osx", "ppc32le", "tppc32le", "ppc32fb", "tppc32fb", "ppc32ob", "tppc32ob", "ppc32nb", "tppc32nb", "arm32le", "tarm32le", "arm32fb", "tarm32fb", "arm32ob", "tarm32ob", "arm32nb", "tarm32nb", "arm64nt", "tarm64nt", "arm64osx", "tarm64osx", "arm64le", "tarm64le", "arm64fb", "tarm64fb", "arm64ob", "tarm64ob", "arm64nb", "tarm64nb", "rv64le", "trv64le", "rv64fb", "trv64fb", "rv64ob", "trv64ob", "rv64nb", "trv64nb", "la64le", "tla64le"} +#define machine_type_names {"any", "pb", "tpb", "pb32l", "tpb32l", "pb32b", "tpb32b", "pb64l", "tpb64l", "pb64b", "tpb64b", "i3nt", "ti3nt", "i3osx", "ti3osx", "i3le", "ti3le", "i3fb", "ti3fb", "i3ob", "ti3ob", "i3nb", "ti3nb", "i3s2", "ti3s2", "i3qnx", "ti3qnx", "i3gnu", "ti3gnu", "a6nt", "ta6nt", "a6osx", "ta6osx", "a6ios", "ta6ios", "a6le", "ta6le", "a6fb", "ta6fb", "a6ob", "ta6ob", "a6nb", "ta6nb", "a6s2", "ta6s2", "ppc32osx", "tppc32osx", "ppc32le", "tppc32le", "ppc32fb", "tppc32fb", "ppc32ob", "tppc32ob", "ppc32nb", "tppc32nb", "arm32le", "tarm32le", "arm32fb", "tarm32fb", "arm32ob", "tarm32ob", "arm32nb", "tarm32nb", "arm64nt", "tarm64nt", "arm64osx", "tarm64osx", "arm64ios", "tarm64ios", "arm64le", "tarm64le", "arm64fb", "tarm64fb", "arm64ob", "tarm64ob", "arm64nb", "tarm64nb", "rv64le", "trv64le", "rv64fb", "trv64fb", "rv64ob", "trv64ob", "rv64nb", "trv64nb", "la64le", "tla64le"} /* allocation-space names */ #define alloc_space_names "new", "impure", "symbol", "port", "pure", "cont", "code", "p-tobj", "ip-rec", "ip-tobj", "closure", "im-impure", "cnt-pure", "cnt-impure", "weakpr", "emph", "ref-array", "data", "im-data", "empty" diff --git a/boot/pb/petite.boot b/boot/pb/petite.boot index 2181936c1..e0281c7cb 100644 Binary files a/boot/pb/petite.boot and b/boot/pb/petite.boot differ diff --git a/boot/pb/scheme.boot b/boot/pb/scheme.boot index 2e3050fad..259a5e120 100644 Binary files a/boot/pb/scheme.boot and b/boot/pb/scheme.boot differ diff --git a/boot/pb/scheme.h b/boot/pb/scheme.h index 0f0a731fd..8d70e4600 100644 --- a/boot/pb/scheme.h +++ b/boot/pb/scheme.h @@ -1,4 +1,4 @@ -/* scheme.h for Chez Scheme Version 10.1.0-pre-release.1 (pb) */ +/* scheme.h for Chez Scheme Version 10.1.0-pre-release.2 (pb) */ /* Do not edit this file. It is automatically generated and */ /* specifically tailored to the version of Chez Scheme named */ @@ -40,7 +40,7 @@ #endif /* Chez Scheme Version and machine type */ -#define VERSION "10.1.0-pre-release.1" +#define VERSION "10.1.0-pre-release.2" #define MACHINE_TYPE "pb" /* Integer typedefs */ diff --git a/examples/socket.ss b/examples/socket.ss index 6f3e7c04b..c982c2885 100644 --- a/examples/socket.ss +++ b/examples/socket.ss @@ -16,9 +16,13 @@ ;;; Requires from C library: ;;; close, dup, execl, fork, kill, listen, tmpnam, unlink (case (machine-type) - [(i3le ti3le a6le ta6le) (load-shared-object "libc.so.6")] - [(i3osx ti3osx a6osx ta6osx) (load-shared-object "libc.dylib")] - [else (load-shared-object "libc.so")]) + [(i3le ti3le a6le ta6le) + (load-shared-object "libc.so.6")] + [(i3osx ti3osx a6osx ta6osx arm64osx tarm64osx + a6ios ta6ios arm64ios tarm64ios) + (load-shared-object "libc.dylib")] + [else + (load-shared-object "libc.so")]) ;;; basic C-library stuff diff --git a/mats/bytevector.ms b/mats/bytevector.ms index 9069dd92c..13b10b155 100644 --- a/mats/bytevector.ms +++ b/mats/bytevector.ms @@ -34,8 +34,8 @@ (case (machine-type) [(i3le ti3le i3nt ti3nt a6nt ta6nt arm64nt tarm64nt i3ob ti3ob i3fb ti3fb i3nb ti3nb i3osx ti3osx a6le ta6le a6nb ta6nb - a6osx ta6osx a6fb ta6fb a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx - arm32le tarm32le arm64le tarm64le arm64osx tarm64osx rv64le trv64le + a6osx ta6osx a6ios ta6ios a6fb ta6fb a6ob ta6ob a6s2 ta6s2 i3s2 ti3s2 i3qnx ti3qnx + arm32le tarm32le arm64le tarm64le arm64osx tarm64osx arm64ios tarm64ios rv64le trv64le la64le tla64le) 'little] [(ppc32le tppc32le ppc32osx tppc32osx) 'big] diff --git a/mats/foreign.ms b/mats/foreign.ms index 5d7295b34..48c03c622 100644 --- a/mats/foreign.ms +++ b/mats/foreign.ms @@ -232,7 +232,8 @@ (error? (load-shared-object 3)) ) ] - [(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx) + [(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx + a6ios ta6ios arm64ios tarm64ios) (mat load-shared-object (file-exists? foreign1.so) (begin (load-shared-object foreign1.so) #t) @@ -3091,7 +3092,8 @@ '(load-shared-object "libc.so.7")] [(i3nt ti3nt a6nt ta6nt arm64nt tarm64nt) '(load-shared-object "msvcrt.dll")] - [(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx) + [(i3osx ti3osx a6osx ta6osx ppc32osx tppc32osx arm64osx tarm64osx + a6ios ta6ios arm64ios tarm64ios) '(load-shared-object "libc.dylib")] [(pb pb32l pb32b pb64l pb64b tpb tpb32l tpb32b tpb64l tpb64b) '(let ([try-load (lambda (path) diff --git a/mats/misc.ms b/mats/misc.ms index baf7665b9..90242005f 100644 --- a/mats/misc.ms +++ b/mats/misc.ms @@ -4685,7 +4685,7 @@ ) (unless (memq (machine-type) '(arm32le tarm32le arm64le tarm64le arm64osx tarm64osx ; timestamp counter tends to be priviledged on Arm - arm64nt tarm64nt + arm64ios tarm64ios arm64nt tarm64nt pb pb32l pb32b pb64l pb64b tpb tpb32l tpb32b tpb64l tpb64b)) ; doesn't increment for pb (mat $read-time-stamp-counter diff --git a/release_notes/release_notes.stex b/release_notes/release_notes.stex index 5421e6f60..fb674f762 100644 --- a/release_notes/release_notes.stex +++ b/release_notes/release_notes.stex @@ -46,7 +46,7 @@ procedure) is given in parentheses. \begin{itemizeC} \item x86, nonthreaded (i3osx) and threaded (ti3osx) \item x86\_64, nonthreaded (a6osx) and threaded (ta6osx) - \item AArch64 and iOS, nonthreaded (arm64osx) and threaded (tarm64osx) + \item AArch64, nonthreaded (arm64osx) and threaded (tarm64osx) \item PowerPC (32-bit) (ppc2osx) and threaded (tppc32osx) \end{itemizeC} \item Windows @@ -94,6 +94,9 @@ procedure) is given in parentheses. \end{itemizeC} \end{itemize} +{\thisversion} supports iOS natively to a limited extent. See +\href[static]{section:ios-machine-types}{this section} for details. + This document contains three sections describing significant (1) \href[static]{section:functionality}{functionality changes}, (2) \href[static]{section:bugfixes}{bugs fixed}, and @@ -113,6 +116,14 @@ Online versions of both books can be found at %----------------------------------------------------------------------------- \section{Functionality Changes}\label{section:functionality} + +\subsection{New machine types for iOS (10.1.0)}\label{section:ios-machine-types} + +The a6ios, ta6ios, arm64ios and tarm64ios machine types correspond to an +iOS compilation target. Native-code support for iOS is currently limited +to applications attached to a debugger as the platform does not allow +executable code to be loaded at runtime. + \subsection{Unicode 15.1 support (10.0.0)} The character sets, character classes, and word-breaking algorithms for character, string, diff --git a/s/arm64.ss b/s/arm64.ss index 2e24f1b4c..fe3e2de2c 100644 --- a/s/arm64.ss +++ b/s/arm64.ss @@ -2458,7 +2458,7 @@ (define alignment-via-lookahead (lambda (size types int* fp* fp-in-int? stack-align varargs-after k) (constant-case machine-type-name - [(arm64osx tarm64osx) + [(arm64osx tarm64osx arm64ios tarm64ios) (cond [(eqv? 0 varargs-after) (k (align 8 size) 0 0)] [else @@ -2533,7 +2533,7 @@ (define rest-of (lambda (regs n next-varargs-after) (constant-case machine-type-name - [(arm64osx tarm64osx) + [(arm64osx tarm64osx arm64ios tarm64ios) (cond [(eqv? next-varargs-after 0) ;; All the rest go on the stack diff --git a/s/cmacros.ss b/s/cmacros.ss index b1ef354da..f0b0e928a 100644 --- a/s/cmacros.ss +++ b/s/cmacros.ss @@ -357,7 +357,7 @@ ;; --------------------------------------------------------------------- ;; Version and machine types: -(define-constant scheme-version #x0a010001) +(define-constant scheme-version #x0a010002) (define-syntax define-machine-types (lambda (x) @@ -391,6 +391,7 @@ i3gnu ti3gnu a6nt ta6nt a6osx ta6osx + a6ios ta6ios a6le ta6le a6fb ta6fb a6ob ta6ob @@ -407,6 +408,7 @@ arm32nb tarm32nb arm64nt tarm64nt arm64osx tarm64osx + arm64ios tarm64ios arm64le tarm64le arm64fb tarm64fb arm64ob tarm64ob