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
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 # Compile and load the cross-compiler. (We load it here not because we're
19 # about to use it, but because it's written under the assumption that each
20 # file will be loaded before the following file is compiled.)
22 # Also take the opportunity to compile and load genesis, to create the
23 # header file sbcl.h which will be needed to create the C runtime
25 echo //building cross-compiler, and doing first genesis
26 $SBCL_XC_HOST <<-'EOF' || exit 1
27 ;; (We want to have some limit on print length and print level
28 ;; during bootstrapping because PRINT-OBJECT only gets set
29 ;; up rather late, and running without PRINT-OBJECT it's easy
30 ;; to fall into printing enormous (or infinitely circular)
31 ;; low-level representations of things.)
32 (setf *print-level* 5 *print-length* 5)
33 (load "src/cold/shared.lisp")
34 (load "tools-for-build/ldso-stubs.lisp")
35 (in-package "SB-COLD")
36 (setf *host-obj-prefix* "obj/from-host/")
37 (load "src/cold/set-up-cold-packages.lisp")
38 (load "src/cold/defun-load-or-cload-xcompiler.lisp")
39 (load-or-cload-xcompiler #'host-cload-stem)
40 ;; Let's check that the type system is reasonably sane. (It's
41 ;; easy to spend a long time wandering around confused trying
42 ;; to debug cross-compilation if it isn't.)
43 (when (find :sb-test *shebang-features*)
44 (load "tests/type.before-xc.lisp")
45 (load "tests/info.before-xc.lisp"))
46 (host-cload-stem "src/compiler/generic/genesis")
47 (sb!vm:genesis :c-header-dir-name "src/runtime/genesis")