svm: Do fni->bci step in host, not with interpreted compress.
authorMatt Birkholz <puck@birchwood-abbey.net>
Sun, 19 Oct 2014 18:40:03 +0000 (11:40 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Sun, 19 Oct 2014 18:40:03 +0000 (11:40 -0700)
src/compiler/base/crsend.scm
src/etc/Stage.sh
src/etc/compile-svm.sh

index 04b5e499692acf1c4a8b16c730abe1d2b2fc2f42..b03b3446449548405bdf872130d0e280d49809f3 100644 (file)
@@ -54,6 +54,21 @@ USA.
                         (finish-cross-compilation:file pathname force?))))
                (directory-read (pathname-as-directory directory))))))
 
+(define (finish-cross-compilation:info-files directory #!optional force?)
+  (let ((force? (if (default-object? force?) #f force?)))
+    (let loop ((directory directory))
+      (for-each (lambda (pathname)
+                 (cond ((file-directory? pathname)
+                        (if (not (let ((ns (file-namestring pathname)))
+                                   (or (string=? ns ".")
+                                       (string=? ns ".."))))
+                            (loop pathname)))
+                       ((let ((t (pathname-type pathname)))
+                          (and (string? t)
+                               (string=? t "fni")))
+                        (finish-cross-compilation:info-file pathname force?))))
+               (directory-read (pathname-as-directory directory))))))
+
 (define (finish-cross-compilation:info-file pathname #!optional force?)
   (let* ((input-file (pathname-default-type pathname "fni"))
         (output-file (pathname-new-type input-file "bci")))
index 25faffced5ae9ae47193376c8bcbe5c0830c9435..c561ed8aa9f2903141eac2d825dab822b1afc290 100755 (executable)
@@ -52,6 +52,17 @@ make-cross)
     maybe_mv *.lap "${DIRNAME}/."
     maybe_mv *.rtl "${DIRNAME}/."
     ;;
+make-clean)
+    mkdir "${DIRNAME}"
+    maybe_mv *.bin "${DIRNAME}/."
+    maybe_mv *.ext "${DIRNAME}/."
+    maybe_mv *.com "${DIRNAME}/."
+    maybe_mv *.bci "${DIRNAME}/."
+    maybe_mv *.moc "${DIRNAME}/."
+    maybe_mv *.fni "${DIRNAME}/."
+    maybe_mv *.lap "${DIRNAME}/."
+    maybe_mv *.rtl "${DIRNAME}/."
+    ;;
 unmake)
     if [ -d "${DIRNAME}" ]; then
        maybe_mv "${DIRNAME}"/* .
index 64e21ee3173964e26c77c1c307fd506c55966500..197138c6404f6843b266305cb10ca9992ba2b411 100755 (executable)
@@ -89,6 +89,7 @@ run_cmd "${@}" --batch-mode --library lib --band x-runtime.com <<EOF
   (load-option 'CREF)
   (load-option '*PARSER)
   (load-option 'COMPILER)
+  (load "compiler/base/crsend.com" user-initial-environment)
   (disk-save "lib/x-compiler.com"))
 EOF
 
@@ -123,7 +124,12 @@ if [ "${FAST}" ]; then
     (compile-everything)))
 EOF
 
-    echo "# `mydate`: Finish-cross-compilation of everything."
+    echo "# `mydate`:     Finish-cross-compilation of fni files."
+    run_cmd "${@}" --batch-mode --library lib --band x-compiler.com <<EOF
+(finish-cross-compilation:info-files ".")
+EOF
+
+    echo "# `mydate`:     Finish-cross-compilation of everything."
     run_cmd_in_dir runtime \
        ../microcode/scheme --batch-mode --library ../lib \
                            --fasl make.bin <<EOF
@@ -156,7 +162,12 @@ run_cmd "${@}" --batch-mode --library lib \
     (compile-boot-dirs compile-dir)))
 EOF
 
-echo "# `mydate`: Finish-cross-compilation of boot-dirs."
+echo "# `mydate`:     Finish-cross-compilation of boot-dirs fni files."
+run_cmd "${@}" --batch-mode --library lib --band x-compiler.com <<EOF
+(finish-cross-compilation:info-files ".")
+EOF
+
+echo "# `mydate`:     Finish-cross-compilation of boot-dirs."
 run_cmd_in_dir runtime \
     ../microcode/scheme --batch-mode --library ../lib --fasl make.bin <<EOF
 (begin
@@ -176,7 +187,7 @@ run_cmd_in_dir runtime \
   (disk-save "../lib/boot-compiler.com"))
 EOF
 
-run_cmd ./Stage.sh make-cross 0
+run_cmd ./Stage.sh make-clean 0
 
 echo "# `mydate`: Use the new machine and compiler to re-compile everything."
 run_cmd ./microcode/scheme --batch-mode --library lib \