next up previous contents
Next: 2.3 Booting a new Up: 2. Basic usage Previous: 2.1 Requirements   Contents

2.2 Invoking the bootstrap compiler

To invoke the bootstrap compiler, first one has to change the current working directory to src/system:


$ cd src/system

The next step is to start the interactive system and load the bootstrap compiler. This can be done in one of two ways:

  1. Start the interactive system and then issue a CM.autoload command that causes the bootstrap compiler to be loaded. The resulting session could look like this:
    
    $ sml
    Standard ML of New Jersey ...
    - CM.autoload "$smlnj/cmb.cm";
    ...
    val it = true : bool
    -
    
  2. Start the interactive system and specify $smlnj/cmb.cm on the command line:
    
    $ sml '$smlnj/cmb.cm'
    Standard ML of New Jersey ...
    -
    

Note for frequent compiler hackers: The makeml script (see below) builds the the interactive system in such a way that $smlnj/cmb.cm is already pre-registered for autoloading. Therefore, when using an interactive system built by makeml (as opposed to the original config/install.sh) there is no need for loading the bootstrap compiler explicitly.

At this point one can invoke the bootstrap compiler by simply issuing the command CMB.make():


- CMB.make ();

If CMB.make() does not run to successful completion, you do not have to start from the beginning. Instead, fix the problem at hand and re-issue CMB.make() without terminating the interactive session in between. This tends to be a lot faster than starting over.

This process can be repeated arbitrarily many times until CMB.make() is successful.

A successful run looks like this:


- CMB.make ();
...
New boot directory has been built.
val it = true : bool
-

The return value of true indicates success. This means that (as indicated by the message above the return value) a directory with stable libraries and some other special files that are needed for ``booting'' a new interactive system has been created.

The name of the boot directory depends on circumstances. A part of it can be chosen freely, other parts depend on current architecture and operating system. For example, on a Sparc system running some version of Unix, the default name of the directory is sml.boot.sparc-unix.

There is also a similarly-named em binfile directory which is used by CMB.make() itself but which is not required for the purpose of subsequent ``boot'' steps.


next up previous contents
Next: 2.3 Booting a new Up: 2. Basic usage Previous: 2.1 Requirements   Contents
Matthias Blume
2001-07-19