0.9.2.10:
[sbcl/eslaughter.git] / make-host-1.sh
blobcf3e2160ba196d0df39e05c99a010bbc2194fc18
1 #!/bin/sh
3 # This is a script to be run as part of make.sh. The only time you'd
4 # want to run it by itself is if you're trying to cross-compile the
5 # system or if you're doing some kind of troubleshooting.
7 # This software is part of the SBCL system. See the README file for
8 # more information.
10 # This software is derived from the CMU CL system, which was
11 # written at Carnegie Mellon University and released into the
12 # public domain. The software is in the public domain and is
13 # provided with absolutely no warranty. See the COPYING and CREDITS
14 # files for more information.
16 echo //entering make-host-1.sh
18 LANG=C
19 export LANG
21 # Compile and load the cross-compiler. (We load it here not because we're
22 # about to use it, but because it's written under the assumption that each
23 # file will be loaded before the following file is compiled.)
25 # Also take the opportunity to compile and load genesis, to create the
26 # header file sbcl.h which will be needed to create the C runtime
27 # environment.
28 echo //building cross-compiler, and doing first genesis
29 $SBCL_XC_HOST <<-'EOF' || exit 1
30 ;; (We want to have some limit on print length and print level
31 ;; during bootstrapping because PRINT-OBJECT only gets set
32 ;; up rather late, and running without PRINT-OBJECT it's easy
33 ;; to fall into printing enormous (or infinitely circular)
34 ;; low-level representations of things.)
35 (setf *print-level* 5 *print-length* 5)
36 (load "src/cold/shared.lisp")
37 (load "tools-for-build/ldso-stubs.lisp")
38 (in-package "SB-COLD")
39 (setf *host-obj-prefix* "obj/from-host/")
40 (load "src/cold/set-up-cold-packages.lisp")
41 (load "src/cold/defun-load-or-cload-xcompiler.lisp")
42 (load-or-cload-xcompiler #'host-cload-stem)
43 ;; Let's check that the type system is reasonably sane. (It's
44 ;; easy to spend a long time wandering around confused trying
45 ;; to debug cross-compilation if it isn't.)
46 (when (find :sb-test *shebang-features*)
47 (load "tests/type.before-xc.lisp")
48 (load "tests/info.before-xc.lisp")
49 (load "tests/vm.before-xc.lisp"))
50 (load "tools-for-build/ucd.lisp")
51 (sb-cold::slurp-ucd)
52 (sb-cold::output)
53 (host-cload-stem "src/compiler/generic/genesis")
54 (sb!vm:genesis :c-header-dir-name "src/runtime/genesis")
55 #+cmu (ext:quit)
56 #+clisp (ext:quit)
57 EOF