How can I compile a C project on macOS 11 (Intel) to work on Silicon?
My current build script is as simple as:
./configure
make
sudo make install
I've tried using the --host
and --target
flags with aarch64-apple-darwin
and arm-apple-darwin
without any luck.
The binary always defaults to x86_64
:
> file foobar.so
foobar.so: Mach-O 64-bit bundle x86_64
UPDATE:
It seems cc and gcc aren't found when --host
is specified.
checking for arm-apple-darwin-cc... no
checking for arm-apple-darwin-gcc... no