I've been doing some work on cl-autowrap, and c2ffi. I have a MacBookPro18,4 that identifies itself as an "Apple M1 Max" chip in the system information. In terms of c2ffi, I got it building using homebrew llvm 18.1.5.
As I understand it, c2ffi get it's triples from llvm. And on this machine, LLVM/clang says I have:
/Library/Developer/CommandLineTools/usr/bin/clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Furthermore the 'arch' CLI says we are on "arm64".
I'm using SBCL 2.4.1 and inside the cl-autowrap code it identifies the feature #+arm64 as "aarch64", and #+darwin as "darwin9". Seems like these don't line up with modern OSX.
I'm thinking we should be extending the supported versions to cover "arm64-apple-darwin23.4.0" (or possibly just darwin?) and jury rig (local-arch) to return the appropriate string when on the appropriate machine.
Furthermore, the alloc.lisp needs a branch for #+arm64 to define 'size-t (as uint64 as per the c2ffi output) otherwise the c-malloc, etc, functions aren't defined.
I'm not 100% sure how wise just straight up changing #+arm64 from aarch64 -> arm64 is, given other platforms, but local architecture definitively is now called arm64!
Hi all,
I've been doing some work on cl-autowrap, and c2ffi. I have a MacBookPro18,4 that identifies itself as an "Apple M1 Max" chip in the system information. In terms of c2ffi, I got it building using homebrew llvm 18.1.5.
As I understand it, c2ffi get it's triples from llvm. And on this machine, LLVM/clang says I have:
And using the homebrew variant:
Furthermore the 'arch' CLI says we are on "arm64".
I'm using SBCL 2.4.1 and inside the cl-autowrap code it identifies the feature #+arm64 as "aarch64", and #+darwin as "darwin9". Seems like these don't line up with modern OSX.
I'm thinking we should be extending the supported versions to cover "arm64-apple-darwin23.4.0" (or possibly just darwin?) and jury rig (local-arch) to return the appropriate string when on the appropriate machine.
Furthermore, the alloc.lisp needs a branch for #+arm64 to define 'size-t (as uint64 as per the c2ffi output) otherwise the c-malloc, etc, functions aren't defined.
I'm not 100% sure how wise just straight up changing #+arm64 from aarch64 -> arm64 is, given other platforms, but local architecture definitively is now called arm64!