我该如何在macOS 11(Intel)上编译C项目以在Silicon上运行?
我当前的构建脚本非常简单:
./configure
make
sudo make install
我已经尝试使用--host
和--target
标志与aarch64-apple-darwin
和arm-apple-darwin
,但没有成功。
二进制文件始终默认为x86_64
:
> file foobar.so
foobar.so: Mach-O 64-bit bundle x86_64
更新:
当指定--host
时,似乎找不到cc和gcc。
checking for arm-apple-darwin-cc... no
checking for arm-apple-darwin-gcc... no
-target arm64-apple-macos11
。请注意,目标参数前面只有一个破折号,而不是两个。 - selbie