0.9.10.37:
[sbcl.git] / make-host-2.sh
blob347400e46fbad8bc387924317f9d0ee4ca113850
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-2.sh
19 LANG=C
20 LC_ALL=C
21 export LANG LC_ALL
23 # In some cases, a debugging build of the system will creates a core
24 # file output/after-xc.core in the next step. In cases where it
25 # doesn't, it's confusing and basically useless to have any old copies
26 # lying around, so delete:
27 rm -f output/after-xc.core
29 # In a fresh host Lisp invocation, load and run the cross-compiler to
30 # create the target object files describing the target SBCL.
32 # (There are at least three advantages to running the cross-compiler in a
33 # fresh host Lisp invocation instead of just using the same Lisp invocation
34 # that we used to compile it:
35 # (1) It reduces the chance that the cross-compilation process
36 # inadvertently comes to depend on some weird compile-time
37 # side effect.
38 # (2) It reduces peak memory demand (because definitions wrapped in
39 # (EVAL-WHEN (:COMPILE-TOPLEVEL :EXECUTE) ..) aren't defined
40 # in the fresh image).
41 # (3) It makes it easier to jump in and retry a step when tweaking
42 # and experimenting with the bootstrap procedure.
43 # Admittedly, these don't seem to be enormously important advantages, but
44 # the only disadvantage seems to be the extra time required to reload
45 # the fasl files into the new host Lisp, and that doesn't seem to be
46 # an enormously important disadvantage, either.)
47 echo //running cross-compiler to create target object files
48 $SBCL_XC_HOST < make-host-2.lisp
50 # Run GENESIS (again) in order to create cold-sbcl.core. (The first
51 # time was before we ran the cross-compiler, in order to create the
52 # header file which was needed in order to run gcc on the runtime
53 # code.)
54 sh make-genesis-2.sh