[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: DRAFT commencement: binutils-mesboot0: Support ARM.
From: |
guix-commits |
Subject: |
07/08: DRAFT commencement: binutils-mesboot0: Support ARM. |
Date: |
Wed, 23 Dec 2020 04:16:33 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit 6c3355b16a827a6a6eb0f9f9e38e45ecc4ebb574
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Dec 23 09:48:01 2020 +0100
DRAFT commencement: binutils-mesboot0: Support ARM.
XXX TODO: Remove %bootstrap-coreutils&co dependency on ARM.
* gnu/packages/commencement.scm (bash-mesboot0)[arguments]: Parameterize
configure-flags' --build,--host,--target. Add ac_cv_func_strncmp_works
configure override.
[supported-systems]: Add aarch64-linux, armhf-linux.
---
gnu/packages/commencement.scm | 130 +++++++++++++++++++++++-------------------
1 file changed, 72 insertions(+), 58 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a266622..d9b0889 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1097,64 +1097,78 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(define binutils-mesboot0
;; The initial Binutils
- (package
- (inherit binutils)
- (name "binutils-mesboot0")
- (version "2.14")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/binutils/binutils-"
- version ".tar.gz"))
- (sha256
- (base32
- "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
- (inputs '())
- (propagated-inputs '())
- (native-inputs (%boot-tcc-inputs))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f ; runtest: command not found
- #:parallel-build? #f
- #:strip-binaries? #f ; no strip yet
- #:configure-flags
- (let ((out (assoc-ref %outputs "out")))
- `("--disable-nls"
- "--disable-shared"
- "--disable-werror"
- "--build=i386-unknown-linux"
- "--host=i386-unknown-linux"
- "--target=i386-unknown-linux"
- "--with-sysroot=/"
- ,(string-append "--prefix=" out)))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'setenv
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "AR" "tcc -ar")
- (setenv "RANLIB" "true")
- (setenv "CC" "tcc -D __GLIBC_MINOR__=6")
- #t)))
- (add-after 'unpack 'scripted-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "bfd/configure"
- (("^sed -e '/SRC-POTFILES.*" all)
- "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' >
po/Makefile\n"))
- #t))
- (replace 'configure ; needs classic invocation of configure
- (lambda* (#:key configure-flags #:allow-other-keys)
- (format (current-error-port)
- "running ./configure ~a\n" (string-join configure-flags))
- (apply system* "./configure" configure-flags)
- (substitute* "config.status"
- (("[.]//dev/null") "/dev/null"))
- (invoke "sh" "./config.status"))))))))
+ (let ((triplet (match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-unknown-linux-gnu")
+ ((or "i686-linux" "x86_64-linux")
+ "i386-unknown-linux-gnu"))))
+ (package
+ (inherit binutils)
+ (name "binutils-mesboot0")
+ (version "2.14")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1w8xp7k44bkijr974x9918i4p1sw4g2fcd5mxvspkjpg38m214ds"))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs (match (%current-system)
+ ((or "aarch64-linux" "armhf-linux")
+ ;; XXX TODO: configure exits prematurely
+ `(("bash" ,%bootstrap-coreutils&co)
+ ,@(alist-delete "bash" (%boot-tcc-inputs))))
+ ((or "i686-linux" "x86_64-linux")
+ (%boot-tcc-inputs))))
+ (supported-systems '("armhf-linux" "aarch64-linux"
+ "i686-linux" "x86_64-linux"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f ; runtest: command not found
+ #:parallel-build? #f
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list "--disable-nls"
+ "--disable-shared"
+ "--disable-werror"
+ (string-append "--build=" ,triplet)
+ (string-append "--host=" ,triplet)
+ (string-append "--target=" ,triplet)
+ "--with-sysroot=/"
+ (string-append "--prefix=" out)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "AR" "tcc -ar")
+ (setenv "RANLIB" "true")
+ (setenv "CC" "tcc -D __GLIBC_MINOR__=6")
+ (setenv "ac_cv_func_strncmp_works" "yes")
+ #t)))
+ (add-after 'unpack 'scripted-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "bfd/configure"
+ (("^sed -e '/SRC-POTFILES.*" all)
+ "echo -e 'all:\\n\\ttrue\\n\\ninstall:\\n\\ttrue\\n' >
po/Makefile\n"))
+ #t))
+ (replace 'configure ; needs classic invocation of configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join
configure-flags))
+ (apply system* "sh" "-x" "./configure" configure-flags)
+ (format (current-error-port) "configure done")
+ (substitute* "config.status"
+ (("[.]//dev/null") "/dev/null"))
+ (invoke "sh" "./config.status")))))))))
(define gcc-core-mesboot0
;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
- branch wip-arm-bootstrap updated (dcc8d29 -> ec4b66a), guix-commits, 2020/12/23
- 03/08: DRAFT commencement: bash-mesboot0: Support ARM., guix-commits, 2020/12/23
- 06/08: commencement: sed-mesboot0: Support ARM., guix-commits, 2020/12/23
- 07/08: DRAFT commencement: binutils-mesboot0: Support ARM.,
guix-commits <=
- 01/08: squash! DRAFT commencement: tcc-boot: Support ARM., guix-commits, 2020/12/23
- 05/08: commencement: patch-mesboot: Support ARM., guix-commits, 2020/12/23
- 04/08: commencement: diffutils-mesboot: Support ARM., guix-commits, 2020/12/23
- 02/08: squash! commencement: make-mesboot0: Support ARM., guix-commits, 2020/12/23
- 08/08: DRAFT commencement: gcc-core-mesboot0: Support ARM., guix-commits, 2020/12/23