anchor.diff:    #+sbcl (sb-unix:unix-exit code)
     #-(or abcl allegro clisp clozure cmu ecl gcl lispworks mcl sbcl scl xcl)
     (error "xcvb driver: Quitting not implemented"))
  +
   (defun shell-boolean (x)
     "Quit with a return code that is 0 iff argument X is true"
     (quit (if x 0 1)))
  -(defun print-backtrace (out)
  -  "Print a backtrace (implementation-defined)"
  -  (declare (ignorable out))
  -  #+clozure (let ((*debug-io* out))
  -	      (ccl:print-call-history :count 100 :start-frame-number 1)
  -	      (finish-output out))
  -  #+sbcl
  -  (sb-debug:backtrace
  -   #.(if (find-symbol* "*VERBOSITY*" "SB-DEBUG" nil) :stream 'most-positive-fixnum)
  -   out))
  +
   (defun die (format &rest arguments)
     "Die in error with some error message"
     (format! *stderr* "~&")
     (apply #'format! *stderr* format arguments)
     (format! *stderr* "~&")
     (quit 99))
  +
   (defun bork (condition)
     "Depending on whether *DEBUGGING* is set, enter debugger or die"
     (format! *stderr* "~&BORK:~%~A~%" condition)
  
positive.code:         (setf *previous-optimization-settings* settings)
          (format! *error-output* "~&Optimization settings: ~S~%" settings)))))
  
  
  ;;; These variables are shared with XCVB itself.
  (defvar *lisp-implementation-type*
    ;; TODO: test on all OS and implementation platform combinations!
    #+abcl :abcl #+allegro :allegro
    #+clisp :clisp #+clozure :ccl #+cmu :cmucl #+cormanlisp :corman
    #+ecl :ecl #+gcl :gcl #+genera :genera
    #+lispworks-personal-edition :lispworks-personal
    #+(and lispworks (not lispworks-personal-edition)) :lispworks
    #+mcl :mcl #+sbcl :sbcl #+scl :scl #+xcl :xcl
    #-(or abcl allegro clisp clozure cmu cormanlisp
          ecl gcl genera lispworks mcl sbcl scl xcl)
    (error "Your Lisp implementation is not supported by the XCVB driver (yet). Please help.")
    "Type of Lisp implementation for the target system. A keyword.
    Default: same as XCVB itself.")
  
  (defvar *lisp-executable-pathname* nil
    "Path to the Lisp implementation to use for the target system.
    NIL, or a string.
    Default: what's in your PATH.")
  
  (defvar *lisp-image-pathname* nil
    "What path to a Lisp image do we need invoke the target Lisp with?
    Default: whatever's the default for your implementation.")
  
  (defvar *lisp-implementation-directory*
    (or #+clozure (namestring (ccl::ccl-directory))
        #+gcl (namestring system::*system-directory*)
        #+sbcl (namestring (sb-int:sbcl-homedir-pathname)))
    "Where is the home directory for the Lisp implementation,
    in case we need it to (require ...) special features?
    Default: whatever's the default for your implementation.")
  
  (defvar *lisp-flags* :default
    ;;; TODO: add support for overriding this feature at the command-line?
    "What options do we need invoke the target Lisp with?
  A list of strings, or the keyword :DEFAULT.")
  
  (defvar *features-defined* nil
    "What additional features to define in the target image")
  
  (defvar *features-undefined* nil
    "What additional features to undefine in the target image")
  
  (defvar *disable-cfasls* nil
    "Should we disable CFASL support when the target Lisp has it?")
  
  (defvar *xcvb-verbosity* 5
    "Level of verbosity of XCVB:
    0 - silent except for emergency
    5 - usual warnings
    9 - plenty of debug info")
  
  (defvar *lisp-allow-debugger* nil
    "Should we allow interactive debugging of failed build attempts?")
  
  (defvar *object-directory* nil
    "where to store object files.
  NIL: default to ~/.cache/xcvb/common-lisp/sbcl-1.0.47-x86/ or some such, see docs")
  
  (defvar *tmp-directory-pathname*
    (let* ((dir
            #+os-unix (format nil "~A/" (or (getenv "TMP") "/tmp"))
            #+os-windows (format nil "~A\\" (or (getenv "TEMP") (error "No temporary directory!"))))
           #+mcl (dir (probe-posix dir)))
      (pathname dir))
    "pathname of directory where to store temporary files")
  
  (defvar *use-base-image* t
    "Should we be using a base image for all builds?")
  
  ;;; These variables are specific to XCVB master.
  (defvar *xcvb-program* "xcvb"
    "Path to the XCVB binary (a string), OR t if you want to use an in-image XCVB")
  
  (defvar *source-registry* nil
    "CL source registry specification. A sexp or string.
  Will override the shell variable CL_SOURCE_REGISTRY when calling slaves.")
  
  (defvar *xcvb-setup* nil
    "Lisp file to load to setup the target build system, if any")
  
  (defvar *manifest* nil
    ;; Note that older versions are kept in the tail, documenting the command history,
    ;; without affecting the behavior of ASSOC on the alist.
    "an alist of the XCVB load commands executed in this image,
  with associated pathnames and tthsums.")
  
  
  ;;; Debugging
  (defun debugging (&optional (debug t))
    "Enable (or with NIL argument, disable) verbose debugging output from XCVB"
    (setf *debugging* debug
  
negative.code:   #-(or allegro clisp clozure cmu gcl lispworks sbcl scl)
    (die "Can't dump ~S: xcvb-driver doesn't support image dumping with this Lisp implementation.~%" filename))
  
  ;;; DSL entry point to create images
  #-ecl
  (defun do-create-image (image dependencies &rest flags)
    (let ((*goal* `(create-image ,image))
  