From 11fe2fc3cfccb95f7b99f2a2d1096c851868e582 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Fri, 17 Sep 2021 16:59:12 +0200 Subject: stdenv: move --enable-deterministic-archives flag into GNU wrapper `--enable-deterministic-archives` is a GNU specific strip flag and causes other strip implementations (for example LLVM's, see #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. --- pkgs/stdenv/linux/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'pkgs/stdenv') diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 1fbd3cba27ef..d2c74f7722d3 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -375,12 +375,7 @@ in targetPlatform = localSystem; inherit config; - preHook = '' - # Make "strip" produce deterministic output, by setting - # timestamps etc. to a fixed value. - commonStripFlags="--enable-deterministic-archives" - ${commonPreHook} - ''; + preHook = commonPreHook; initialPath = ((import ../common-path.nix) {pkgs = prevStage;}); -- cgit 1.4.1