[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MIPS bootstrap problem in core-updates
From: |
Ludovic Courtès |
Subject: |
Re: MIPS bootstrap problem in core-updates |
Date: |
Mon, 08 Jun 2015 16:01:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> In core-updates, 'glibc-final-with-bootstrap-bash' fails to build on
> MIPS, because 'gcc-boot0' doesn't work. The problem is that we've
> switched to gcc-4.9, which on MIPS now emits a new ".nan" assembler
> directive which is not understood by the assembler in binutils-2.23.2,
> the version in our binutils-bootstrap-0.
>
> The assembler in binutils-2.25 understands ".nan", and that version of
> binutils is an input to 'glibc-final-with-bootstrap-bash' (via
> %boot1-inputs), so one might expect this to work. There's just one
> problem: the assembler in 'binutils-boot0' is named
> 'mips64el-guix-linux-gnu-as', but the compiler in 'gcc-boot0' runs 'as'.
>
> Historically, we've worked around this by including the bootstrap
> binutils in %boot1-inputs:
>
> (define %boot1-inputs
> ;; 2nd stage inputs.
> `(("gcc" ,gcc-boot0)
> ("binutils-cross" ,binutils-boot0)
>
> ;; Keep "binutils" here because the cross-gcc invokes `as', not the
> ;; cross-`as'.
> ,@%boot0-inputs))
Thanks for the detailed analysis!
This (lightly tested) patch may work:
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ab16660..6dd4d55 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -139,6 +139,19 @@
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
+
+ #:phases (alist-cons-after
+ 'install 'add-gas-symlink
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; The cross-gcc invokes 'as', not the cross-'as', so add
+ ;; an 'as' symlink.
+ (let ((out (assoc-ref outputs "out")))
+ (with-directory-excursion (string-append out "/bin")
+ (symlink (string-append ,(boot-triplet) "-as")
+ "as")
+ #t)))
+ %standard-phases)
+
,@(substitute-keyword-arguments (package-arguments binutils)
((#:configure-flags cf)
`(cons ,(string-append "--target=" (boot-triplet))
@@ -274,10 +287,7 @@
;; 2nd stage inputs.
`(("gcc" ,gcc-boot0)
("binutils-cross" ,binutils-boot0)
-
- ;; Keep "binutils" here because the cross-gcc invokes `as', not the
- ;; cross-`as'.
- ,@%boot0-inputs))
+ ,@(alist-delete "binutils" %boot0-inputs)))
(define glibc-final-with-bootstrap-bash
;; The final libc, "cross-built". If everything went well, the resulting
Could you try it on MIPS, on top of ‘core-updates’?
It looks like the simplest solution.
Thanks,
Ludo’.