Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to build with musl #362

Merged
merged 4 commits into from
Dec 23, 2021
Merged

Conversation

fzakaria
Copy link
Contributor

@fzakaria fzakaria commented Dec 22, 2021

Add support to the flake.nix to build with musl

nix build .#patchelf-musl

ld-musl-x86_64.so.1 --list ./result/bin/patchelf
	/nix/store/2lp9hm9idb2y8zxfqi4nnvxsrk4vym6d-musl-1.2.2/lib/ld-musl-x86_64.so.1 (0x7fc3d791d000)
	libstdc++.so.6 => /nix/store/b29ihq5w7rh1qga809bxsdrh2mrrvd7m-gcc-10.3.0-lib/lib/libstdc++.so.6 (0x7fc3d76f7000)
	libgcc_s.so.1 => /nix/store/b29ihq5w7rh1qga809bxsdrh2mrrvd7m-gcc-10.3.0-lib/lib/libgcc_s.so.1 (0x7fc3d76dd000)
	libc.so => /nix/store/2lp9hm9idb2y8zxfqi4nnvxsrk4vym6d-musl-1.2.2/lib/ld-musl-x86_64.so.1 (0x7fc3d791d000)

./result/bin/patchelf --help
syntax: ./result/bin/patchelf
  [--set-interpreter FILENAME]
...

You can also launch a develop shell for glib and musl.

CC @Mic92

Add support to the flake.nix to build with musl
```
nix build .#patchelf-musl
```
@fzakaria
Copy link
Contributor Author

I think there is an opportunity here to converge the hydraJobs here too and provide the full matrix of:

LIBC (MUSL vs. GLIBC) x DYNAMIC (static vs dynamic) x ASAN (on/off)

Might be a useful PR after this.

flake.nix Outdated Show resolved Hide resolved
flake.nix Outdated Show resolved Hide resolved
@Mic92 Mic92 merged commit bdb09e9 into NixOS:master Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants