diff options
Diffstat (limited to 'pkgs/build-support')
4 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 3d64639d33f..53f367b9b84 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -324,6 +324,16 @@ stdenv.mkDerivation { echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags '' + ## + ## GNU specific extra strip flags + ## + + # TODO(@sternenseemann): make a generic strip wrapper? + + optionalString (bintools.isGNU or false) '' + wrap ${targetPrefix}strip ${./gnu-binutils-strip-wrapper.sh} \ + "${bintools_bin}/bin/${targetPrefix}strip" + '' + ### ### Remove LC_UUID ### diff --git a/pkgs/build-support/bintools-wrapper/gnu-binutils-strip-wrapper.sh b/pkgs/build-support/bintools-wrapper/gnu-binutils-strip-wrapper.sh new file mode 100644 index 00000000000..5b5136e3d14 --- /dev/null +++ b/pkgs/build-support/bintools-wrapper/gnu-binutils-strip-wrapper.sh @@ -0,0 +1,4 @@ +#! @shell@ +# shellcheck shell=bash + +exec @prog@ --enable-deterministic-archives "$@" diff --git a/pkgs/build-support/rust/hooks/cargo-check-hook.sh b/pkgs/build-support/rust/hooks/cargo-check-hook.sh index f0339afb38f..8a8e434f0ff 100644 --- a/pkgs/build-support/rust/hooks/cargo-check-hook.sh +++ b/pkgs/build-support/rust/hooks/cargo-check-hook.sh @@ -16,11 +16,11 @@ cargoCheckHook() { threads=1 fi - if [ "${cargoBuildType}" != "debug" ]; then - cargoBuildProfileFlag="--${cargoBuildType}" + if [ "${cargoCheckType}" != "debug" ]; then + cargoCheckProfileFlag="--${cargoCheckType}" fi - argstr="${cargoBuildProfileFlag} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}"; + argstr="${cargoCheckProfileFlag} --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}"; ( set -x diff --git a/pkgs/build-support/setup-hooks/strip.sh b/pkgs/build-support/setup-hooks/strip.sh index c31a50eba57..2d8e66a89fa 100644 --- a/pkgs/build-support/setup-hooks/strip.sh +++ b/pkgs/build-support/setup-hooks/strip.sh @@ -51,7 +51,7 @@ stripDirs() { if [ -n "${dirs}" ]; then header "stripping (with command $cmd and flags $stripFlags) in$dirs" - find $dirs -type f -exec $cmd $commonStripFlags $stripFlags '{}' \; 2>/dev/null + find $dirs -type f -exec $cmd $stripFlags '{}' \; 2>/dev/null stopNest fi } |