mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
gnu: ld-wrapper: Add 'GUIX_LD_WRAPPER_DISABLE_RPATH' environment variable.
* gnu/packages/ld-wrapper.scm (%disable-rpath?): New variable. (rpath-arguments): Honor it.
This commit is contained in:
parent
51d0cd9b38
commit
71b6716814
1 changed files with 6 additions and 1 deletions
|
@ -82,6 +82,10 @@ (define %debug?
|
|||
;; 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 @@ (define (rpath-arguments library-files)
|
|||
;; 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))
|
||||
|
|
Loading…
Reference in a new issue