[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
21/26: commencement: binutils-mesboot0: Support ARM.
From: |
guix-commits |
Subject: |
21/26: commencement: binutils-mesboot0: Support ARM. |
Date: |
Tue, 12 Jan 2021 13:49:17 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit 317d46c60d43ce0bf9eb8f08b55b1ed04fb7a0f9
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Dec 23 09:48:01 2020 +0100
commencement: binutils-mesboot0: Support 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 | 123 ++++++++++++++++++++++--------------------
1 file changed, 65 insertions(+), 58 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 23581b5..63c2380 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1169,64 +1169,71 @@ $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 (%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* "./configure" configure-flags)
+ (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
- 14/26: commencement: make-mesboot0: Support ARM., (continued)
- 14/26: commencement: make-mesboot0: Support ARM., guix-commits, 2021/01/12
- 17/26: commencement: tcc-boot: Support ARM., guix-commits, 2021/01/12
- 25/26: commencement: glibc-mesboot0: Support ARM., guix-commits, 2021/01/12
- 02/26: gnu: Add nyacc-1.00.2., guix-commits, 2021/01/12
- 09/26: commencement: gash-boot: Build fix for ARM., guix-commits, 2021/01/12
- 18/26: commencement: diffutils-mesboot: Support ARM., guix-commits, 2021/01/12
- 01/26: gnu: mescc-tools: Update to 0.7.0., guix-commits, 2021/01/12
- 10/26: commencement: bootstrap-mes-rewired: Support ARM., guix-commits, 2021/01/12
- 12/26: commencement: tcc-boot0: Support ARM, update to 0.9.26-1136-g0fbeb2dd., guix-commits, 2021/01/12
- 16/26: commencement: bash-mesboot0: Support ARM., guix-commits, 2021/01/12
- 21/26: commencement: binutils-mesboot0: Support ARM.,
guix-commits <=
- 20/26: commencement: sed-mesboot0: Support ARM., guix-commits, 2021/01/12
- 23/26: commencement: mesboot-headers: Support ARM., guix-commits, 2021/01/12
- 24/26: commencement: gawk-mesboot: Support ARM., guix-commits, 2021/01/12
- 26/26: commencement: gcc-mesboot0: Support ARM., guix-commits, 2021/01/12
- 22/26: commencement: gcc-core-mesboot0: Support ARM., guix-commits, 2021/01/12