[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/54: bootstrap: mes-boot: Scheme-only bootstrap. WIP
From: |
guix-commits |
Subject: |
14/54: bootstrap: mes-boot: Scheme-only bootstrap. WIP |
Date: |
Fri, 22 Nov 2019 18:17:48 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 9fe90f2814bedeb42352f68540fdfba121b4fa8f
Author: Jan Nieuwenhuizen <address@hidden>
Date: Thu Jan 3 21:50:10 2019 +0100
bootstrap: mes-boot: Scheme-only bootstrap. WIP
* gnu/packages/commencement.scm (mes-boot): Scheme-only bootstrap.
---
gnu/packages/commencement.scm | 79 +++++++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 36 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index bae8446..3258696 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -154,64 +154,71 @@
(package
(inherit mes)
(name "mes-boot")
- (version "0.19")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mes/"
- "mes-" version ".tar.gz"))
- (sha256
- (base32
- "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
+ (version "0.20-48-g272fd71e2")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/mes/"
+ "mes-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1rnv1ygbh26ncq86422zam1wk10s9qkn2rsw9g3bqayb8d674bxl")))))
(inputs '())
(propagated-inputs '())
(native-inputs
- `(("mescc-tools" ,%bootstrap-mescc-tools)
+ `(("bash" , %bootstrap-gash)
+ ("bootstrap-mes" ,%bootstrap-mes)
+ ("guile" ,%bootstrap-guile)
+ ("mescc-tools" ,%bootstrap-mescc-tools)
("nyacc-source" ,(bootstrap-origin
- (package-source nyacc-0.86)))
-
- ("coreutils" , %bootstrap-coreutils&co)
- ("bootstrap-mes" ,%bootstrap-mes)))
+ (package-source nyacc-boot)))))
(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"))
- (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
(with-directory-excursion ".."
- (mkdir-p "nyacc-source")
- (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
- (symlink (string-append bootstrap-mes "/share/mes/lib")
"mes-seed"))
- #t)))
+ (invoke "tar" "-xvf" nyacc-source)))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref %outputs "out")))
+ (let ((out (assoc-ref %outputs "out"))
+ (gash (assoc-ref %build-inputs "bash"))
+ (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))
+ (dir (with-directory-excursion ".." (getcwd))))
+ (setenv "AR" (string-append "gash " bootstrap-mes "/bin/mesar"))
+ (setenv "BASH" (string-append gash "/bin/gash"))
+ (setenv "CC" (string-append bootstrap-mes "/bin/mes"
+ " -e main"
+ " " bootstrap-mes "/bin/mescc.scm"
+ " -- "))
(setenv "GUILE" "mes")
- (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (invoke "bash" "configure.sh"
- (string-append "--prefix=" out)))))
- (replace 'build
- (lambda _
- (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
- (setenv "MES_PREFIX" (string-append mes "/share/mes"))
+ (setenv "GUILE_EFFECTIVE_VERSION" "2.0")
+ (setenv "GUILE_LOAD_PATH"
+ (string-append bootstrap-mes "/share/mes/module"
+ ":" dir "/nyacc-0.99.0/module"))
+ (setenv "MES_PREFIX" (string-append bootstrap-mes "/share/mes"))
(setenv "MES_ARENA" "100000000")
(setenv "MES_MAX_ARENA" "100000000")
(setenv "MES_STACK" "10000000")
- (invoke "sh" "bootstrap.sh"))))
- (replace 'check
+ (invoke "gash" "configure.sh"
+ (string-append "--prefix=" out)
+ (string-append "--host=i686-linux-gnu")))))
+ (replace 'build
(lambda _
- (setenv "DIFF" "sh scripts/diff.scm")
- ;; fail fast tests
- ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
- ;; (invoke "sh" "-x" "build-aux/test.sh"
"scaffold/tests/63-struct-cell")
- (invoke "sh" "check.sh")))
+ (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"))))))
(native-search-paths
;; Use the language-specific variables rather than 'CPATH' because they
- 07/54: gnu: mes: Update to 0.21 WIP, (continued)
- 07/54: gnu: mes: Update to 0.21 WIP, guix-commits, 2019/11/22
- 04/54: bootstrap: Add gash-core-utils-boot., guix-commits, 2019/11/22
- 03/54: bootstrap: Add gash-boot., guix-commits, 2019/11/22
- 10/54: bootstrap: bootstrap-mescc-tools: Update for mescc-tools-0.6.1., guix-commits, 2019/11/22
- 09/54: bootstrap: mes-minimal: Update for mes-0.20., guix-commits, 2019/11/22
- 08/54: bootstrap: mescc-tools-static: Update for mescc-tools-0.6.1., guix-commits, 2019/11/22
- 06/54: bootstrap: Add %bootstrap-gash. WIP, guix-commits, 2019/11/22
- 12/54: bootstrap: nyacc-boot. WIP, guix-commits, 2019/11/22
- 13/54: bootstrap-gash-rewire? WIP, guix-commits, 2019/11/22
- 15/54: bootstrap: tcc-boot0: Scheme-only bootstrap. WIP, guix-commits, 2019/11/22
- 14/54: bootstrap: mes-boot: Scheme-only bootstrap. WIP,
guix-commits <=
- 11/54: bootstrap: bootstrap-mes: Update for mes-0.21. WIP, guix-commits, 2019/11/22
- 16/54: bootstrap: Add gzip-mesboot0., guix-commits, 2019/11/22
- 19/54: bootstrap: Add bash-mesboot0., guix-commits, 2019/11/22
- 17/54: bootstrap: make-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/22
- 22/54: bootstrap: Add patch-mesboot0., guix-commits, 2019/11/22
- 24/54: bootstrap: binutils-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/22
- 31/54: bootstrap: gcc-mesboot0: Scheme-only bootstrap., guix-commits, 2019/11/22
- 23/54: bootstrap: Add sed-mesboot0., guix-commits, 2019/11/22
- 21/54: bootstrap: diffuils-mesboot: Scheme-only bootstrap., guix-commits, 2019/11/22
- 18/54: bootstrap: Add bzip2-mesboot0., guix-commits, 2019/11/22