gnu: ld-wrapper: Add 'GUIX_LD_WRAPPER_DISABLE_RPATH' environment variable.
* gnu/packages/ld-wrapper.scm (%disable-rpath?): New variable. (rpath-arguments): Honor it.master
parent
51d0cd9b38
commit
71b6716814
|
@ -82,6 +82,10 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line))
|
||||||
;; Whether to emit debugging output.
|
;; Whether to emit debugging output.
|
||||||
(getenv "GUIX_LD_WRAPPER_DEBUG"))
|
(getenv "GUIX_LD_WRAPPER_DEBUG"))
|
||||||
|
|
||||||
|
(define %disable-rpath?
|
||||||
|
;; Whether to disable automatic '-rpath' addition.
|
||||||
|
(getenv "GUIX_LD_WRAPPER_DISABLE_RPATH"))
|
||||||
|
|
||||||
(define (readlink* file)
|
(define (readlink* file)
|
||||||
;; Call 'readlink' until the result is not a symlink.
|
;; Call 'readlink' until the result is not a symlink.
|
||||||
(define %max-symlink-depth 50)
|
(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
|
;; want to add '-rpath' for files under %BUILD-DIRECTORY or
|
||||||
;; %TEMPORARY-DIRECTORY because that could leak to installed
|
;; %TEMPORARY-DIRECTORY because that could leak to installed
|
||||||
;; files.
|
;; files.
|
||||||
(cond ((store-file-name? file)
|
(cond ((and (not %disable-rpath?)
|
||||||
|
(store-file-name? file))
|
||||||
(cons* "-rpath" (dirname file) args))
|
(cons* "-rpath" (dirname file) args))
|
||||||
((or %allow-impurities?
|
((or %allow-impurities?
|
||||||
(pure-file-name? file))
|
(pure-file-name? file))
|
||||||
|
|
Reference in New Issue