This is a continuation of my thoughts on #792 (comment)
Alire has knowledge of gettingos
(linux
, windows
, macos
, freebsd
, etc), distribution
(though I don't see alpine
yet as an option), even host-arch
(e.g. x86-64
) but while Alire is able to be built with musl (such as on alpine) there's no easy way of detecting that from what I can see.
While most distros use glibc, it looks like quite a few are using musl now. I think it's worth adding a libc-variant
(or even just libc
) parameter (that defaults to being glibc
?) or similar that's passed to alire or detected on build. Maybe then gprbuild's toml will look something like:
[origin."case(os)".linux."case(libc-variant)".glibc."case(host-arch)".x86-64]
url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-linux-22.0.0-1.tar.gz"
hashes = ["sha256:24dfc1b54655edd4f85589e7e7dbd0bee24d087f25d5b0f13d3224fe7acf85b8"]
[origin."case(os)".linux."case(libc-variant)".musl."case(host-arch)".x86-64]
url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-linux-alpine-22.0.0-1.tar.gz"
hashes = ["sha256:hashgoeshere"]
# Would this help for backwards-compatibility? We default to glibc.
[origin."case(os)".linux."case(host-arch)".x86-64]
url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-22.0.0-1/gprbuild-x86_64-linux-22.0.0-1.tar.gz"
hashes = ["sha256:24dfc1b54655edd4f85589e7e7dbd0bee24d087f25d5b0f13d3224fe7acf85b8"]
What do you think? As a bonus, a libc-variant
could someday be msvc
or something on windows.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too