I'm using the command line tools bundled with Xcode14.3 (clang version 14.0.3), and attempting to use clang to cross compile code for the Arduino Due. Does anyone have insight on how to do this?
% clang++ main.cpp --target=arm-none-eabi -mcpu=cortex-m3
clang: error: unable to execute command: Executable "ld.lld" doesn't exist!
clang: error: ld.lld command failed with exit code 1 (use -v to see invocation)
% clang --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% clang --target=arm-none-eabi --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm-none-unknown-eabi
Thread model: posix
InstalledDir: /Applications/Xcode14.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
% clang++ --rtlib --target=arm-none-eabi -mcpu=cortex-m3 main.cpp
clang: error: unsupported runtime library '--target=arm-none-eabi' for platform 'darwin'