bootstrap: Build with %bootstrap-mes.

* gnu/packages/bootstrap.scm (%tinycc-seed): Remove.
(%bootstrap-inputs): Use %bootstrap-mes instead of %mes-seed and %tinycc-seed.
* gnu/packages/commencement.scm (mescc-tools-boot, mes-boot, tcc-boot0): Build
with %bootstrap-mes instead of %mes-seed and %tinycc-seed.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-09 19:30:11 +02:00
parent 7cbf6f1ca2
commit 1a99a9c45c
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
2 changed files with 24 additions and 64 deletions

View File

@ -51,9 +51,7 @@
%bootstrap-inputs %bootstrap-inputs
%bootstrap-mes %bootstrap-mes
%mescc-tools-seed %mescc-tools-seed
%mes-seed %srfi-43))
%srfi-43
%tinycc-seed))
;;; Commentary: ;;; Commentary:
;;; ;;;
@ -680,28 +678,6 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
(base32 (base32
"1lj7df73vxanmffmiwkhcn83r7yd9n8568nkki06bqq5zg526nyz"))))) "1lj7df73vxanmffmiwkhcn83r7yd9n8568nkki06bqq5zg526nyz")))))
(define %mes-seed
(let ((commit "057fd36735b5605fe582d6b3625f793a62922206"))
(origin
(method url-fetch)
(uri (string-append "https://gitlab.com/janneke/mes-seed"
"/-/archive/" commit
"/mes-seed-" commit ".tar.gz"))
(sha256
(base32
"0vdb4kc05a1kdpmsi8dg425d5f33kp28sgl2fi3s320pc0v4dv13")))))
(define %tinycc-seed
(let ((commit "843d47ca682617f21333b50c67851797b8c3fd04"))
(origin
(method url-fetch)
(uri (string-append "https://gitlab.com/janneke/tinycc-seed"
"/-/archive/" commit
"/tinycc-seed-" commit ".tar.gz"))
(sha256
(base32
"0599wwv30js03l1rpmvzfclq3jadzvq04pi29j45nf6fyfg5hhqb")))))
(define %srfi-43 (define %srfi-43
(origin (origin
(method url-fetch) (method url-fetch)
@ -718,9 +694,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
((or "i686-linux" "x86_64-linux") ((or "i686-linux" "x86_64-linux")
`(("linux-libre-headers" ,%bootstrap-linux-libre-headers) `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
("mescc-tools-seed" ,%mescc-tools-seed) ("mescc-tools-seed" ,%mescc-tools-seed)
("mes-seed" ,%mes-seed) ("mes" ,%bootstrap-mes)
("srfi-43" ,%srfi-43 ) ("srfi-43" ,%srfi-43 )))
("tinycc-seed" ,%tinycc-seed)))
(_ (_
`(("libc" ,%bootstrap-glibc) `(("libc" ,%bootstrap-glibc)
("gcc" ,%bootstrap-gcc) ("gcc" ,%bootstrap-gcc)

View File

@ -102,13 +102,7 @@
(sha256 (sha256
(base32 (base32
"1whbzahv16bwhavr2azqli0dcbk29p9rsqfbjl69la135z8vgdhx"))) "1whbzahv16bwhavr2azqli0dcbk29p9rsqfbjl69la135z8vgdhx")))
(origin (package-source mes)))
(method url-fetch)
(uri (string-append "mirror://gnu/mes/"
"mes-" version ".tar.gz"))
(sha256
(base32
"1dsaaqyanzsq9m5wrcd2bjhb3qd6928c9q97rg5r730pyqjwxyxf")))))
(native-inputs '()) (native-inputs '())
(propagated-inputs '())))) (propagated-inputs '()))))
@ -135,8 +129,8 @@
`(("mescc-tools-seed" ,%mescc-tools-seed) `(("mescc-tools-seed" ,%mescc-tools-seed)
("mes-source" ,(package-source mes-boot0)) ("mes-source" ,(package-source mes-boot0))
("coreutils" ,%bootstrap-coreutils&co) ("bootstrap-mes" ,%bootstrap-mes)
("mes-seed" ,%mes-seed))) ("coreutils" ,%bootstrap-coreutils&co)))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:implicit-inputs? #f `(#:implicit-inputs? #f
@ -148,7 +142,6 @@
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((coreutils (assoc-ref %build-inputs "coreutils")) (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
(mescc-tools-seed (assoc-ref %build-inputs "mescc-tools-seed")) (mescc-tools-seed (assoc-ref %build-inputs "mescc-tools-seed"))
(mes-seed (assoc-ref %build-inputs "mes-seed"))
(mes-source (assoc-ref %build-inputs "mes-source")) (mes-source (assoc-ref %build-inputs "mes-source"))
(out (assoc-ref %outputs "out"))) (out (assoc-ref %outputs "out")))
(with-directory-excursion ".." (with-directory-excursion ".."
@ -159,12 +152,11 @@
(mkdir-p "mes-source") (mkdir-p "mes-source")
(invoke "tar" "--strip=1" "-C" "mes-source" (invoke "tar" "--strip=1" "-C" "mes-source"
"-xvf" mes-source) "-xvf" mes-source)
(mkdir-p "mes-seed") #t)))))
(invoke "tar" "--strip=1" "-C" "mes-seed"
"-xvf" mes-seed))))))
(replace 'configure (replace 'configure
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((coreutils (assoc-ref %build-inputs "coreutils")) (let ((coreutils (assoc-ref %build-inputs "coreutils"))
(bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))
(out (assoc-ref %outputs "out"))) (out (assoc-ref %outputs "out")))
(setenv "PATH" (string-append coreutils "/bin" (setenv "PATH" (string-append coreutils "/bin"
":" "../mescc-tools-seed")) ":" "../mescc-tools-seed"))
@ -172,7 +164,7 @@
(setenv "PREFIX" out) (setenv "PREFIX" out)
(setenv "MES_PREFIX" "../mes-source") (setenv "MES_PREFIX" "../mes-source")
(setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed") (setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed")
(setenv "MES_SEED" "../mes-seed") (setenv "MES_SEED" (string-append bootstrap-mes "/lib"))
#t))) #t)))
(replace 'build (replace 'build
(lambda _ (lambda _
@ -223,7 +215,7 @@
("nyacc-source" ,(package-source nyacc-boot)) ("nyacc-source" ,(package-source nyacc-boot))
("coreutils" , %bootstrap-coreutils&co) ("coreutils" , %bootstrap-coreutils&co)
("mes-seed" ,%mes-seed) ("bootstrap-mes" ,%bootstrap-mes)
,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile ,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile
`(("guile" ,%bootstrap-guile) `(("guile" ,%bootstrap-guile)
("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; cherry-pick ("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; cherry-pick
@ -239,13 +231,12 @@
(let ((coreutils (assoc-ref %build-inputs "coreutils")) (let ((coreutils (assoc-ref %build-inputs "coreutils"))
(srfi-43 (assoc-ref %build-inputs "srfi-43")) (srfi-43 (assoc-ref %build-inputs "srfi-43"))
(nyacc-source (assoc-ref %build-inputs "nyacc-source")) (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
(mes-seed (assoc-ref %build-inputs "mes-seed"))) (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
(with-directory-excursion ".." (with-directory-excursion ".."
(and (and
(mkdir-p "nyacc-source") (mkdir-p "nyacc-source")
(invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source) (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source)
(mkdir-p "mes-seed") (symlink (string-append bootstrap-mes "/lib") "mes-seed")
(invoke "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
(or (not srfi-43) (or (not srfi-43)
(and (mkdir-p "srfi") (and (mkdir-p "srfi")
(copy-file srfi-43 "srfi/srfi-43.scm") (copy-file srfi-43 "srfi/srfi-43.scm")
@ -256,7 +247,7 @@
(symlink (string-append "../nyacc-source/module") "nyacc") (symlink (string-append "../nyacc-source/module") "nyacc")
(setenv "GUILE_LOAD_PATH" "nyacc") (setenv "GUILE_LOAD_PATH" "nyacc")
(setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
(invoke "bash" "-x" "configure.sh" (invoke "bash" "configure.sh"
(string-append "--prefix=" out)) (string-append "--prefix=" out))
(setenv "MES" "src/mes") (setenv "MES" "src/mes")
(setenv "MESCC" "scripts/mescc") (setenv "MESCC" "scripts/mescc")
@ -286,15 +277,16 @@
(replace 'check (replace 'check
(lambda _ (lambda _
(when ,%fake-bootstrap? (when ,%fake-bootstrap?
;; breaks with guile-2.0 ;; break with guile-2.0
(delete-file "scaffold/boot/50-primitive-load.scm") (delete-file "scaffold/boot/50-primitive-load.scm")
(delete-file "scaffold/boot/51-module.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")
(invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t") ;; fail fast tests
(invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell") ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
(invoke "sh" "-x" "check.sh")))) ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell")
(invoke "sh" "check.sh"))))
(replace 'install (replace 'install
(lambda _ (lambda _
(invoke "sh" "install.sh")))))) (invoke "sh" "install.sh"))))))
@ -319,8 +311,8 @@
;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more ;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more
;; mature, this package should use the 0.9.27 sources (or later). ;; mature, this package should use the 0.9.27 sources (or later).
(let ((version "0.9.26") (let ((version "0.9.26")
(revision "4") (revision "5")
(commit "46ee3f18477575b189ac224eac853e96afd571e1")) (commit "c7b3f59d1a71e71b470f859b20f0cfe840f3954d"))
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (package
(inherit tcc) (inherit tcc)
@ -333,19 +325,18 @@
"/tinycc-" commit ".tar.gz")) "/tinycc-" commit ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0kq2si81piszpdcnp78w1lp5jd291srbx1f71fir08ybidiriw35")))) "1agz5w5q6dm51n63hsxii33hxdghmdiacbb5zzxzac3aarfxjb2m"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(supported-systems '("i686-linux" "x86_64-linux")) (supported-systems '("i686-linux" "x86_64-linux"))
(inputs '()) (inputs '())
(propagated-inputs '()) (propagated-inputs '())
(native-inputs (native-inputs
`(("mes" ,mes-boot) `(("mes" ,mes-boot)
("mes-seed" ,%mes-seed)
("mescc-tools" ,mescc-tools-boot) ("mescc-tools" ,mescc-tools-boot)
("nyacc-source" ,(package-source nyacc-boot)) ("nyacc-source" ,(package-source nyacc-boot))
("coreutils" , %bootstrap-coreutils&co) ("coreutils" , %bootstrap-coreutils&co)
("tinycc-seed" ,%tinycc-seed) ("bootstrap-mes" ,%bootstrap-mes)
,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile ,@(if %fake-bootstrap? ; cheat: fast non-bootstrap testing with Guile
`(("guile" ,%bootstrap-guile) `(("guile" ,%bootstrap-guile)
("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; cherry-pick ("srfi-43" ,%srfi-43)) ; guile-2.0.9 lacks srfi-43; cherry-pick
@ -361,8 +352,7 @@
(let* ((coreutils (assoc-ref %build-inputs "coreutils")) (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
(srfi-43 (assoc-ref %build-inputs "srfi-43")) (srfi-43 (assoc-ref %build-inputs "srfi-43"))
(nyacc-source (assoc-ref %build-inputs "nyacc-source")) (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
(mes-seed (assoc-ref %build-inputs "mes-seed")) (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
(tinycc-seed (assoc-ref %build-inputs "tinycc-seed")))
(setenv "PATH" (string-append (setenv "PATH" (string-append
coreutils "/bin")) coreutils "/bin"))
(format (current-error-port) "PATH=~s\n" (getenv "PATH")) (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
@ -371,12 +361,7 @@
(mkdir-p "nyacc-source") (mkdir-p "nyacc-source")
(invoke "tar" "--strip=1" "-C" "nyacc-source" (invoke "tar" "--strip=1" "-C" "nyacc-source"
"-xvf" nyacc-source) "-xvf" nyacc-source)
(mkdir-p "mes-seed") (symlink (string-append bootstrap-mes "/lib") "mes-seed")
(invoke "tar" "--strip=1" "-C" "mes-seed"
"-xvf" mes-seed)
(mkdir-p "tinycc-seed")
(invoke "tar" "--strip=1" "-C" "tinycc-seed"
"-xvf" tinycc-seed)
(or (not srfi-43) (or (not srfi-43)
(and (mkdir-p "srfi") (and (mkdir-p "srfi")
(copy-file srfi-43 "srfi/srfi-43.scm") (copy-file srfi-43 "srfi/srfi-43.scm")