mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
ld-wrapper: Allow linking with non-store libraries by default.
This was suggested on several occasions, notably <https://bugs.gnu.org/24544>. * gnu/packages/ld-wrapper.in (%allow-impurities?): Default to #t and parse the value of 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'. * guix/build/gnu-build-system.scm (set-paths): Set 'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'.
This commit is contained in:
parent
1a5e07c3b5
commit
d0a2db47fb
2 changed files with 16 additions and 1 deletions
|
@ -81,7 +81,19 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line))
|
|||
|
||||
(define %allow-impurities?
|
||||
;; Whether to allow references to libraries outside the store.
|
||||
(getenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES"))
|
||||
;; Allow them by default for convenience.
|
||||
(let ((value (getenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES")))
|
||||
(or (not value)
|
||||
(let ((value (string-downcase value)))
|
||||
(cond ((member value '("yes" "y" "t" "true" "1"))
|
||||
#t)
|
||||
((member value '("no" "n" "f" "false" "0"))
|
||||
#f)
|
||||
(else
|
||||
(format (current-error-port)
|
||||
"ld-wrapper: ~s: invalid value for \
|
||||
'GUIX_LD_WRAPPER_ALLOW_IMPURITIES'~%"
|
||||
value)))))))
|
||||
|
||||
(define %debug?
|
||||
;; Whether to emit debugging output.
|
||||
|
|
|
@ -87,6 +87,9 @@ (define native-input-directories
|
|||
(#f ; not cross compiling
|
||||
'())))
|
||||
|
||||
;; Tell 'ld-wrapper' to disallow non-store libraries.
|
||||
(setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "no")
|
||||
|
||||
;; When cross building, $PATH must refer only to native (host) inputs since
|
||||
;; target inputs are not executable.
|
||||
(set-path-environment-variable "PATH" '("bin" "sbin")
|
||||
|
|
Loading…
Reference in a new issue