Add workaround for aarch64 Rust missing symbols
When building for aarch64, cross or native,
linking with musl will fail due to missing symbols.
This change only affects Rust code targetting:
- aarch64-unknown-linux-musl
Workaround for:
@@ -15,3 +15,8 @@ rustflags = ["-C", "link-args=-Xlinker --build-id=none"]
#
# See https://linux.die.net/man/1/ld (--build-id flag).
rustflags = ["-C", "link-args=-Xlinker --build-id=none"]
+
+# Workaround for 'unable to find __addtf3, __multf3 and __subtf3'
+# Related issue: https://github.com/rust-lang/compiler-builtins/issues/201
+[target.aarch64-unknown-linux-musl]
+rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]
