Closed joshuataylor closed 3 months ago
Thank you, that's very nifty!
Hope the lunch was good, too. =)
I don't think this works if you're running 14.2 ... because you get the following error instead
'/opt/homebrew/opt/libfaketime/lib/faketime/libfaketime.1.dylib' (mach-o file, but is an incompatible architecture (have 'arm64e', need 'arm64'))
$ sw_vers
ProductName: macOS
ProductVersion: 14.2.1
BuildVersion: 23C71
Darwin Mac-Studio.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000 arm64
I think you'll need to compile this yourself, and also that homebrew will need to have versions for arm64, I'm not sure if they cross compile or something, but the .rb file would probably need to be updated.
Fixes #334
This pull requests adds support for MacOS ARM64, by adding
-target
to the CFLAGS/LDFLAGS.Without this, the user will receieve the following error:
The trick seems to be adding
-target arm64e-apple-macos14.4
toCFLAGS
andLIB_LDFLAGS
.So 14.4 is the version of MacOS I'm on:
Showing the version:
Checking if the user is on arm64:
So we can just check in the Makefile.OSX if the user is on ARM64, then just add the flag.
You can test this yourself without this patch by appending the
CFLAGS
/LIB_LDFLAGS
environment variables:Happy for this PR to be altered as you see fit, this issue poked something in my brain and I was curious how to fix it, fun way to spend a lunch :-).