Skip to content

Do not link statically against libc by default for musl targets #314

@joerg-krause

Description

@joerg-krause

By default libc is linked statically for musl targets except for the MIPS architecture: https://github.com/rust-lang/libc/blob/master/src/unix/mod.rs#L197-L200.

This is a problem for custom musl targets like ARM: https://github.com/joerg-krause/rust-cross-libs/blob/master/cfg/armv5te-unknown-linux-musl.json

By design, it's wrong to depend on the architecture if linking is done dynamically or statically. It should depend on the value of dynamic_linking: https://github.com/rust-lang/rust/blob/master/src/librustc_back/target/mod.rs#L450.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions