summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-07 10:29:51 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-07 22:28:36 +0200
commit71b671681472d64c1077c2014132af56ce49ce4e (patch)
tree469557aec18309237dc9b6233ca6ad14625a3ab7 /gnu/packages
parent51d0cd9b3852fe4ebf4b4cd9b251e6493624d022 (diff)
downloadguix-71b671681472d64c1077c2014132af56ce49ce4e.tar.gz
gnu: ld-wrapper: Add 'GUIX_LD_WRAPPER_DISABLE_RPATH' environment variable.
* gnu/packages/ld-wrapper.scm (%disable-rpath?): New variable.
  (rpath-arguments): Honor it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ld-wrapper.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/gnu/packages/ld-wrapper.scm b/gnu/packages/ld-wrapper.scm
index cd2a2c445e..094018de3d 100644
--- a/gnu/packages/ld-wrapper.scm
+++ b/gnu/packages/ld-wrapper.scm
@@ -82,6 +82,10 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line))
   ;; Whether to emit debugging output.
   (getenv "GUIX_LD_WRAPPER_DEBUG"))
 
+(define %disable-rpath?
+  ;; Whether to disable automatic '-rpath' addition.
+  (getenv "GUIX_LD_WRAPPER_DISABLE_RPATH"))
+
 (define (readlink* file)
   ;; Call 'readlink' until the result is not a symlink.
   (define %max-symlink-depth 50)
@@ -176,7 +180,8 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line))
                 ;; want to add '-rpath' for files under %BUILD-DIRECTORY or
                 ;; %TEMPORARY-DIRECTORY because that could leak to installed
                 ;; files.
-                (cond ((store-file-name? file)
+                (cond ((and (not %disable-rpath?)
+                            (store-file-name? file))
                        (cons* "-rpath" (dirname file) args))
                       ((or %allow-impurities?
                            (pure-file-name? file))