about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-08-08 10:20:00 +0200
committerRobin Gloster <mail@glob.in>2017-08-08 10:20:00 +0200
commit3e981b9e33141ec8bafd8ecf36cde9cbafaac180 (patch)
treea3fe31d5936087513c6f6ba90312cf207c20e7a5 /pkgs/build-support
parent67a41eafe9c92269c9f6788f5f54a4b0d282cb96 (diff)
downloadnixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar.gz
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar.bz2
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar.lz
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar.xz
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.tar.zst
nixlib-3e981b9e33141ec8bafd8ecf36cde9cbafaac180.zip
Revert "cc-wrapper: fix set -u errors"
This reverts commit 67a41eafe9c92269c9f6788f5f54a4b0d282cb96.

see #28021 for discussion
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/add-flags.sh7
-rw-r--r--pkgs/build-support/cc-wrapper/ld-wrapper.sh5
2 files changed, 3 insertions, 9 deletions
diff --git a/pkgs/build-support/cc-wrapper/add-flags.sh b/pkgs/build-support/cc-wrapper/add-flags.sh
index 7af2ae58f3a6..3d01dba64766 100644
--- a/pkgs/build-support/cc-wrapper/add-flags.sh
+++ b/pkgs/build-support/cc-wrapper/add-flags.sh
@@ -10,13 +10,12 @@ declare -a role_prefixes=()
 if [[ -n "${NIX_CC_WRAPPER_@infixSalt@_TARGET_BUILD:-}" ]]; then
     role_prefixes+=(_BUILD)
 fi
+if [[ -n "${NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST:-}" ]]; then
+    role_prefixes+=('')
+fi
 if [[ -n "${NIX_CC_WRAPPER_@infixSalt@_TARGET_TARGET:-}" ]]; then
     role_prefixes+=(_TARGET)
 fi
-# use this as default if no role is inferred
-if [[ -n "${NIX_CC_WRAPPER_@infixSalt@_TARGET_HOST:-}" || ${#role_prefixes[@]} -eq 0 ]]; then
-    role_prefixes+=('')
-fi
 
 # For each role we serve, we accumulate the input parameters into our own
 # cc-wrapper-derivation-specific environment variables.
diff --git a/pkgs/build-support/cc-wrapper/ld-wrapper.sh b/pkgs/build-support/cc-wrapper/ld-wrapper.sh
index afa7798e49fb..e47a6bfec860 100644
--- a/pkgs/build-support/cc-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/cc-wrapper/ld-wrapper.sh
@@ -20,11 +20,6 @@ fi
 
 source @out@/nix-support/utils.sh
 
-# make set -u happy if the outside environment is unset
-# this should never happen, but does in an LLVM test
-if [ -z "${NIX_STORE:-}" ]; then
-    NIX_STORE=/nix/store
-fi
 
 # Optionally filter out paths not refering to the store.
 expandResponseParams "$@"