-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
use "gcc" instead of "cc" on *-sun-solaris systems when linking #70068
Conversation
On illumos and Solaris systems, Rust will use GCC as the link editor. Rust does this by invoking "cc", which on many (Linux and perhaps BSD) systems is generally either GCC or a GCC-compatible front-end. On historical Solaris systems, "cc" was often the Sun Studio compiler. This history casts a long shadow, and as such, even most modern illumos-based operating systems tend to install GCC as "gcc", without also making it available as "cc". We should invoke GCC as "gcc" on such systems to ensure we get the right compiler driver.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cramertj (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Wouldn't it be better to set proper linker name in the solaris spec files? |
It seems, at first glance, that making a change there would affect the link editor program name any time Solaris is the target. That is, whether cross-building an What I'm trying to do here is, instead, to change the behaviour of a Rust toolchain built for and running on an illumos host, for any target (including Linux) where the linker flavour is GCC by default -- but without changing what a Linux toolchain will do today, even when targetting illumos, because that already works correctly. I'm new to this part of the code, so please correct me if I'm mistaken! |
Hi folks! I've added the comment and tried to explain why I think this change belongs here and not in the spec files. It's obviously a busy and stressful time right now, but I wanted to check in and make sure there isn't anything else I should be doing with this change. Thank you all for looking thus far! |
Thanks for the update! Sorry for the delay getting this in. @bors r+ |
📌 Commit 1c191c3 has been approved by |
Rollup of 4 pull requests Successful merges: - rust-lang#65222 (Proposal: `fold_self` and `try_fold_self` for Iterators) - rust-lang#69887 (clean up E0404 explanation) - rust-lang#70068 (use "gcc" instead of "cc" on *-sun-solaris systems when linking) - rust-lang#70470 (Clean up E0463 explanation) Failed merges: r? @ghost
On illumos and Solaris systems, Rust will use GCC as the link editor.
Rust does this by invoking "cc", which on many (Linux and perhaps BSD)
systems is generally either GCC or a GCC-compatible front-end. On
historical Solaris systems, "cc" was often the Sun Studio compiler.
This history casts a long shadow, and as such, even most modern
illumos-based operating systems tend to install GCC as "gcc", without
also making it available as "cc".
We should invoke GCC as "gcc" on such systems to ensure we get the right
compiler driver.