diff --git a/doc/BUILD.md b/doc/BUILD.md index f9e42fd..e30e5f1 100644 --- a/doc/BUILD.md +++ b/doc/BUILD.md @@ -25,6 +25,29 @@ Install the appropriate target: rustup target add arm-unknown-linux-gnueabihf ``` +#### Notes for MacOS + +Toolchain for Apple Silicon Macs (M1/M2) native build [messense/homebrew-macos-cross-toolchains](https://github.com/messense/homebrew-macos-cross-toolchains). Direct download link for [v11.2.0](https://github.com/messense/homebrew-macos-cross-toolchains/releases/download/v11.2.0/arm-unknown-linux-gnueabihf-aarch64-darwin.tar.gz). Newer versions may not work due different glibc versions. I have success with 11.2.0. + +For Catalina and later versions, sign the binaries to (hopefully) keep MacOS from blocking execution. + +```sh +cd /full/path/to/extracted/toolchain/ +find ./ -type f -perm +111 | xargs -n1 sudo codesign --force --deep --sign - +``` + +Create the following symlinks to compensate for a different naming scheme. + +```sh +cd /full/path/to/extracted/toolchain/bin +ln -s arm-unknown-linux-gnueabihf-gcc arm-linux-gnueabihf-gcc +ln -s arm-unknown-linux-gnueabihf-ar arm-linux-gnueabihf-ar +ln -s arm-unknown-linux-gnueabihf-strip arm-linux-gnueabihf-strip +``` + +Make the "bin" folder avalilable to your `$PATH` + + ### Build Phase ```sh