stdenv cc-wrapper: deal with edge-case regressions

Regression introduced in PR #81191 80729b6787d.  The file does not exist
somewhere during bootstrap of pkgsStatic.busybox which is used in nix
(by default).

I tested the builds.
This commit is contained in:
Vladimír Čunát 2020-03-10 11:04:32 +01:00
parent 4eeb6f01e6
commit 1d9c10c8de
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -366,7 +366,9 @@ stdenv.mkDerivation {
# There are a few tools (to name one libstdcxx5) which do not work
# well with multi line flags, so make the flags single line again
+ ''
substituteInPlace $out/nix-support/libc-cflags --replace $'\n' ' '
if [ -e "$out/nix-support/libc-cflags" ]; then
substituteInPlace "$out/nix-support/libc-cflags" --replace $'\n' ' '
fi
substituteAll ${./add-flags.sh} $out/nix-support/add-flags.sh
substituteAll ${./add-hardening.sh} $out/nix-support/add-hardening.sh