tpoechtrager / cctools-port

Apple cctools port for Linux and *BSD
730 stars 168 forks source link

Support for aarch64-apple-ios-sim target #160

Open NOBLES5E opened 1 month ago

NOBLES5E commented 1 month ago

Hello cctools-port maintainers,

I'm trying to use cctools-port with the aarch64-apple-ios-sim target, which is used for the iOS Simulator running on ARM64 Macs (M1/M2). However, I'm encountering an error during configuration.

Current behavior: When running the configure script with aarch64-apple-ios-sim as the target, I get the following error:

$ ./configure --prefix=/opt/cctools --with-libtapi=/opt/cctools --with-libdispatch=/opt/cctools --with-libblocksruntime=/opt/cctools --target=aarch64-apple-ios-sim

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... Invalid configuration 'aarch64-apple-ios-sim': Kernel 'ios' not known to work with OS 'sim'.
configure: error: /bin/bash ./config.sub aarch64-apple-ios-sim failed

Questions:

  1. Does cctools-port currently support the aarch64-apple-ios-sim target?
  2. If not, are there plans to add support for this target in the future?
  3. Is there a workaround or alternative configuration I should use for building tools for the iOS Simulator on ARM64 Macs?

Thank you for your time and assistance!

Un1q32 commented 1 month ago

I think this is an issue with autoconf. The target only affects the names of the installed binaries, so I would recommend just not specifying a target and then renaming the binaries manually after.

NOBLES5E commented 1 month ago

Thanks for your quick response. It seems that if I skip the target, during compilation I got an ld: building for iOS, but linking in object file built for iOS Simulator error.

Un1q32 commented 1 month ago

Did you pass -target arm64-apple-ios-simulator to clang? ios-sim isn't a valid target according to clang.

NOBLES5E commented 1 month ago

It worked! Thanks for helping out! Feel free to close the issue if there's no plan to "fix" the autoconf

Un1q32 commented 1 month ago

It worked! Thanks for helping out! Feel free to close the issue if there's no plan to "fix" the autoconf

I can't close it, I'm not the repo owner, I just watch it.

Un1q32 commented 1 month ago

I think fixing autoconf would require submitting a patch to the autoconf mailing list adding support for ios-simulator targets.