|
| 1 | +diff -ur libffi-3.4.7 2/config.sub libffi-3.4.7/config.sub |
| 2 | +--- libffi-3.4.7 2/config.sub 2024-12-13 04:38:19 |
| 3 | ++++ libffi-3.4.7/config.sub 2025-04-12 17:44:40 |
| 4 | +@@ -1742,7 +1742,7 @@ |
| 5 | + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ |
| 6 | + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ |
| 7 | + | hiux* | abug | nacl* | netware* | windows* \ |
| 8 | +- | os9* | macos* | osx* | ios* | tvos* | watchos* \ |
| 9 | ++ | os9* | macos* | osx* | ios* | tvos* | watchos* | xros* \ |
| 10 | + | mpw* | magic* | mmixware* | mon960* | lnews* \ |
| 11 | + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ |
| 12 | + | aos* | aros* | cloudabi* | sortix* | twizzler* \ |
| 13 | +@@ -1864,7 +1864,7 @@ |
| 14 | + ;; |
| 15 | + os2-emx-) |
| 16 | + ;; |
| 17 | +- ios*-simulator* | tvos*-simulator* | watchos*-simulator*) |
| 18 | ++ ios*-simulator* | tvos*-simulator* | watchos*-simulator* | xros*-simulator*) |
| 19 | + ;; |
| 20 | + *-eabi*- | *-gnueabi*-) |
| 21 | + ;; |
| 22 | +diff -ur libffi-3.4.7 2/generate-darwin-source-and-headers.py libffi-3.4.7/generate-darwin-source-and-headers.py |
| 23 | +--- libffi-3.4.7 2/generate-darwin-source-and-headers.py 2024-06-01 12:42:02 |
| 24 | ++++ libffi-3.4.7/generate-darwin-source-and-headers.py 2025-04-12 18:02:51 |
| 25 | +@@ -152,8 +152,22 @@ |
| 26 | + sdk = 'watchos' |
| 27 | + arch = 'arm64_32' |
| 28 | + version_min = '-mwatchos-version-min=4.0' |
| 29 | ++ |
| 30 | ++class xros_simulator_arm64_platform(arm64_platform): |
| 31 | ++ target = 'arm64-apple-xros-simulator' |
| 32 | ++ directory = 'darwin_xros' |
| 33 | ++ sdk = 'xrsimulator' |
| 34 | ++ version_min = '' |
| 35 | + |
| 36 | + |
| 37 | ++class xros_device_arm64_platform(arm64_platform): |
| 38 | ++ target = 'arm64-apple-xros' |
| 39 | ++ directory = 'darwin_xros' |
| 40 | ++ sdk = 'xros' |
| 41 | ++ arch = 'arm64' |
| 42 | ++ version_min = '' |
| 43 | ++ |
| 44 | ++ |
| 45 | + def mkdir_p(path): |
| 46 | + try: |
| 47 | + os.makedirs(path) |
| 48 | +@@ -243,6 +257,7 @@ |
| 49 | + generate_ios=True, |
| 50 | + generate_tvos=True, |
| 51 | + generate_watchos=True, |
| 52 | ++ generate_xros=True |
| 53 | + ): |
| 54 | + copy_files('src', 'darwin_common/src', pattern='*.c') |
| 55 | + copy_files('include', 'darwin_common/include', pattern='*.h') |
| 56 | +@@ -266,6 +281,9 @@ |
| 57 | + copy_src_platform_files(watchos_simulator_arm64_platform) |
| 58 | + copy_src_platform_files(watchos_device_armv7k_platform) |
| 59 | + copy_src_platform_files(watchos_device_arm64_32_platform) |
| 60 | ++ if generate_xros: |
| 61 | ++ copy_src_platform_files(xros_simulator_arm64_platform) |
| 62 | ++ copy_src_platform_files(xros_device_arm64_platform) |
| 63 | + |
| 64 | + platform_headers = collections.defaultdict(set) |
| 65 | + |
| 66 | +@@ -288,6 +306,9 @@ |
| 67 | + build_target(watchos_simulator_arm64_platform, platform_headers) |
| 68 | + build_target(watchos_device_armv7k_platform, platform_headers) |
| 69 | + build_target(watchos_device_arm64_32_platform, platform_headers) |
| 70 | ++ if generate_xros: |
| 71 | ++ build_target(xros_simulator_arm64_platform, platform_headers) |
| 72 | ++ build_target(xros_device_arm64_platform, platform_headers) |
| 73 | + |
| 74 | + mkdir_p('darwin_common/include') |
| 75 | + for header_name, tag_tuples in platform_headers.items(): |
| 76 | +@@ -302,11 +323,13 @@ |
| 77 | + parser.add_argument('--only-osx', action='store_true', default=False) |
| 78 | + parser.add_argument('--only-tvos', action='store_true', default=False) |
| 79 | + parser.add_argument('--only-watchos', action='store_true', default=False) |
| 80 | ++ parser.add_argument('--only-xros', action='store_true', default=False) |
| 81 | + args = parser.parse_args() |
| 82 | + |
| 83 | + generate_source_and_headers( |
| 84 | +- generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos, |
| 85 | +- generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos, |
| 86 | +- generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos, |
| 87 | +- generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos, |
| 88 | ++ generate_osx=not args.only_ios and not args.only_tvos and not args.only_watchos and not args.only_xros, |
| 89 | ++ generate_ios=not args.only_osx and not args.only_tvos and not args.only_watchos and not args.only_xros, |
| 90 | ++ generate_tvos=not args.only_ios and not args.only_osx and not args.only_watchos and not args.only_xros, |
| 91 | ++ generate_watchos=not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_xros, |
| 92 | ++ generate_xros=not args.only_ios and not args.only_osx and not args.only_tvos and not args.only_watchos, |
| 93 | + ) |
| 94 | + |
0 commit comments