support target-driven cross-compilation
[sbcl.git] / make-target-2.sh
blob1f5a4602394024eeb81d48415e51343de31d45b7
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-target-2.sh
19 LANG=C
20 LC_ALL=C
21 export LANG LC_ALL
23 # Load our build configuration
24 . output/build-config
26 if [ -n "$SBCL_HOST_LOCATION" ]; then
27 echo //copying host-2 files to target
28 rsync -a "$SBCL_HOST_LOCATION/output/" output/
31 # Do warm init stuff, e.g. building and loading CLOS, and stuff which
32 # can't be done until CLOS is running.
34 # Note that it's normal for the newborn system to think rather hard at
35 # the beginning of this process (e.g. using nearly 100Mb of virtual memory
36 # and >30 seconds of CPU time on a 450MHz CPU), and unless you built the
37 # system with the :SB-SHOW feature enabled, it does it rather silently,
38 # without trying to tell you about what it's doing. So unless it hangs
39 # for much longer than that, don't worry, it's likely to be normal.
40 echo //doing warm init - compilation phase
41 ./src/runtime/sbcl \
42 --core output/cold-sbcl.core \
43 --lose-on-corruption \
44 --no-sysinit --no-userinit < make-target-2.lisp
45 echo //doing warm init - load and dump phase
46 ./src/runtime/sbcl \
47 --core output/cold-sbcl.core \
48 --lose-on-corruption \
49 --no-sysinit --no-userinit < make-target-2-load.lisp