error-error: don't print to *terminal-io*.
[sbcl.git] / make-genesis-2.sh
blobfd4b61fb2bc4eb9ed450b1841102ad3d0b34f40e
1 #!/bin/sh
2 set -em
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-genesis-2.sh
19 . output/build-config
21 # In a fresh host Lisp invocation, load the cross-compiler (in order
22 # to get various definitions that GENESIS needs, not in order to
23 # cross-compile GENESIS, then load and run GENESIS. (We use a fresh
24 # host Lisp invocation here for basically the same reasons we did
25 # before when loading and running the cross-compiler.)
27 # (Why do we need this second invocation of GENESIS? In order to
28 # create a .core file, as opposed to just a .h file, GENESIS needs
29 # symbol table data on the C runtime. And we can get that symbol
30 # data only after the C runtime has been built. Therefore, even
31 # though we ran GENESIS earlier, we couldn't get it to make a .core
32 # file at that time; but we needed to run it earlier in order to
33 # get to where we can write a .core file.)
34 echo //loading and running GENESIS to create cold-sbcl.core
35 echo '(load "loader.lisp") (load-sbcl-file "make-genesis-2.lisp")' | $SBCL_XC_HOST
37 echo //testing for consistency of first and second GENESIS passes
38 if ! command -v diff > /dev/null ; then
39 echo //no diffutils, not testing
40 elif diff -r src/runtime/genesis output/genesis-2; then
41 echo //header files match between first and second GENESIS -- good
42 else
43 echo error: header files do not match between first and second GENESIS
44 exit 1