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/