[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
84/140: gnu: make-ld-wrapper: Add a LINKER argument.
From: |
guix-commits |
Subject: |
84/140: gnu: make-ld-wrapper: Add a LINKER argument. |
Date: |
Sun, 17 Oct 2021 23:11:00 -0400 (EDT) |
apteryx pushed a commit to branch core-updates-frozen-batched-changes
in repository guix.
commit 55fc672b8840000db9a4d49a86493b04c682a699
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 | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d926b28..6522f83 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)
@@ -676,8 +682,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.
- 67/140: gnu: python-gst: Update to 1.18.5., (continued)
- 67/140: gnu: python-gst: Update to 1.18.5., guix-commits, 2021/10/17
- 74/140: gnu: python-keras: Skip a flaky test., guix-commits, 2021/10/17
- 81/140: build: qt-utils: Don't wrap .X-real files., guix-commits, 2021/10/17
- 69/140: gnu: tensorflow: Enable parallel build (at least partially)., guix-commits, 2021/10/17
- 77/140: gnu: tzdata: Update to 2021c., guix-commits, 2021/10/17
- 72/140: gnu: libnice: Update to 0.1.18-0.47a9633., guix-commits, 2021/10/17
- 79/140: gnu: diffutils: Fix signal processing., guix-commits, 2021/10/17
- 76/140: gnu: glibc: Look for the current timezone in /etc/localtime., guix-commits, 2021/10/17
- 83/140: gnu: gcc-5: Fix powerpc64le-linux build, guix-commits, 2021/10/17
- 82/140: gnu: curl: Honor #:tests?., guix-commits, 2021/10/17
- 84/140: gnu: make-ld-wrapper: Add a LINKER argument.,
guix-commits <=
- 88/140: guix: packages: Fix repacking of plain tarballs., guix-commits, 2021/10/17
- 89/140: aux-files: sitecustomize: Cleanup and add explanatory comments., guix-commits, 2021/10/17
- 90/140: gnu: glade3: Remove sitecustomize.py workaround., guix-commits, 2021/10/17
- 97/140: gnu: Add python-flit-core., guix-commits, 2021/10/17
- 95/140: gnu: Move a few Python packages to (gnu packages python-build)., guix-commits, 2021/10/17
- 92/140: gnu: rust: Add rust 1.54 and move all non-bootstrapping logic to it., guix-commits, 2021/10/17
- 87/140: gnu: gdb: Normalize indentation., guix-commits, 2021/10/17
- 93/140: gnu: Build all Rust packages using the latest rustc., guix-commits, 2021/10/17
- 98/140: gnu: Add python-tomli., guix-commits, 2021/10/17
- 100/140: gnu: python-pytest-6: Fix version via setuptools-scm., guix-commits, 2021/10/17