Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to libgcc when statically linking musl #52091

Closed
wants to merge 1 commit into from

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Jul 6, 2018

On some architectures (e.g. aarch64) musl depends on some libgcc functions (__addtf3, __multf3, __subtf3) for long double arithmetic that it uses internally. Unfortunately we don't provide these functions in compiler-builtins, so we instead need to get them from libgcc.

Fixes:
#46651
rust-lang/compiler-builtins#201
rust-lang/compiler-builtins#217

@rust-highfive
Copy link
Collaborator

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 6, 2018
@Amanieu
Copy link
Member Author

Amanieu commented Jul 6, 2018

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned varkor Jul 6, 2018
@alexcrichton
Copy link
Member

As is I think this may be a breaking change because we don't ship libgcc.a with the musl target but we do otherwise support compiling for musl with just a linker. That means that on systems that don't have their own libgcc.a (or an incompatible one) compiling for musl will fail I think?

@Amanieu
Copy link
Member Author

Amanieu commented Jul 6, 2018

Alternatively, I think we could force libgcc to be statically linked into the libc crate when it is built. This would solve the distribution issue.

@Amanieu
Copy link
Member Author

Amanieu commented Jul 6, 2018

Closing in favor of rust-lang/libc#1034.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants