Skip to content

Document glibc to musl (and vice versa) cross-compilation #1266

@SeanTAllen

Description

@SeanTAllen

The cross-compilation documentation on the Pony website only covers glibc targets. There's no guide for cross-compiling between glibc and musl libc, which is useful for building statically-linked musl binaries on a glibc development machine (e.g., Ubuntu → Alpine-compatible static binary).

This should cover:

  • glibc host → musl target (the more common direction — build portable static binaries)
  • musl host → glibc target

The embedded LLD infrastructure already handles glibc/musl differences (dynamic linker paths, static linking flags like -z now and -lssp_nonshared, CRT object variants). The libc variant is determined by the --triple (e.g., x86_64-unknown-linux-musl vs x86_64-unknown-linux-gnu). This is a documentation gap, not a feature gap.

The documentation lives in the ponylang-website repo under docs/use/cross-compilation/. A new guide following the pattern of the existing ARM guides would cover it. The glibc-to-musl case is particularly interesting because it enables --static builds for single-binary deployment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions