summary refs log tree commit diff
path: root/gnu/packages/ld-wrapper.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2018-03-29 17:54:53 +0200
committerLudovic Courtès <ludovic.courtes@inria.fr>2018-03-29 17:58:16 +0200
commitd0a2db47fb550d684c47a0ae3b541a9a71727d9e (patch)
treeeba40a8647810f01c256d7457d6f17408859784b /gnu/packages/ld-wrapper.in
parent1a5e07c3b56049d45be15e3f1ffbe81f2f1809ba (diff)
downloadguix-d0a2db47fb550d684c47a0ae3b541a9a71727d9e.tar.gz
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'.
Diffstat (limited to 'gnu/packages/ld-wrapper.in')
-rw-r--r--gnu/packages/ld-wrapper.in14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in
index c1f2038acb..16780c58f6 100644
--- a/gnu/packages/ld-wrapper.in
+++ b/gnu/packages/ld-wrapper.in
@@ -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.