[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/20: commencement: Add mes-boot-next.
From: |
guix-commits |
Subject: |
11/20: commencement: Add mes-boot-next. |
Date: |
Sun, 20 Dec 2020 04:03:16 -0500 (EST) |
janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.
commit e2546a92e031f49329ce00fe76a86f05c91033ea
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Dec 15 19:39:24 2020 +0100
commencement: Add mes-boot-next.
* gnu/packages/commencement.scm (mes-boot-next): New variable.
---
gnu/packages/commencement.scm | 80 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 7771ee6..2c06025 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -542,6 +542,86 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(separator #f)
(files '("")))))))
+(define-public mes-boot-next
+ (package
+ (inherit mes-next)
+ (name "mes-boot-next")
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("nyacc-source" ,(origin (inherit (package-source nyacc-1.00.2))
+ (snippet #f)))
+ ("mes" ,%bootstrap-mes-rewired-next)
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ,@(%boot-gash-inputs)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f
+ #:guile ,%bootstrap-guile
+ #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda _
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
+ (with-directory-excursion ".."
+ (invoke "tar" "-xvf" nyacc-source)))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out"))
+ (gash (assoc-ref %build-inputs "bash"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (dir (with-directory-excursion ".." (getcwd))))
+ (setenv "AR" (string-append "gash " (getcwd) "/scripts/mesar"))
+ (setenv "BASH" (string-append gash "/bin/bash"))
+ (setenv "CC" (string-append mes "/bin/mescc"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append
+ mes "/share/mes/module"
+ ":" dir "/nyacc-1.00.2/module"))
+ (invoke "gash" "configure.sh"
+ (string-append "--prefix=" out)
+ (string-append ,(match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ "--host=arm-linux")
+ ((or "i686-linux" "x86_64-linux")
+ "--host=i686-linux-gnu")))))))
+ (replace 'build
+ (lambda _
+ (invoke "sh" "bootstrap.sh")))
+ (delete 'check)
+ (replace 'install
+ (lambda _
+ (substitute* "install.sh" ; show some progress
+ ((" -xf") " -xvf")
+ (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+ (string-append space "echo '" cmd "'\n"
+ space cmd "\n")))
+ (invoke "sh" "install.sh")
+ ;; Keep ASCII output, for friendlier comparison and bisection
+ (let* ((out (assoc-ref %outputs "out"))
+ (cache (string-append out "/lib/cache")))
+ (define (objects-in-dir dir)
+ (find-files dir
+ (lambda (name stat)
+ (and (equal? (dirname name) dir)
+ (or (string-suffix? ".o" name)
+ (string-suffix? ".s" name))))))
+ (for-each (lambda (x) (install-file x cache))
+ (append (objects-in-dir ".")
+ (objects-in-dir "mescc-lib"))))
+ #t)))))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib")))
+ (search-path-specification
+ (variable "MES_PREFIX")
+ (separator #f)
+ (files '("")))))))
(define tcc-boot0
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
- 10/20: commencement: Add bootstrap-mes-rewired-next., (continued)
- 10/20: commencement: Add bootstrap-mes-rewired-next., guix-commits, 2020/12/20
- 13/20: REMOVEME Use %bootstrap-guile for tcc-boot0-next., guix-commits, 2020/12/20
- 15/20: REMOVEME Use mes-next for tcc-boot0-next., guix-commits, 2020/12/20
- 16/20: REMOVEME: Use coreutils&co, bash instead of gash., guix-commits, 2020/12/20
- 17/20: commencement: Add make-mesboot0-next., guix-commits, 2020/12/20
- 03/20: gnu: mes: Update to nyacc-1.00.2., guix-commits, 2020/12/20
- 09/20: commencement: gash-boot: Build fix for ARM., guix-commits, 2020/12/20
- 20/20: Revert "tcc-boot0-next: stop for aarch comparison", guix-commits, 2020/12/20
- 12/20: commencement: Add tcc-boot0-next., guix-commits, 2020/12/20
- 04/20: gnu: Add mes-next., guix-commits, 2020/12/20
- 11/20: commencement: Add mes-boot-next.,
guix-commits <=
- 14/20: commencement: Add tcc-boot-next., guix-commits, 2020/12/20
- 18/20: tcc-boot0-next: stop for aarch comparison, guix-commits, 2020/12/20
- 19/20: tcc-boot-next, guix-commits, 2020/12/20