gnu: commencement: Use our Binutils as soon as possible.
* gnu/packages/commencement.scm (binutils-boot0)[arguments]: Add 'add-symlinks' phase.
This commit is contained in:
parent
56eba3d152
commit
f8badf151b
|
@ -139,6 +139,28 @@
|
||||||
(arguments
|
(arguments
|
||||||
`(#:guile ,%bootstrap-guile
|
`(#:guile ,%bootstrap-guile
|
||||||
#:implicit-inputs? #f
|
#:implicit-inputs? #f
|
||||||
|
|
||||||
|
#:modules ((guix build gnu-build-system)
|
||||||
|
(guix build utils)
|
||||||
|
(ice-9 ftw)) ; for 'scandir'
|
||||||
|
#:phases (alist-cons-after
|
||||||
|
'install 'add-symlinks
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
;; The cross-gcc invokes 'as', 'ld', etc, without the
|
||||||
|
;; triplet prefix, so add symlinks.
|
||||||
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
(triplet-prefix (string-append ,(boot-triplet) "-")))
|
||||||
|
(define (has-triplet-prefix? name)
|
||||||
|
(string-prefix? triplet-prefix name))
|
||||||
|
(define (remove-triplet-prefix name)
|
||||||
|
(substring name (string-length triplet-prefix)))
|
||||||
|
(with-directory-excursion (string-append out "/bin")
|
||||||
|
(for-each (lambda (name)
|
||||||
|
(symlink name (remove-triplet-prefix name)))
|
||||||
|
(scandir "." has-triplet-prefix?)))
|
||||||
|
#t))
|
||||||
|
%standard-phases)
|
||||||
|
|
||||||
,@(substitute-keyword-arguments (package-arguments binutils)
|
,@(substitute-keyword-arguments (package-arguments binutils)
|
||||||
((#:configure-flags cf)
|
((#:configure-flags cf)
|
||||||
`(cons ,(string-append "--target=" (boot-triplet))
|
`(cons ,(string-append "--target=" (boot-triplet))
|
||||||
|
@ -274,10 +296,7 @@
|
||||||
;; 2nd stage inputs.
|
;; 2nd stage inputs.
|
||||||
`(("gcc" ,gcc-boot0)
|
`(("gcc" ,gcc-boot0)
|
||||||
("binutils-cross" ,binutils-boot0)
|
("binutils-cross" ,binutils-boot0)
|
||||||
|
,@(alist-delete "binutils" %boot0-inputs)))
|
||||||
;; Keep "binutils" here because the cross-gcc invokes `as', not the
|
|
||||||
;; cross-`as'.
|
|
||||||
,@%boot0-inputs))
|
|
||||||
|
|
||||||
(define glibc-final-with-bootstrap-bash
|
(define glibc-final-with-bootstrap-bash
|
||||||
;; The final libc, "cross-built". If everything went well, the resulting
|
;; The final libc, "cross-built". If everything went well, the resulting
|
||||||
|
|
Loading…
Reference in New Issue