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
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
23 # Load our build configuration
26 # In some cases, a debugging build of the system will creates a core
27 # file output/after-xc.core in the next step. In cases where it
28 # doesn't, it's confusing and basically useless to have any old copies
29 # lying around, so delete:
30 rm -f output
/after-xc.core
32 # In a fresh host Lisp invocation, load and run the cross-compiler to
33 # create the target object files describing the target SBCL.
35 # (There are at least three advantages to running the cross-compiler in a
36 # fresh host Lisp invocation instead of just using the same Lisp invocation
37 # that we used to compile it:
38 # (1) It reduces the chance that the cross-compilation process
39 # inadvertently comes to depend on some weird compile-time
41 # (2) It reduces peak memory demand (because definitions wrapped in
42 # (EVAL-WHEN (:COMPILE-TOPLEVEL :EXECUTE) ..) aren't defined
43 # in the fresh image).
44 # (3) It makes it easier to jump in and retry a step when tweaking
45 # and experimenting with the bootstrap procedure.
46 # Admittedly, these don't seem to be enormously important advantages, but
47 # the only disadvantage seems to be the extra time required to reload
48 # the fasl files into the new host Lisp, and that doesn't seem to be
49 # an enormously important disadvantage, either.)
52 files
=\'\
(\"$1\"\
) # FIXME: create string-quoted list of each arg individually
53 echo //compiling
$files
54 echo '(defvar *compile-files* '${files}')(load "make-host-2.lisp")' |
$SBCL_XC_HOST
58 echo //running cross-compiler to create target object files
59 echo '(load "loader.lisp") (load-sbcl-file "make-host-2.lisp")' |
$SBCL_XC_HOST
61 # Run GENESIS (again) in order to create cold-sbcl.core. (The first
62 # time was before we ran the cross-compiler, in order to create the
63 # header file which was needed in order to run gcc on the runtime