Skip to content

static-pie for musl target (remove crt1.o) #53968

Description

@aep

rustc explicitly adds crt1 before passing to the linker, which breaks musl-cross.
for static-pie we need to use rcrt1 instead.

Also i think crt1.o is actually wrong, since that target is supposed to support both dyn and static.

base.pre_link_objects_exe_crt.push("crt1.o".to_string());

any chance we can at least have a rustc arg that removes the crt? (like -nostartfiles essentially)

or a blank target that lets the user configure the rest of the target via commandline.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesE-help-wantedCall for participation: Help is requested to fix this issue.O-muslTarget: The musl libcT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions