guix-commits
[Top][All Lists]
Advanced

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

20/35: bootstrap: mes-boot: Scheme-only bootstrap. WIP


From: guix-commits
Subject: 20/35: bootstrap: mes-boot: Scheme-only bootstrap. WIP
Date: Wed, 20 Nov 2019 15:19:39 -0500 (EST)

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

commit 29d76312363a9ed9bed6535e9ca1df5c8862ad34
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Tue Dec 4 23:17:49 2018 +0100

    bootstrap: mes-boot: Scheme-only bootstrap.  WIP
    
    * gnu/packages/commencement.scm (mes-boot): Scheme-only bootstrap.
---
 gnu/packages/commencement.scm | 68 +++++++++++++++++++++++--------------------
 1 file changed, 36 insertions(+), 32 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 1e67926..0f81808 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -112,65 +112,69 @@
    (package
      (inherit mes)
      (name "mes-boot")
-     (version "0.19")
+     (version "0.20-45-ga70ca477a")
      (source (origin
                (method url-fetch)
                (uri (string-append "mirror://gnu/mes/"
                                    "mes-" version ".tar.gz"))
                (sha256
                 (base32
-                 "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
+                 "1cmikcnxnjvbk11dhfvyisgfa8lvrwi51i46pbk84x135dp6hvja"))))
      (inputs '())
      (propagated-inputs '())
      (native-inputs
-      `(("mescc-tools" ,%bootstrap-mescc-tools)
-        ("nyacc-source" ,(package-source nyacc-0.86))
-
-        ("coreutils" , %bootstrap-coreutils&co)
-        ("bootstrap-mes" ,%bootstrap-mes)))
+      `(("bash" , %bootstrap-gash)
+        ("bootstrap-mes" ,%bootstrap-mes)
+        ("guile" ,%bootstrap-guile)
+        ("mescc-tools" ,%bootstrap-mescc-tools)
+        ("nyacc-source" ,(package-source nyacc-boot))))
      (arguments
       `(#:implicit-inputs? #f
+        #:tests? #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 _
-              (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
-                    (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+              (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
                 (with-directory-excursion ".."
-                  (mkdir-p "nyacc-source")
-                  (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" 
nyacc-source)
-                  (symlink (string-append bootstrap-mes "/share/mes/lib") 
"mes-seed"))
-                #t)))
+                  (invoke "tar" "-xvf" nyacc-source)))))
           (replace 'configure
             (lambda* (#:key outputs #:allow-other-keys)
-              (let ((out (assoc-ref %outputs "out")))
+              (let ((out (assoc-ref %outputs "out"))
+                    (gash (assoc-ref %build-inputs "bash"))
+                    (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes"))
+                    (dir (with-directory-excursion ".." (getcwd))))
+                (setenv "AR" (string-append "gash " bootstrap-mes 
"/bin/mesar"))
+                (setenv "BASH" (string-append gash "/bin/gash"))
+                (setenv "CC" (string-append bootstrap-mes "/bin/mes"
+                                            " -e main"
+                                            " " bootstrap-mes "/bin/mescc.scm"
+                                            " -- "))
                 (setenv "GUILE" "mes")
-                (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
-                (setenv "GUILE_LOAD_PATH" "nyacc")
-                (symlink (string-append "../nyacc-source/module") "nyacc")
-                (invoke "bash" "configure.sh"
-                        (string-append "--prefix=" out)))))
-          (replace 'build
-            (lambda _
-              (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
-                (setenv "MES_PREFIX" (string-append mes "/share/mes"))
+                (setenv "GUILE_EFFECTIVE_VERSION" "2.0")
+                (setenv "GUILE_LOAD_PATH"
+                        (string-append bootstrap-mes "/share/mes/module"
+                                       ":" dir "/nyacc-0.99.0/module"))
+                (setenv "MES_PREFIX" (string-append bootstrap-mes 
"/share/mes"))
                 (setenv "MES_ARENA" "100000000")
                 (setenv "MES_MAX_ARENA" "100000000")
                 (setenv "MES_STACK" "10000000")
-                (invoke "sh" "bootstrap.sh"))))
-          (replace 'check
+                (invoke "gash" "configure.sh"
+                        (string-append "--prefix=" out)
+                        (string-append "--host=i686-linux-gnu")))))
+          (replace 'build
             (lambda _
-              (and
-               (setenv "DIFF" "sh scripts/diff.scm")
-               ;; fail fast tests
-               ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
-               ;; (invoke "sh" "-x" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell")
-                (setenv "MES_PREFIX" "mes")
-                (invoke "sh" "check.sh"))))
+              (invoke "sh" "bootstrap.sh")))
+          (delete 'check)
           (replace 'install
             (lambda _
+              (substitute* "install.sh" ; show some progress
+                ((" -xf") " -xvf")
+                (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+                 (string-append space "echo '" cmd "'\n"
+                                space cmd "\n")))
               (invoke "sh" "install.sh"))))))
      (native-search-paths
       ;; Use the language-specific variables rather than 'CPATH' because they



reply via email to

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