summary refs log tree commit diff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-31 15:41:14 +0100
committerLudovic Courtès <ludo@gnu.org>2016-10-31 16:06:30 +0100
commit5bde4503eeaa1d772744abcf87afc29eb0e9329d (patch)
tree299b414bb4d560fbc90d8fee5f5c52d565b144ae /gnu/packages/commencement.scm
parent77e9c9931e7b849d82def2b1cc657dc89f85d05b (diff)
downloadguix-5bde4503eeaa1d772744abcf87afc29eb0e9329d.tar.gz
gnu: ld-wrapper-boot0: Work around strict evaluation of (%current-system).
Reported by Mark H Weaver <mhw@netris.org>
Partly fixes <http://bugs.gnu.org/24832>.

'ld-wrapper-boot0' was evaluating strictly instead of lazily, leading to
invalid system types.

* gnu/packages/base.scm (make-ld-wrapper): Turn #:target into a
one-argument procedure.  Honor it.
* gnu/packages/commencement.scm (ld-wrapper-boot0): Fix 'name' argument
to 'make-ld-wrapper'.  Make #:target argument a procedure.
* gnu/packages/cross-base.scm (cross-gcc): Adjust #:target argument.
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 53ba7189b4..2431babcad 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -424,8 +424,14 @@ the bootstrap environment."
 (define ld-wrapper-boot0
   ;; We need this so binaries on Hurd will have libmachuser and libhurduser
   ;; in their RUNPATH, otherwise validate-runpath will fail.
-  (make-ld-wrapper (string-append "ld-wrapper-" (boot-triplet))
-                   #:target (boot-triplet)
+  ;;
+  ;; XXX: Work around <http://bugs.gnu.org/24832> by fixing the name and
+  ;; triplet on GNU/Linux.  For GNU/Hurd, use the right triplet.
+  (make-ld-wrapper (string-append "ld-wrapper-" "x86_64-guix-linux-gnu")
+                   #:target (lambda (system)
+                              (if (string-suffix? "-linux" system)
+                                  "x86_64-guix-linux-gnu"
+                                  (boot-triplet system)))
                    #:binutils binutils-boot0
                    #:guile %bootstrap-guile
                    #:bash (car (assoc-ref %boot0-inputs "bash"))))