Skip to content

Commit

Permalink
Add workaround for aarch64 Rust missing symbols (#1191)
Browse files Browse the repository at this point in the history
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:
rust-lang/compiler-builtins#201
  • Loading branch information
ebeasant-arm authored Jun 26, 2020
1 parent 2156b32 commit 56e2996
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 56e2996

Please sign in to comment.