about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-12-12 18:48:07 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2009-12-12 18:48:07 +0000
commit6bacb66dd3ec9a8819472becc369a479b65b00c3 (patch)
tree948b6c66e62bb2208ca7cd28357cf6f7d8b3c3a4 /pkgs/build-support
parentdae3eb23830cce8a7dacebf288655f3c27489666 (diff)
Updating the gcc-wrapper with the changes done in trunk's gcc-wrapper2.
Removing any reference to the gcc-wrapper2, as now the gcc-wrapper already conveys
the changes, I created gcc-wrapper2 in trunk for.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18913
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/gcc-wrapper/ld-wrapper.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
index 962adf43861a3..52aa57bc1ea77 100644
--- a/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
+++ b/pkgs/build-support/gcc-wrapper/ld-wrapper.sh
@@ -81,6 +81,9 @@ if test "$NIX_DONT_SET_RPATH" != "1"; then
         elif test "$p" = "-L"; then
             addToLibPath ${p2}
             n=$((n + 1))
+        elif $(echo "$p" | grep -q '\.so\($\|\.\)'); then
+            path="$(dirname "$p")";
+            addToLibPath "${path}"
         fi
         n=$((n + 1))
     done
@@ -113,6 +116,12 @@ if test "$NIX_DONT_SET_RPATH" != "1"; then
                 # I haven't seen `-l foo', but you never know...
                 addToRPath $i
                 break
+            elif $(echo "$p" | grep -q '\.so\($\|\.\)'); then
+                path="$(dirname "$p")";
+                if test "$path" == "$i"; then
+                  addToRPath $i
+                  break;
+                fi
             fi
             n=$((n + 1))
         done