-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
stdenv: move --enable-deterministic-archives flag into GNU wrapper #138289
stdenv: move --enable-deterministic-archives flag into GNU wrapper #138289
Conversation
Where is that?
I am not sure when I'll finish that (as much as I like it!) so without knowing the details, if there is some hack to get rid of now easily, by all means do so. |
76c9a926e06afd07b2a263504f60e64b0675fea7 which Alyssa commented on (a fact that easily gets lost in the github UI…) |
Oh I see. Yeah fine for now for sure. |
8f42223
to
5220c58
Compare
I think this is good enough for now. Will need some additional testing though, as it is a full stdenv rebuild on all platforms now. |
5220c58
to
4e93308
Compare
* Only try to link libgcc if GCC is actually used * Link libgcc depending on libc (glibc vs. musl), rather than Linux/musl vs. Linux/!musl This is a step towards fixing pkgsLLVM.python3.
`--enable-deterministic-archives` is a GNU specific strip flag and causes other strip implementations (for example LLVM's, see NixOS#138013) to fail. Since strip failures are ignored, this means that stripping doesn't work at all in certain situation (causing unnecessary dependencies etc.). To fix this, no longer pass `--enable-deterministic-archives` unconditionally, but instead add it in a GNU binutils specific strip wrapper only. `commonStripFlags` was only used for this flag, so we can remove it altogether. Future work could be to make a generic strip wrapper, with support for nix-support/strip-flags-{before,after} and NIX_STRIP_FLAGS_{BEFORE,AFTER}. This possibly overkill and unnecessary though -- also with the additional challenge of incorporating the darwin strip wrapper somehow.
4e93308
to
11fe2fc
Compare
Checked stripping with |
PR NixOS#138289 stopped --enable-deterministic-archives being passed by setup.sh, so we need to make sure we wrap strip and pass this flag if it is supported (which is the case for GNU binutils). This mirrors the behavior of the gnu strip wrapper for aarch64-darwin.
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)