[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
84/227: gnu: make-ld-wrapper: Add a LINKER argument.
From: |
guix-commits |
Subject: |
84/227: gnu: make-ld-wrapper: Add a LINKER argument. |
Date: |
Thu, 11 Nov 2021 12:30:10 -0500 (EST) |
apteryx pushed a commit to branch core-updates-frozen
in repository guix.
commit 8b1dfc144bf99b4673055c44103e690a5583d1f0
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Sep 14 10:44:30 2021 -0400
gnu: make-ld-wrapper: Add a LINKER argument.
This allows creating wrappers for other linkers than "ld", such as
"ld.gold".
* gnu/packages/base.scm (make-ld-wrapper): New variable.
[linker]: New argument. Update doc.
<ld>: Use LINKER to derive the linker source.
---
gnu/packages/base.scm | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e14cf9a..41641c7 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -71,6 +72,7 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (glibc
+ make-ld-wrapper
libiconv-if-needed))
;;; Commentary:
@@ -603,6 +605,7 @@ included.")
(define* (make-ld-wrapper name #:key
(target (const #f))
binutils
+ (linker "ld")
(guile (canonical-package guile-3.0))
(bash (canonical-package bash))
(guile-for-build guile))
@@ -612,7 +615,9 @@ wrapper uses GUILE and BASH.
TARGET must be a one-argument procedure that, given a system type, returns a
cross-compilation target triplet or #f. When the result is not #f, make a
-wrapper for the cross-linker for that target, called 'TARGET-ld'."
+wrapper for the cross-linker for that target, called 'TARGET-ld'. To use a
+different linker than the default \"ld\", such as \"ld.gold\" the linker name
+can be provided via the LINKER argument."
;; Note: #:system->target-triplet is a procedure so that the evaluation of
;; its result can be delayed until the 'arguments' field is evaluated, thus
;; in a context where '%current-system' is accurate.
@@ -637,8 +642,9 @@ wrapper for the cross-linker for that target, called
'TARGET-ld'."
(let* ((out (assoc-ref %outputs "out"))
(bin (string-append out "/bin"))
(ld ,(if target
- `(string-append bin "/" ,target "-ld")
- '(string-append bin "/ld")))
+ `(string-append bin "/" ,target "-"
+ ,linker)
+ `(string-append bin "/" ,linker)))
(go (string-append ld ".go")))
(setvbuf (current-output-port)
@@ -663,11 +669,10 @@ wrapper for the cross-linker for that target, called
'TARGET-ld'."
(string-append (assoc-ref %build-inputs "binutils")
,(if target
(string-append "/bin/"
- target "-ld")
- "/bin/ld"))))
+ target "-" linker)
+ (string-append "/bin/"
linker)))))
(chmod ld #o555)
- (compile-file ld #:output-file go)
- #t)))))
+ (compile-file ld #:output-file go))))))
(synopsis "The linker wrapper")
(description
"The linker wrapper (or @code{ld-wrapper}) wraps the linker to add any
@@ -676,8 +681,6 @@ the store.")
(home-page "https://www.gnu.org/software/guix//")
(license gpl3+)))
-(export make-ld-wrapper)
-
(define-public glibc
;; This is the GNU C Library, used on GNU/Linux and GNU/Hurd. Prior to
;; version 2.28, GNU/Hurd used a different glibc branch.
- 47/227: gnu: gst-editing-services: Update to 1.19.2., (continued)
- 47/227: gnu: gst-editing-services: Update to 1.19.2., guix-commits, 2021/11/11
- 48/227: gnu: python-gst: Update to 1.19.2., guix-commits, 2021/11/11
- 52/227: Revert commits made to resolve a gdk-pixbuf+svg propagation issue., guix-commits, 2021/11/11
- 57/227: gnu: Add a missing copyright., guix-commits, 2021/11/11
- 58/227: gnu: polkit: Update to 0.120 and ungraft., guix-commits, 2021/11/11
- 71/227: gnu: dbus-c++: Fix build., guix-commits, 2021/11/11
- 75/227: gnu: glibc: Remove unneeded nscd patching., guix-commits, 2021/11/11
- 70/227: gnu: python-keras: Enable parallel tests., guix-commits, 2021/11/11
- 72/227: gnu: libnice: Update to 0.1.18-0.47a9633 and disable test-bind test., guix-commits, 2021/11/11
- 73/227: bluez: Update to 5.61., guix-commits, 2021/11/11
- 84/227: gnu: make-ld-wrapper: Add a LINKER argument.,
guix-commits <=
- 80/227: gnu: diffutils: Update to 3.8., guix-commits, 2021/11/11
- 85/227: gnu: Add ld-gold-wrapper., guix-commits, 2021/11/11
- 89/227: aux-files: sitecustomize: Cleanup and add explanatory comments., guix-commits, 2021/11/11
- 93/227: gnu: Build all Rust packages using the latest rustc., guix-commits, 2021/11/11
- 99/227: gnu: python-setuptools-scm: Update to 6.3.2, guix-commits, 2021/11/11
- 59/227: Revert gstreamer update to 1.19.2., guix-commits, 2021/11/11
- 101/227: gnu: python-pathlib2: Update to 2.3.6., guix-commits, 2021/11/11
- 98/227: gnu: Add python-tomli., guix-commits, 2021/11/11
- 103/227: build: glib-or-gtk-build-system: Simplify the wrap-all-programs phase., guix-commits, 2021/11/11
- 105/227: gnu: at-spi2-core: Reverse inheritance relationship with minimal variant., guix-commits, 2021/11/11