diff --git a/synit-pid1/Cross.toml b/synit-pid1/Cross.toml new file mode 100644 index 0000000..86caa02 --- /dev/null +++ b/synit-pid1/Cross.toml @@ -0,0 +1,6 @@ +[build.env] +# Both of these are needed to workaround https://github.com/rust-embedded/cross/issues/598 +passthrough = [ + "RUSTFLAGS", + "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS", +] diff --git a/synit-pid1/Makefile b/synit-pid1/Makefile index 47bff74..9c11a8a 100644 --- a/synit-pid1/Makefile +++ b/synit-pid1/Makefile @@ -6,7 +6,11 @@ arm-binary: arm-binary-release arm-binary-release: cross build --target=armv7-unknown-linux-musleabihf --release --all-targets +# Hack to workaround https://github.com/rust-embedded/cross/issues/598 +HACK_WORKAROUND_ISSUE_598=CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C link-arg=/usr/local/aarch64-linux-musl/lib/libc.a" + aarch64-binary: aarch64-binary-release aarch64-binary-release: - cross build --target=aarch64-unknown-linux-musl --release --all-targets + $(HACK_WORKAROUND_ISSUE_598) \ + cross build --target=aarch64-unknown-linux-musl --release --all-targets