From: Pierre Neidhardt <mail@ambrevar.xyz>
To: "Ludovic Courtès" <ludo@gnu.org>,
"Pjotr Prins" <pjotr.public12@thebird.nl>
Cc: guix-devel@gnu.org
Subject: Re: gold linker and collect2: fatal error: cannot find 'ld'
Date: Fri, 17 May 2019 20:13:37 +0200 [thread overview]
Message-ID: <871s0xvtim.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87o941w5zf.fsf@ambrevar.xyz>
[-- Attachment #1: Type: text/plain, Size: 3047 bytes --]
So it seems that the following change to make-ld-wrapper triggers a
rebuild of the world on every "guix build". Any idea why? Ludo?
--8<---------------cut here---------------start------------->8---
@@ -537,14 +537,15 @@ included.")
binutils
(guile (canonical-package guile-2.2))
(bash (canonical-package bash))
- (guile-for-build guile))
- "Return a package called NAME that contains a wrapper for the 'ld' program
-of BINUTILS, which adds '-rpath' flags to the actual 'ld' command line. The
-wrapper uses GUILE and BASH.
+ (guile-for-build guile)
+ (linker-name "ld"))
+ "Return a package called NAME that contains a wrapper for the linker program,
+('ld' of BINUTILS by default), which adds '-rpath' flags to the actual linker
+command line. The 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-LINKER-NAME'."
;; 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.
@@ -569,8 +570,8 @@ 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-name)
+ `(string-append bin "/" ,linker-name)))
(go (string-append ld ".go")))
(setvbuf (current-output-port) _IOLBF)
@@ -593,8 +594,8 @@ 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-name)
+ (string-append "/bin/" linker-name)))))
(chmod ld #o555)
(compile-file ld #:output-file go)
#t)))))
--8<---------------cut here---------------end--------------->8---
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2019-05-17 18:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-17 16:06 gold linker and collect2: fatal error: cannot find 'ld' Pjotr Prins
2019-03-18 15:28 ` Pjotr Prins
2019-03-19 15:24 ` Pjotr Prins
2019-03-27 17:15 ` Ludovic Courtès
2019-05-01 7:56 ` Pierre Neidhardt
2019-05-16 5:18 ` Pierre Neidhardt
2019-05-17 13:44 ` Pierre Neidhardt
2019-05-17 18:13 ` Pierre Neidhardt [this message]
2019-05-20 15:35 ` Ludovic Courtès
2019-05-20 16:06 ` Pierre Neidhardt
2019-05-25 16:35 ` Pierre Neidhardt
2019-05-25 21:21 ` Pjotr Prins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871s0xvtim.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=pjotr.public12@thebird.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.