mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 20:49:29 -05:00
bootstrap: Remove development hacks.
* gnu/packages/commencement.scm (%fake-bootstrap?): Remove. Update users to always keep true bootstrap; i.e., do not use %bootstrap-guile. (mes-boot0): Remove. Update users. (nyacc-boot): Likewise.
This commit is contained in:
parent
b3bf38a560
commit
9c14fd0770
1 changed files with 7 additions and 106 deletions
|
@ -81,73 +81,19 @@ (define-module (gnu packages commencement)
|
||||||
;;;
|
;;;
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(define %fake-bootstrap? #f) ; cheat using Guile (instead of Mes) in MesCC
|
|
||||||
; for speed-up?
|
|
||||||
|
|
||||||
(define mes-boot0
|
|
||||||
(let ((version "0.18")
|
|
||||||
(revision "0")
|
|
||||||
(commit #f))
|
|
||||||
(package
|
|
||||||
(inherit mes)
|
|
||||||
(name "mes-boot0")
|
|
||||||
(version (if commit (string-append version "-" revision "." (string-take commit 7))
|
|
||||||
version))
|
|
||||||
(source (if commit
|
|
||||||
(origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append "https://gitlab.com/janneke/mes"
|
|
||||||
"/-/archive/" commit
|
|
||||||
"/mes-" commit ".tar.gz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"1whbzahv16bwhavr2azqli0dcbk29p9rsqfbjl69la135z8vgdhx")))
|
|
||||||
(package-source mes)))
|
|
||||||
(native-inputs '())
|
|
||||||
(propagated-inputs '()))))
|
|
||||||
|
|
||||||
(define nyacc-boot
|
|
||||||
(let ((version "0.86.0")
|
|
||||||
(revision "0")
|
|
||||||
(commit #f))
|
|
||||||
(package
|
|
||||||
(inherit nyacc)
|
|
||||||
(name "nyacc-boot")
|
|
||||||
(version
|
|
||||||
(if commit
|
|
||||||
(string-append version "-" revision "." (string-take commit 7))
|
|
||||||
version))
|
|
||||||
(source
|
|
||||||
(if commit
|
|
||||||
(origin
|
|
||||||
(method url-fetch)
|
|
||||||
(uri (string-append "https://gitlab.com/janneke/nyacc"
|
|
||||||
"/-/archive/" commit
|
|
||||||
"/nyacc-" commit ".tar.gz"))
|
|
||||||
(sha256
|
|
||||||
(base32
|
|
||||||
"0dlcqmchhl57nh7f0v6qb1kkbi7zbs3b185hcqv57fhb60b7rgcq")))
|
|
||||||
(package-source nyacc))))))
|
|
||||||
|
|
||||||
(define mes-boot
|
(define mes-boot
|
||||||
(package-with-bootstrap-guile
|
(package-with-bootstrap-guile
|
||||||
(package
|
(package
|
||||||
(inherit mes)
|
(inherit mes)
|
||||||
(version (package-version mes-boot0))
|
|
||||||
(source (package-source mes-boot0))
|
|
||||||
(name "mes-boot")
|
(name "mes-boot")
|
||||||
(inputs '())
|
(inputs '())
|
||||||
(propagated-inputs '())
|
(propagated-inputs '())
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("mescc-tools" ,%bootstrap-mescc-tools)
|
`(("mescc-tools" ,%bootstrap-mescc-tools)
|
||||||
("nyacc-source" ,(package-source nyacc-boot))
|
("nyacc-source" ,(package-source nyacc))
|
||||||
|
|
||||||
("coreutils" , %bootstrap-coreutils&co)
|
("coreutils" , %bootstrap-coreutils&co)
|
||||||
("bootstrap-mes" ,%bootstrap-mes)
|
("bootstrap-mes" ,%bootstrap-mes)))
|
||||||
,@(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
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:guile ,%bootstrap-guile
|
#:guile ,%bootstrap-guile
|
||||||
|
@ -181,35 +127,12 @@ (define mes-boot
|
||||||
(string-append "--prefix=" out))
|
(string-append "--prefix=" out))
|
||||||
(setenv "MES" "src/mes")
|
(setenv "MES" "src/mes")
|
||||||
(setenv "MESCC" "scripts/mescc")
|
(setenv "MESCC" "scripts/mescc")
|
||||||
(when ,%fake-bootstrap? ; Cheat using Guile+Nyacc+MesCC; ~30 times faster
|
|
||||||
(let ((dir (with-directory-excursion ".." (getcwd)))
|
|
||||||
(guile (assoc-ref %build-inputs "guile"))
|
|
||||||
(srfi-43 (assoc-ref %build-inputs "srfi-43")))
|
|
||||||
(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")))
|
|
||||||
#t)))
|
#t)))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda _
|
(lambda _
|
||||||
(invoke "sh" "build.sh")))
|
(invoke "sh" "build.sh")))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda _
|
||||||
(when ,%fake-bootstrap?
|
|
||||||
;; break with guile-2.0
|
|
||||||
(delete-file "scaffold/boot/50-primitive-load.scm")
|
|
||||||
(delete-file "scaffold/boot/51-module.scm"))
|
|
||||||
(and
|
(and
|
||||||
(setenv "MES_ARENA" "100000000")
|
(setenv "MES_ARENA" "100000000")
|
||||||
(setenv "DIFF" "sh scripts/diff.scm")
|
(setenv "DIFF" "sh scripts/diff.scm")
|
||||||
|
@ -263,14 +186,10 @@ (define tcc-boot0
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("mes" ,mes-boot)
|
`(("mes" ,mes-boot)
|
||||||
("mescc-tools" ,%bootstrap-mescc-tools)
|
("mescc-tools" ,%bootstrap-mescc-tools)
|
||||||
("nyacc-source" ,(package-source nyacc-boot))
|
("nyacc-source" ,(package-source nyacc))
|
||||||
|
|
||||||
("coreutils" , %bootstrap-coreutils&co)
|
("coreutils" , %bootstrap-coreutils&co)
|
||||||
("bootstrap-mes" ,%bootstrap-mes)
|
("bootstrap-mes" ,%bootstrap-mes)))
|
||||||
,@(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
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:guile ,%bootstrap-guile
|
#:guile ,%bootstrap-guile
|
||||||
|
@ -325,27 +244,9 @@ (define tcc-boot0
|
||||||
(setenv "PREPROCESS" "1")
|
(setenv "PREPROCESS" "1")
|
||||||
(setenv "MES_ARENA" "70000000")
|
(setenv "MES_ARENA" "70000000")
|
||||||
(setenv "MES_MAX_ARENA" "70000000")
|
(setenv "MES_MAX_ARENA" "70000000")
|
||||||
|
|
||||||
(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 dir
|
|
||||||
":" guile "/share/guile/2.0/"
|
|
||||||
":" dir "/nyacc-source/module"
|
|
||||||
":" mes "/share/mes/guile"))
|
|
||||||
|
|
||||||
;; give auto-compile a home -- massive speed-up
|
|
||||||
(mkdir-p "/tmp/home")
|
|
||||||
(setenv "HOME" "/tmp/home"))
|
|
||||||
|
|
||||||
(begin ; True bootstrap build with Mes+Nyacc+MesCC
|
|
||||||
(setenv "MES" "mes")
|
(setenv "MES" "mes")
|
||||||
(setenv "GUILE_LOAD_PATH" "nyacc")
|
(setenv "GUILE_LOAD_PATH" "nyacc")
|
||||||
(symlink (string-append "../nyacc-source/module") "nyacc")))
|
(symlink (string-append "../nyacc-source/module") "nyacc")
|
||||||
(invoke "sh" "configure"
|
(invoke "sh" "configure"
|
||||||
"--prefix=$PREFIX"
|
"--prefix=$PREFIX"
|
||||||
(string-append "--elfinterp=" interpreter)
|
(string-append "--elfinterp=" interpreter)
|
||||||
|
|
Loading…
Reference in a new issue