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