guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

60/210: gnu: tinycc-boot: Update for mes 0.15.


From: Jan Nieuwenhuizen
Subject: 60/210: gnu: tinycc-boot: Update for mes 0.15.
Date: Sat, 8 Sep 2018 10:36:06 -0400 (EDT)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit 4b63468c5b58d03ba850e3e08d5c194129a8bbea
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Mon May 28 19:13:22 2018 +0200

    gnu: tinycc-boot: Update for mes 0.15.
    
    * gnu/packages/mes.scm (tinycc-boot): If %fake-bootstrap?, cheat using Guile
      to build in ~5min.  Update for mes 0.15.
---
 gnu/packages/mes.scm | 61 +++++++++++++++++++++-------------------------------
 1 file changed, 24 insertions(+), 37 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index c122ddf..d4e7320 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -373,7 +373,7 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
 (define-public tcc-boot
   (let ((version "0.9.26")
         (revision "0")
-        (commit "ff1caa80178b8c7d91c14c52b030ff067faef46f"))
+        (commit "97196cebf6c5c79ec87f1ee4875cc8c188333a3c"))
     (package-with-bootstrap-guile
      (package
        (name "tcc-boot")
@@ -386,23 +386,22 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
                                      "/tinycc-" commit ".tar.gz"))
                  (sha256
                   (base32
-                   "066z8z1wlzs0k8a1xv6ds0g25vvxwd24fzdca59bahwdaaq0j0ic"))))
+                   "1z156jfnc0dkdb6i9h0nns4hm11c03k3vakw7qhb7651dm8hqxrk"))))
        (build-system trivial-build-system)
        (supported-systems '("i686-linux" "x86_64-linux"))
        (native-inputs
         `(("static-bash" ,@(assoc-ref %bootstrap-inputs "bash"))
-          ;; For testing with Guile
-          ;; ("guile" ,%bootstrap-guile)
-          ;; ("libc" ,@(assoc-ref %bootstrap-inputs "libc"))
-          ;; guile-2.0.9 does not have srfi-43; cherry-pick
-          ;; ("srfi-43" ,%srfi-43)
           ("tar" ,(search-bootstrap-binary "tar" (%current-system)))
           ("xz"  ,(search-bootstrap-binary "xz" (%current-system)))
           ("mes" ,mes-boot)
           ("mes-seed" ,%mes-seed)
           ("mescc-tools" ,mescc-tools-boot)
           ("nyacc-source" ,(package-source nyacc-boot))
-          ("tinycc-seed" ,%tinycc-seed)))
+          ("tinycc-seed" ,%tinycc-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
         `(#:modules ((guix build utils))
           #:builder
@@ -425,6 +424,7 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
                                     (string-append libc 
,(glibc-dynamic-linker))
                                     (string-append mes "/lib/mes-loader")))
                    (dir (getcwd)))
+              ;; unpack
               (setenv "PATH" (string-append
                               bash "/bin:"
                               mes "/bin:"
@@ -456,10 +456,11 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
               (setenv "ONE_SOURCE" "1")
               (setenv "PREPROCESS" "1")
               (setenv "MES_DEBUG" "1")
+              (setenv "MES_ARENA" "70000000")
+              (setenv "MES_MAX_ARENA" "70000000")
 
-              (if guile
-                  ;; For testing with Guile+mescc -- Guile+Nyacc+MesCC, ~30 
times faster
-                  (begin
+              (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"
@@ -468,10 +469,14 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
                             (string-append dir
                                            ":" guile "/share/guile/2.0/"
                                            ":" dir "/nyacc-source/module"
-                                           ":" mes "/share/mes/guile")))
+                                           ":" mes "/share/mes/guile"))
+
+                    ;; give auto-compile a home -- massive speed-up
+                    (mkdir-p "/tmp/home")
+                    (setenv "HOME" "/tmp/home"))
 
-                  ;; For true bootstrap: Mes+MesCC -- Mes+Nyacc+MesCC
-                  (begin
+                  (begin           ; True bootstrap build with Mes+Nyacc+MesCC
+                    (setenv "MES" "mes")
                     (setenv "GUILE_LOAD_PATH" "nyacc")
                     (symlink (string-append "../nyacc-source/module") 
"nyacc")))
 
@@ -483,33 +488,15 @@ extensive examples, including parsers for the Javascript 
and C99 languages.")
                                "--tccdir=."))
 
                ;; build
+               ;; (setenv "BUILD_DEBUG" "1")
                (zero? (system* "sh" "build.sh"))
 
                ;; check
-               (setenv "MES" "mes")
                (setenv "DIFF" "diff.scm")
-               (zero? (system* "sh" "-ex" "test.sh" 
"mes/scaffold/tests/30-strlen"))
-               (zero? (system* "sh" "-ex" "test.sh" 
"mes/scaffold/tinycc/00_assignment"))
-               (zero? (system* "sh" "-x" "check.sh"))
-
-               (setenv "TCC" "./mes-tcc")
-               (zero? (system* "sh" "boot.sh"))
-               (zero? (system* "sh" "check.sh"))
-
-               (setenv "TCC" "./boot0-tcc")
-               (zero? (system* "sh" "boot.sh"))
-               (zero? (system* "sh" "check.sh"))
-
-               (setenv "TCC" "./boot1-tcc")
-               (zero? (system* "sh" "boot.sh"))
-               (zero? (system* "sh" "check.sh"))
-
-               (setenv "TCC" "./boot2-tcc")
-               (zero? (system* "sh" "boot.sh"))
-               (zero? (system* "sh" "check.sh"))
-
-               (setenv "TCC" "./boot3-tcc")
-               (zero? (system* "sh" "boot.sh"))
+               ;; fail fast tests
+               ;;(zero? (system* "sh" "test.sh" 
"mes/scaffold/tests/30-strlen"))
+               ;;(zero? (system* "sh" "test.sh" 
"mes/scaffold/tinycc/00_assignment"))
+               (setenv "TCC" "./tcc")
                (zero? (system* "sh" "check.sh"))
 
                ;; install



reply via email to

[Prev in Thread] Current Thread [Next in Thread]