Repository navigation
Add a fallback for -static-pie missing CRT objects - #164451
Merged
Merged
Conversation
Collaborator
|
r? @camelid rustbot has assigned @camelid. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
We already have a fallback when the linker doesn't support `-static-pie` to use plain `-static` instead. However, it is also possible that the linker understands that option, but the C library doesn't have the necessary CRT objects. For example, `gcc` has known this option for a long time, but `glibc` doesn't support it for `powerpc` targets at all. We can detect this case in the link output for `-static` fallback too.
cuviper
force-pushed
the
static-pie-fallback
branch
from
October 17, 2026 01:32
8cac682 to
4332bd9
Compare
wesleywiser
approved these changes
Oct 19, 2026
Member
|
@bors r+ rollup |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
…uwer Rollup of 6 pull requests Successful merges: - #163436 (Stabilize `-Zembed-metadata`) - #164586 (Miri can now handle the actual apple thread parking implementation) - #164451 (Add a fallback for `-static-pie` missing CRT objects) - #164539 (Remove `rest` in `LintCheck`) - #164576 (linux thread_atexit: fix use of __dso_handle) - #164587 (tests: drop trailing comma on a couple of checks)
rust-bors Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
Rollup merge of #164451 - cuviper:static-pie-fallback, r=wesleywiser Add a fallback for `-static-pie` missing CRT objects We already have a fallback when the linker doesn't support `-static-pie` to use plain `-static` instead. However, it is also possible that the linker understands that option, but the C library doesn't have the necessary CRT objects. For example, `gcc` has known this option for a long time, but `glibc` doesn't support it for `powerpc` targets at all. We can detect this case in the link output for `-static` fallback too. Fixes #164448
Collaborator
|
beta backport approved as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels are handled by them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We already have a fallback when the linker doesn't support
-static-pieto use plain
-staticinstead. However, it is also possible that thelinker understands that option, but the C library doesn't have the
necessary CRT objects. For example,
gcchas known this option for along time, but
glibcdoesn't support it forpowerpctargets at all.We can detect this case in the link output for
-staticfallback too.Fixes #164448