Shorten DOTIMES expander, remove obsolete comments
[sbcl.git] / make-host-1.lisp
blob99138387a7012dbc47b809694d696dbff55c80d4
1 ;;; (We want to have some limit on print length and print level during
2 ;;; bootstrapping because PRINT-OBJECT only gets set up rather late,
3 ;;; and running without PRINT-OBJECT it's easy to fall into printing
4 ;;; enormous (or infinitely circular) low-level representations of
5 ;;; things.)
6 (setf *print-level* 5 *print-length* 5)
8 (progn (load "src/cold/shared.lisp")
9 (load "tools-for-build/ldso-stubs.lisp"))
10 (in-package "SB-COLD")
11 (progn
12 (setf *host-obj-prefix* "obj/from-host/")
13 (load "src/cold/set-up-cold-packages.lisp")
14 (load "src/cold/defun-load-or-cload-xcompiler.lisp")
16 ;; Supress function/macro redefinition warnings under clisp.
17 #+clisp (setf custom:*suppress-check-redefinition* t)
19 (defmacro maybe-with-compilation-unit (&body forms)
20 ;; A compilation-unit seems to kill the compile. I'm not sure if it's
21 ;; running out of memory or what. I don't care to find out,
22 ;; but it's most definitely the cause of the breakage.
23 #+clisp `(progn ,@forms)
25 #+sbcl
26 ;; Watch for deferred warnings under SBCL.
27 ;; UNDEFINED-VARIABLE does not cause COMPILE-FILE to return warnings-p
28 ;; unless outside a compilation unit. You find out about it only upon
29 ;; exit of SUMMARIZE-COMPILATION-UNIT. So we set up a handler for that.
30 `(let (fail)
31 (handler-bind (((and simple-warning (not style-warning))
32 (lambda (c)
33 ;; hack for PPC. See 'build-order.lisp-expr'
34 ;; Ignore the warning, and the warning about the warning.
35 (unless (or (search "not allowed by the operand type"
36 (simple-condition-format-control c))
37 (search "ignoring FAILURE-P return"
38 (simple-condition-format-control c)))
39 (setq fail t)))))
40 (with-compilation-unit () ,@forms))
41 (when fail
42 (error "make-host-1 stopped due to unexpected WARNING.")))
44 #-(or clisp sbcl) `(with-compilation-unit () ,@forms))
46 ;; Now we can set the #[+-] readers to our precautionary
47 ;; readers that prohibit use of ":sbcl" as the condition.
48 (set-dispatch-macro-character #\# #\+ #'she-reader)
49 (set-dispatch-macro-character #\# #\- #'she-reader))
51 (maybe-with-compilation-unit
52 (load-or-cload-xcompiler #'host-cload-stem)
54 ;;; Let's check that the type system, and various other things, are
55 ;;; reasonably sane. (It's easy to spend a long time wandering around
56 ;;; confused trying to debug cross-compilation if it isn't.)
57 (when (find :sb-test *shebang-features*)
58 (load "tests/type.before-xc.lisp")
59 (load "tests/info.before-xc.lisp")
60 (load "tests/vm.before-xc.lisp"))
61 ;; When building on a slow host using a slow Lisp,
62 ;; the wait time in slurp-ucd seems interminable - over a minute.
63 ;; Compiling seems to help a bit, but maybe it's my imagination.
64 (load (compile-file "tools-for-build/ucd.lisp"))
66 ;;; Generate character database tables.
67 (dolist (s '(sb-cold::slurp-ucd sb-cold::slurp-proplist sb-cold::output))
68 (funcall s))
70 ;;; propagate structure offset and other information to the C runtime
71 ;;; support code.
72 (host-cload-stem "src/compiler/generic/genesis" nil)
73 ) ; END with-compilation-unit
75 (sb!vm:genesis :c-header-dir-name "src/runtime/genesis")
76 #+cmu (ext:quit)
77 #+clisp (ext:quit)
78 #+abcl (ext:quit)