-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Linking with gold does not search /usr/local/lib #30784
Comments
Like I said on the on the PR, this seems to be a distro/user bug, since it would affect everything using gold, not just rustc. |
How it can be a distro bug I'm not sure, if that's just the way that gold works. Does any distro actually install gold as the default linker ( By the way, since there usually is this mechanism, why not let that extend to Rust as well, and let the user choose by whatever is |
The title says |
@rprichard updated the op. Thanks. |
This reverts commit 34dc0e0. cc #30783 #30784 #29974 r? @alexcrichton
Removing nomination/regression tags but leaving open as to why we reverted gold |
If the implication is that this was being left open only in the event that gold was made rustc's default linker someday, at this point I think it's unlikely that gold would be chosen over something like LLD. To that end I'd suggest this can be closed. |
I agree that this doesn't seem particularly useful to keep open - this is just linker behavior, and rustc doesn't even invoke/care about linker search paths itself for the most part. |
If it thinks it can rustc will link with the gold linker. Unfortunately ld.bfd and ld.gold do not search the same paths for libraries. The bfd linker looks in the runtime linker path, while gold does not. This creates a very confusing difference in behavior.
Original report.
The text was updated successfully, but these errors were encountered: