[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
177/207: gnu: mes-boot: Cleanup.
From: |
Jan Nieuwenhuizen |
Subject: |
177/207: gnu: mes-boot: Cleanup. |
Date: |
Sat, 8 Sep 2018 13:26:26 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit f976298c1cb3833c6d9c6870c588e285a1a3e052
Author: Jan Nieuwenhuizen <address@hidden>
Date: Mon Sep 3 10:58:44 2018 +0200
gnu: mes-boot: Cleanup.
* gnu/packages/commencement.scm (mes-boot): Cleanup.
---
gnu/packages/commencement.scm | 211 ++++++++++++++++++++++--------------------
1 file changed, 110 insertions(+), 101 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 486ede3..e0e43f0 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -173,7 +173,8 @@
(setenv "PREFIX" out)
(setenv "MES_PREFIX" "../mes-source")
(setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed")
- (setenv "MES_SEED" "../mes-seed"))))
+ (setenv "MES_SEED" "../mes-seed")
+ #t)))
(replace 'build
(lambda _
(invoke "sh" "build.sh")))
@@ -202,106 +203,114 @@
"0dlcqmchhl57nh7f0v6qb1kkbi7zbs3b185hcqv57fhb60b7rgcq")))))))
(define-public mes-boot
- (let ((version "0.17")
- (revision "0")
- (commit #f))
- (package-with-bootstrap-guile
- (package
- (inherit mes)
- (source (package-source mes-boot0))
- (name "mes-boot")
- (inputs '())
- (propagated-inputs '())
- (native-inputs
- `(("mescc-tools" ,mescc-tools-boot)
- ("nyacc-source" ,(package-source nyacc-boot))
-
- ("coreutils" , %bootstrap-coreutils&co)
- ("mes-seed" ,%mes-seed)
- ,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile
- `(("guile" ,%bootstrap-guile)
- ("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43;
cherry-pick
- '())))
- (arguments
- `(#:implicit-inputs? #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* (#: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")))))))))))
+ (package-with-bootstrap-guile
+ (package
+ (inherit mes)
+ (source (package-source mes-boot0))
+ (name "mes-boot")
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("mescc-tools" ,mescc-tools-boot)
+ ("nyacc-source" ,(package-source nyacc-boot))
+
+ ("coreutils" , %bootstrap-coreutils&co)
+ ("mes-seed" ,%mes-seed)
+ ,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile
+ `(("guile" ,%bootstrap-guile)
+ ("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; cherry-pick
+ '())))
+ (arguments
+ `(#:implicit-inputs? #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* (#: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")))
+ (with-directory-excursion ".."
+ (and
+ (mkdir-p "nyacc-source")
+ (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
+ (mkdir-p "mes-seed")
+ (invoke "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
+ (or (not srfi-43)
+ (and (mkdir-p "srfi")
+ (copy-file srfi-43 "srfi/srfi-43.scm")
+ #t)))))))
+ (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" ".")
+ (invoke "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")
+ #t)))
+ (replace 'build
+ (lambda _
+ (invoke "sh" "build.sh")))
+ (replace 'check
+ (lambda _
+ (or ,%fake-bootstrap? ; check takes ~15min, skip when faking
+ (and
+ (setenv "MES_ARENA" "100000000")
+ (setenv "DIFF" "sh scripts/diff.scm")
+ (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
+ (invoke "sh" "-x" "build-aux/test.sh"
"scaffold/tests/63-struct-cell")
+ (invoke "sh" "-x" "check.sh")))))
+ (replace 'install
+ (lambda _
+ (invoke "sh" "install.sh"))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("share/mes/include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("share/mes/lib"))))))))
(define-public tcc-boot0
(let ((version "0.9.26")
- 172/207: copy-linux-headers: Update for glibc-2.16.0., (continued)
- 172/207: copy-linux-headers: Update for glibc-2.16.0., Jan Nieuwenhuizen, 2018/09/08
- 141/207: gnu: Add %bootstrap-diffutils., Jan Nieuwenhuizen, 2018/09/08
- 199/207: gnu: diffutils-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 93/207: gnu: Add tcc-boot 0.9.27., Jan Nieuwenhuizen, 2018/09/08
- 187/207: gnu: make-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 154/207: Revert "gnu: Add %bootstrap-diffutils.", Jan Nieuwenhuizen, 2018/09/08
- 181/207: gnu: diffutils-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 66/207: gnu: binutils-boot: Update to 2.30., Jan Nieuwenhuizen, 2018/09/08
- 203/207: gnu: glibc-mesboot: Drop obsolete sun rpc support., Jan Nieuwenhuizen, 2018/09/08
- 157/207: Revert "gnu: Add %make-static, %make-static-stripped, %make-bootstrap-tarball.", Jan Nieuwenhuizen, 2018/09/08
- 177/207: gnu: mes-boot: Cleanup.,
Jan Nieuwenhuizen <=
- 123/207: gnu: binutils-mesboot0: Revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 120/207: gnu: mes-boot: Update to 0.16.1; revise dependencies., Jan Nieuwenhuizen, 2018/09/08
- 171/207: %bootstrap-linux-libre-headers: Update, Jan Nieuwenhuizen, 2018/09/08
- 158/207: gnu: Add make-mesboot0 3.80, Jan Nieuwenhuizen, 2018/09/08
- 198/207: gnu: Add gcc-mesboot-4.9.4., Jan Nieuwenhuizen, 2018/09/08
- 205/207: gnu: perl-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 183/207: gnu: gcc-core-mesboot: Cleanup., Jan Nieuwenhuizen, 2018/09/08
- 207/207: gnu: bison-boot0: Remove bootstrap leaks., Jan Nieuwenhuizen, 2018/09/08
- 197/207: Oops, libstdc++ build fixes WIP, Jan Nieuwenhuizen, 2018/09/08
- 89/207: gnu: %tinycc-seed: Update for mes 0.16., Jan Nieuwenhuizen, 2018/09/08