[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
25/26: commencement: glibc-mesboot0: Support ARM.
From: |
guix-commits |
Subject: |
25/26: commencement: glibc-mesboot0: Support ARM. |
Date: |
Tue, 12 Jan 2021 13:49:18 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit 20452cd312d39f376ab2f657e23c556815398795
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Mon Dec 28 15:53:19 2020 +0100
commencement: glibc-mesboot0: Support ARM.
* gnu/packages/commencement.scm (glibc-mesboot0)[supported-systems]: Add
armhf-linux, aarch64-linux.
[arguments]: Cater for armhf-linux, aarch64-linux.
---
gnu/packages/commencement.scm | 187 ++++++++++++++++++++++--------------------
1 file changed, 97 insertions(+), 90 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 09c3bd1..c7938dd 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1489,97 +1489,104 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
;; gcc.
- (package
- (inherit glibc)
- (name "glibc-mesboot0")
- (version "2.2.5")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/glibc/glibc-"
- version
- ".tar.gz"))
- ;; Patch needs XZ
- ;; (patches (search-patches "glibc-boot-2.2.5.patch"))
- (sha256
- (base32
- "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
- (supported-systems '("i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch"))
- ("system-patch" ,(search-patch
"glibc-bootstrap-system-2.2.5.patch"))
- ("headers" ,mesboot-headers)
- ,@(%boot-mesboot-core-inputs)))
- (outputs '("out"))
- (arguments
- `(#:implicit-inputs? #f
- #:guile ,%bootstrap-guile
- #:tests? #f
- #:strip-binaries? #f
- #:validate-runpath? #f ; no dynamic executables
- #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
- #:make-flags (list (string-append
- "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
- #:configure-flags
- (let ((out (assoc-ref %outputs "out"))
- (headers (assoc-ref %build-inputs "headers")))
- `("--disable-shared"
- "--enable-static"
- "--disable-sanity-checks"
- "--build=i686-unknown-linux-gnu"
- "--host=i686-unknown-linux-gnu"
- ,(string-append "--with-headers=" headers "/include")
- "--enable-static-nss"
- "--without-__thread"
- "--without-cvs"
- "--without-gd"
- "--without-tls"
- ,(string-append "--prefix=" out)))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'apply-boot-patch
- (lambda* (#:key inputs #:allow-other-keys)
- (and (let ((patch (assoc-ref inputs "boot-patch")))
- (invoke "patch" "--force" "-p1" "-i" patch))
- (let ((patch (assoc-ref inputs "system-patch")))
- (invoke "patch" "--force" "-p1" "-i" patch)))))
- (add-before 'configure 'setenv
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash"))
- (gcc (assoc-ref %build-inputs "gcc"))
- (headers (assoc-ref %build-inputs "headers"))
- (cppflags (string-append
- ;;" -D __STDC__=1"
- " -D MES_BOOTSTRAP=1"
- " -D BOOTSTRAP_GLIBC=1"))
- (cflags (string-append " -L " (getcwd))))
- (setenv "CONFIG_SHELL" shell)
- (setenv "SHELL" shell)
- (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
- (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
- #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 invoke "./configure" configure-flags)))
- (add-after 'configure 'fixup-configure
- (lambda _
- (let* ((out (assoc-ref %outputs "out"))
- (bash (assoc-ref %build-inputs "bash"))
- (shell (string-append bash "/bin/bash")))
- (substitute* "config.make"
- (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
- (substitute* "config.make"
- (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
- (("BASH = ") (string-append
- "SHELL = " shell "
+ (let ((triplet (match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-unknown-linux-gnu")
+ ((or "i686-linux" "x86_64-linux")
+ "i686-unknown-linux-gnu"))))
+ (package
+ (inherit glibc)
+ (name "glibc-mesboot0")
+ (version "2.2.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ ;; Patch needs XZ
+ ;; (patches (search-patches "glibc-boot-2.2.5.patch"))
+ (sha256
+ (base32
+ "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
+ (supported-systems '("armhf-linux" "aarch64-linux"
+ "i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch"))
+ ("system-patch" ,(search-patch
"glibc-bootstrap-system-2.2.5.patch"))
+ ("headers" ,mesboot-headers)
+ ,@(%boot-mesboot-core-inputs)))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f
+ #:strip-binaries? #f
+ #:validate-runpath? #f ; no dynamic executables
+ #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
+ #:make-flags (list (string-append
+ "SHELL="
+ (assoc-ref %build-inputs "bash")
+ "/bin/sh"))
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ (list
+ "--disable-shared"
+ "--enable-static"
+ "--disable-sanity-checks"
+ (string-append "--build=" ,triplet)
+ (string-append "--host=" ,triplet)
+ (string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--without-__thread"
+ "--without-cvs"
+ "--without-gd"
+ "--without-tls"
+ (string-append "--prefix=" out)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'apply-boot-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (and (let ((patch (assoc-ref inputs "boot-patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch))
+ (let ((patch (assoc-ref inputs "system-patch")))
+ (invoke "patch" "--force" "-p1" "-i" patch)))))
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (headers (assoc-ref %build-inputs "headers"))
+ (cppflags (string-append
+ ;;" -D __STDC__=1"
+ " -D MES_BOOTSTRAP=1"
+ " -D BOOTSTRAP_GLIBC=1"))
+ (cflags (string-append " -L " (getcwd))))
+ (setenv "CONFIG_SHELL" shell)
+ (setenv "SHELL" shell)
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+ #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 invoke "./configure" configure-flags)))
+ (add-after 'configure 'fixup-configure
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (shell (string-append bash "/bin/bash")))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
+ (substitute* "config.make"
+ (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
+ (("BASH = ") (string-append
+ "SHELL = " shell "
BASH = ")))
- #t))))))))
+ #t)))))))))
(define gcc-mesboot0
(package
- 07/26: DRAFT bootstrap: %bootstrap-mescc-tools: Support ARM., (continued)
- 07/26: DRAFT bootstrap: %bootstrap-mescc-tools: Support ARM., guix-commits, 2021/01/12
- 15/26: commencement: bzip2-mesboot: Support ARM., guix-commits, 2021/01/12
- 03/26: gnu: mes: Update to nyacc-1.00.2., guix-commits, 2021/01/12
- 13/26: commencement: gzip-mesboot: Support ARM., guix-commits, 2021/01/12
- 19/26: commencement: patch-mesboot: Support ARM., guix-commits, 2021/01/12
- 04/26: DRAFT gnu: mes: Update to 0.22-123-g9cd754498., guix-commits, 2021/01/12
- 06/26: bootstrap: mes-minimal: Support ARM, update for mes-0.23., guix-commits, 2021/01/12
- 11/26: commencement: mes-boot: Support ARM., guix-commits, 2021/01/12
- 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 <=
- 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, 2021/01/12
- 20/26: commencement: sed-mesboot0: Support ARM., guix-commits, 2021/01/12
- 23/26: commencement: mesboot-headers: Support ARM., guix-commits, 2021/01/12