Initial revision
[sbcl.git] / make-target-2.sh
1 #!/bin/sh
2
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.
6
7 # This software is part of the SBCL system. See the README file for
8 # more information.
9 #
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.
15
16 echo //entering make-host-2.sh
17
18 # Do warm init stuff, e.g. building and loading CLOS, and stuff which
19 # can't be done until CLOS is running.
20 #
21 # Note that it's normal for the newborn system to think rather hard at
22 # the beginning of this process (e.g. using nearly 100Mb of virtual memory
23 # and >30 seconds of CPU time on a 450MHz CPU), and unless you built the
24 # system with the :SB-SHOW feature enabled, it does it rather silently,
25 # without trying to tell you about what it's doing. So unless it hangs
26 # for much longer than that, don't worry, it's likely to be normal.
27 echo //doing warm init
28 ./src/runtime/sbcl \
29 --core output/cold-sbcl.core \
30 --sysinit /dev/null --userinit /dev/null <<-'EOF' || exit 1
31         (sb!int:/show "hello, world!")
32         (let ((*print-length* 5)
33               (*print-level* 5))
34           (sb!int:/show "about to LOAD warm.lisp")
35           (load "src/cold/warm.lisp"))
36         (sb-int:/show "about to SAVE-LISP-AND-DIE")
37         ;; Even if /SHOW output was wanted during build, it's probably
38         ;; not wanted by default after build is complete. (And if it's
39         ;; wanted, it can easily be turned back on.)
40         #+sb-show (setf sb-int:*/show* nil)
41         (sb-ext:save-lisp-and-die "output/sbcl.core" :purify t)
42         EOF