[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
135/211: gnu: mes-boot: Use gnu-build-system.
From: |
Jan Nieuwenhuizen |
Subject: |
135/211: gnu: mes-boot: Use gnu-build-system. |
Date: |
Sat, 8 Sep 2018 11:09:43 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 2309ad8cd0d59c580a83c60d353a67d7713d0ae9
Author: Jan Nieuwenhuizen <address@hidden>
Date: Thu Aug 23 17:53:35 2018 +0200
gnu: mes-boot: Use gnu-build-system.
* gnu/packages/mes.scm (mes-boot): Use gnu-build-system.
---
gnu/packages/mes.scm | 157 +++++++++++++++++++++++++--------------------------
1 file changed, 78 insertions(+), 79 deletions(-)
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index f467667..5ca693b 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -220,7 +220,7 @@ hex2 linker.")
(sha256
(base32
"1j32x4zqy2cqjlg9m35f2411mwac2b0p5ch4hm99gddmfbxzgyhg")))))
- (build-system trivial-build-system)
+ (build-system gnu-build-system)
(supported-systems '("i686-linux" "x86_64-linux"))
(native-inputs
`(("coreutils" , %bootstrap-coreutils&co)
@@ -232,84 +232,83 @@ hex2 linker.")
("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43;
cherry-pick
'())))
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
- (guile (assoc-ref %build-inputs "guile"))
- (srfi-43 (assoc-ref %build-inputs "srfi-43"))
- (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
- (source (assoc-ref %build-inputs "source"))
- (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (mes-seed (assoc-ref %build-inputs "mes-seed"))
- (out (assoc-ref %outputs "out"))
- (dir (getcwd)))
-
- ;; unpack
- (setenv "PATH" (string-append
- coreutils "/bin"
- (if guile (string-append ":" guile "/bin") "")
- ":" mescc-tools "/bin"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
- (mkdir-p "source")
- (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
- (mkdir-p "nyacc-source")
- (system* "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
- (mkdir-p "mes-seed")
- (system* "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
- (when srfi-43
- (mkdir-p "srfi")
- (system* "cp" srfi-43 "srfi/srfi-43.scm"))
- (chdir "source")
-
- ;; configure
- (setenv "prefix" out)
- ;; (setenv "V" "2")
- (system* "bash" "-x" "configure.sh")
-
- (if ,%fake-bootstrap?
- (begin ; Cheat using Guile+Nyacc+MesCC; ~30 times faster
- (setenv "MES" "guile")
- (setenv "GUILE_AUTO_COMPILE" "1")
- (setenv "GUILE_LOAD_COMPILED_PATH"
- (string-append guile "/lib/guile/2.0/ccache"))
- (setenv "GUILE_LOAD_PATH"
- (string-append (string-append dir
"/nyacc-source/module")
- ":" dir
- ":" guile "/share/guile/2.0/"))
- ;; these fail with guile-2.0
- (when srfi-43
- (delete-file "tests/srfi-9.test")
- (delete-file "tests/srfi-43.test"))
-
- ;; give auto-compile a home -- massive speed-up
- (mkdir-p "/tmp/home")
- (setenv "HOME" "/tmp/home"))
-
- (begin ; True bootstrap build Mes+Nyacc+MesCC
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (setenv "MES" "src/mes")))
-
- (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
- (setenv "MESCC" "scripts/mescc")
- (setenv "MES_MODULEDIR" "module")
-
- (and
- ;; build
- (zero? (system* "sh" "build.sh"))
-
- ;; check
- (unless ,%fake-bootstrap? ; check takes ~15min, skip when faking
- (setenv "MES_ARENA" "100000000")
- (zero? (system* "sh" "build-aux/test.sh"))
- (zero? (system* "sh" "build-aux/test.sh"
"scaffold/tests/63-struct-cell"))
- (zero? (system* "sh" "check.sh")))
-
- ;; install
- (setenv "SHELL" (string-append coreutils "/bin/bash"))
- (zero? (system* "sh" "install.sh")))))))
+ `(#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (srfi-43 (assoc-ref %build-inputs "srfi-43"))
+ (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
+ (mes-seed (assoc-ref %build-inputs "mes-seed")))
+ (setenv "PATH" (string-append
+ coreutils "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (with-directory-excursion ".."
+ (and
+ (mkdir-p "nyacc-source")
+ (zero? (system* "tar" "--strip=1" "-C" "nyacc-source"
"-xvf" nyacc-source))
+ (mkdir-p "mes-seed")
+ (zero? (system* "tar" "--strip=1" "-C" "mes-seed" "-xvf"
mes-seed))
+ (or (not srfi-43)
+ (and (mkdir-p "srfi")
+ (zero? (system* "cp" srfi-43
"srfi/srfi-43.scm")))))))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out"))
+ (dir (with-directory-excursion ".." (getcwd)))
+ (coreutils (assoc-ref %build-inputs "coreutils"))
+ (guile (assoc-ref %build-inputs "guile"))
+ (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
+ (srfi-43 (assoc-ref %build-inputs "srfi-43")))
+ (setenv "PATH" (string-append
+ coreutils "/bin"
+ (if guile (string-append ":" guile "/bin")
"")
+ ":" mescc-tools "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (setenv "SHELL" (string-append coreutils "/bin/bash"))
+ (setenv "srcdir" ".")
+ (zero? (system* "bash" "-x" "configure.sh"
+ (string-append "--prefix=" out)))
+ (if ,%fake-bootstrap?
+ (begin ; Cheat using Guile+Nyacc+MesCC; ~30 times faster
+ (setenv "MES" "guile")
+ (setenv "GUILE_AUTO_COMPILE" "1")
+ (setenv "GUILE_LOAD_COMPILED_PATH"
+ (string-append guile "/lib/guile/2.0/ccache"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append (string-append dir
"/nyacc-source/module")
+ ":" dir
+ ":" guile "/share/guile/2.0/"))
+ ;; these fail with guile-2.0
+ (when srfi-43
+ (delete-file "tests/srfi-9.test")
+ (delete-file "tests/srfi-43.test"))
+ ;; give auto-compile a home -- massive speed-up
+ (mkdir-p "/tmp/home")
+ (setenv "HOME" "/tmp/home"))
+ (begin ; True bootstrap build Mes+Nyacc+MesCC
+ (symlink (string-append "../nyacc-source/module")
"nyacc")
+ (setenv "GUILE_LOAD_PATH" "nyacc")
+ (setenv "MES" "src/mes")))
+ (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
+ (setenv "MESCC" "scripts/mescc")
+ (setenv "MES_MODULEDIR" "module"))))
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "build.sh"))))
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (or ,%fake-bootstrap? ; check takes ~15min, skip when faking
+ (and
+ (setenv "MES_ARENA" "100000000")
+ (setenv "DIFF" "sh scripts/diff.scm")
+ (zero? (system* "sh" "-x" "build-aux/test.sh"
"scaffold/tests/t"))
+ (zero? (system* "sh" "-x" "build-aux/test.sh"
"scaffold/tests/63-struct-cell"))
+ (zero? (system* "sh" "-x" "check.sh"))))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "install.sh")))))))
(description
"GNU Mes [Maxwell Equations of Software] aims to create full source
bootstrapping for GuixSD. It consists of a mutual self-hosting [close to
- 21/211: gnu: Update mes-boot: Mescc-tools support: char foo[BAR] = {'a', 'b', 'c'}., (continued)
- 21/211: gnu: Update mes-boot: Mescc-tools support: char foo[BAR] = {'a', 'b', 'c'}., Jan Nieuwenhuizen, 2018/09/08
- 22/211: gnu: Update mescc-tools-boot: bootstrap from .M1 sources: remove MORTAL SIN., Jan Nieuwenhuizen, 2018/09/08
- 20/211: gnu: mes-boot: Update mes-boot, mes-seed: Mescc-tools support., Jan Nieuwenhuizen, 2018/09/08
- 07/211: Revert "use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(", Jan Nieuwenhuizen, 2018/09/08
- 03/211: gnu: Add mes-boot., Jan Nieuwenhuizen, 2018/09/08
- 18/211: gnu: mescc-tools-boot: Use bootstrap Guile and simplify., Jan Nieuwenhuizen, 2018/09/08
- 11/211: tcc-boot: bump tinycc-seed: GNU Gcc support: Add ferror., Jan Nieuwenhuizen, 2018/09/08
- 06/211: use %bootstrap-guile -- still guile-2.2 in bag-with-origins :-(, Jan Nieuwenhuizen, 2018/09/08
- 05/211: gnu: Add tcc-boot., Jan Nieuwenhuizen, 2018/09/08
- 117/211: gnu: Remove gcc-mesboot-4.1.0., Jan Nieuwenhuizen, 2018/09/08
- 135/211: gnu: mes-boot: Use gnu-build-system.,
Jan Nieuwenhuizen <=
- 122/211: gnu: tcc-boot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 132/211: gnu: tcc-boot0: Update for mes 0.17., Jan Nieuwenhuizen, 2018/09/08
- 121/211: gnu: tcc-boot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 113/211: gnu: binutils-mesboot0: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/09/08
- 131/211: gnu: mes: Update to 0.17., Jan Nieuwenhuizen, 2018/09/08
- 118/211: gnu: mescc-tools-boot: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 126/211: gnu: gcc-mesboot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 106/211: Revert: gnu: binutils-boot0: Inject AR, LD from bootstrap-binaries., Jan Nieuwenhuizen, 2018/09/08
- 102/211: gnu: gcc-core-mesboot: Rename from gcc-core-boot., Jan Nieuwenhuizen, 2018/09/08
- 99/211: gnu: Remove binutils-boot0-cheat., Jan Nieuwenhuizen, 2018/09/08