Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDo not assume dynamic linking for musl/mips[el] targets #47663
Conversation
rust-highfive
assigned
aturon
Jan 22, 2018
This comment has been minimized.
This comment has been minimized.
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
malbarbo
referenced this pull request
Jan 22, 2018
Merged
Do not assume dynamic linking in musl/mips targets #908
This comment has been minimized.
This comment has been minimized.
|
Waiting rust-lang/libc#908 |
rust-highfive
assigned
alexcrichton
and unassigned
aturon
Jan 22, 2018
carols10cents
added
the
S-waiting-on-review
label
Jan 22, 2018
This comment has been minimized.
This comment has been minimized.
|
cc @japaric I think you originally added these targets, right? If so, do you have thoughts on this? |
This comment has been minimized.
This comment has been minimized.
|
I think it's a good idea to support both static linking and dynamic linking now that libunwind supports MIPS. Does this change the default linking mode, @malbarbo? Will mips-musl continue to link dynamically after this PR? I can't tell from the diff. I don't know if we want to change it so that musl = static by default everywhere; that may be less confusing (cf. PR description) but it would be a breaking change to change the default for this target as people could be relying on dynamic linking for their CI deployments, etc. |
This comment has been minimized.
This comment has been minimized.
|
Yes, this changes the default linking mode to static. It is a breaking change. But we some times do breaking changes, like when the android arm target was changed (Off course, it was included in the release notes). We need to evaluate if the breaking change here worth it. I think so, mainly because the others musl targets uses static linking by default. Anyway, we can revert to dynamic linking by default setting |
This comment has been minimized.
This comment has been minimized.
|
@malbarbo I wonder, could we perhaps land this without changing the defaults, and then consider that separately? Perhaps with a post to internals to try to catch users of the current target? |
This comment has been minimized.
This comment has been minimized.
|
Ok, I changed |
This comment has been minimized.
This comment has been minimized.
|
Ok! As a final question, could we use the more recent version of the unwinder for all targets? (AFAIK there's no technical reason to stick to an older version) |
This comment has been minimized.
This comment has been minimized.
|
Done. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
We should wait for rust-lang/libc#908 |
This comment has been minimized.
This comment has been minimized.
|
Ah ok! I thought that with the change in defaults this may no longer need the PR. I left a comment over there |
This comment has been minimized.
This comment has been minimized.
|
Add -fPIC. Without it, dynamic linking fails. |
This comment has been minimized.
This comment has been minimized.
|
Ok! Want to update libc here too? |
This comment has been minimized.
This comment has been minimized.
|
Update libc. |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
malbarbo
changed the title
[WIP] Do not assume dynamic linking for musl/mips[el] targets
Do not assume dynamic linking for musl/mips[el] targets
Jan 24, 2018
This comment has been minimized.
This comment has been minimized.
|
Remove WIP from title issue... Is this the reason bors is complaining? |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Apparently so! |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jan 27, 2018
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
|
kennytm
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Jan 27, 2018
This comment has been minimized.
This comment has been minimized.
|
I think we do not need the x86 patch anymore: llvm-mirror/libunwind@aa805e4 I will test it in my machine... |
This comment has been minimized.
This comment has been minimized.
|
i686 patch removed (it worked locally). |
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jan 28, 2018
This comment has been minimized.
This comment has been minimized.
|
|
malbarbo commentedJan 22, 2018
All musl targets except mips[el] assume static linking by default. This can be confusing.
When the musl/mips[el] targets was added, dynamic linking was chosen because of binary size concerns, and probably also because libunwind didn't supported mips.
Now that we have
crt-statictarget-feature (the user can choose dynamic link for musl targets), and libunwind 6.0 add support to mips, we do not need to assume dynamic linking.