about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2017-08-08 06:56:25 +0000
committerRobin Gloster <mail@glob.in>2017-08-08 11:03:51 +0200
commita6e7dffd1f8e60e852c3de4bf9b153ba874d2823 (patch)
treedf76152e5b35ae8d68cd9973538d4da1a0ee32ac /pkgs/build-support
parentc8e9dcc8a44e95fc7aab436587049b5c95e4e86a (diff)
downloadnixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar.gz
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar.bz2
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar.lz
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar.xz
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.tar.zst
nixlib-a6e7dffd1f8e60e852c3de4bf9b153ba874d2823.zip
cc-wrapper: Fix standalone ld
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cc-wrapper/ld-wrapper.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/build-support/cc-wrapper/ld-wrapper.sh b/pkgs/build-support/cc-wrapper/ld-wrapper.sh
index 028f2d4f5484..8db64a38e383 100644
--- a/pkgs/build-support/cc-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/cc-wrapper/ld-wrapper.sh
@@ -23,7 +23,7 @@ source @out@/nix-support/utils.sh
 
 # Optionally filter out paths not refering to the store.
 expandResponseParams "$@"
-if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "$NIX_STORE"
+if [[ "${NIX_ENFORCE_PURITY:-}" = 1 && -n "${NIX_STORE:-}"
         && ( -z "$NIX_@infixSalt@_IGNORE_LD_THROUGH_GCC" || -z "${NIX_@infixSalt@_LDFLAGS_SET:-}" ) ]]; then
     rest=()
     nParams=${#params[@]}
@@ -96,7 +96,7 @@ if [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ] || [ "$NIX_@infixSalt@_SET_BUILD_I
                     -l?*)
                         libs["lib${p:2}.so"]=1
                         ;;
-                    "$NIX_STORE"/*.so | "$NIX_STORE"/*.so.*)
+                    "${NIX_STORE:-}"/*.so | "${NIX_STORE:-}"/*.so.*)
                         # This is a direct reference to a shared library.
                         libDirs+=("${p%/*}")
                         libs["${p##*/}"]=1
@@ -123,7 +123,7 @@ if [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ]; then
         if [[ "$dir" =~ [/.][/.] ]] && dir2=$(readlink -f "$dir"); then
             dir="$dir2"
         fi
-        if [ -n "${rpaths[$dir]:-}" ] || [[ "$dir" != "$NIX_STORE"/* ]]; then
+        if [ -n "${rpaths[$dir]:-}" ] || [[ "$dir" != "${NIX_STORE:-}"/* ]]; then
             # If the path is not in the store, don't add it to the rpath.
             # This typically happens for libraries in /tmp that are later
             # copied to $out/lib.  If not, we're screwed.