ViewVC logotype

Diff of /src/BUILDING

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by rtoy, Tue May 17 16:14:05 2005 UTC revision 1.19 by rtoy, Fri Feb 3 22:20:59 2006 UTC
# Line 68  Setting up a build environment Line 68  Setting up a build environment
69  That's it, you are now ready to build CMU CL.  That's it, you are now ready to build CMU CL.
71    A quick guide for simple builds
72    -------------------------------
74    We recommend that you read all of this document, but in case you don't
75    want to do that and in case you know, somehow, that the version of
76    CMUCL you are building from will build the sources you have, here is a
77    quick guide.
79    a) Simple builds
81       Use this to build from a version of CMUCL that is very close to the
82       sources you are trying to build now:
84       src/tools/build.sh -C "" -o "<name-of-old-lisp> <options-to-lisp>"
86       This will build CMUCL 3 times, each time with the result of the
87       previous build.  The last time, the additional libraries like CLX,
88       CLM, and Hemlock are built.  The final result will be in the
89       directory build-4.
91       This script basically runs create-target.sh, build-world.sh,
92       load-world.sh three times.  See below for descriptions of these
93       scripts.
95    b) Slightly more complicated builds
97       For slightly more complicated builds, you may need to use some
98       bootstrap files.  See below for more information about these
99       bootstrap files.
101       For these, you can use this:
103       src/tools/build.sh -C "" -o "<old-lisp>" -B boot1.lisp -B boot2.lisp
105       The bootstrap files listed with the -B option (as many as needed)
106       are loaded in order, so be sure to get them right.
108       As in a) above, three builds are done, and the result is in the
109       directory build-4.
111    c) More complicated builds
113       If you have more complicated builds, this script probably will not
114       work, and definitely does not handle cross-compiles.  In this case,
115       you will have to invoke the individual scripts by hand, as
116       described below.
118    How do you know which of the three options above apply?  The easiest
119    way is to look in src/bootfiles/<version>/* for boot files.  If the
120    file date of a boot file is later than the version of CMUCL you are
121    building from, then you need to use b) or c) above.  You may need to
122    read the bootfiles for additional instructions, if any.
124    If there are no bootfiles, then you can use a) above.
126    The build.sh script supports other options, and src/tools/build.sh -?
127    will give a quick summary.  Read src/tools/build.sh for more
128    information.
130  A general outline of the build process  A general outline of the build process
131  --------------------------------------  --------------------------------------
# Line 555  again.  Just follow the directions for a Line 613  again.  Just follow the directions for a
613  xtarget/lisp/lisp as your compiler.  Be sure to use create-target.sh  xtarget/lisp/lisp as your compiler.  Be sure to use create-target.sh
614  to create a new directory where the result can go.  to create a new directory where the result can go.
616    Cross-Platform Cross-Compile
617    ----------------------------
619    A cross-platform cross-compile is very similar to a normal
620    cross-compile, and the basic steps are the same.  For the sake of
621    concreteness, assume we are on ppc/darwin and want to cross-compile
622    to x86/linux.
624    To simplify things, we assume that both platforms have access to the
625    same file system, via NFS or something else.
627    1. As above, we need to create directories for the cross-compiler and
628       compiled target.  We assume we are on ppc/darwin.  So, when running
629       create-target.sh we need to specify the target:
631            src/tools/create-target.sh x86-cross x86
632            src/tools/create-target.sh x86-target x86
634    2. Adjust the cross-compilation script.  An example for ppc/darwin to
635       x86/linux is in src/tools/cross-scripts/cross-ppc-x86.lisp.
637    3. Build the cross compiler and target, as above, using the specified
638       cross-compile script:
640            src/tools/cross-build-world.sh x86-target x86-cross cross.lisp [ppc binary]
642       where cross.lisp is the cross-compile script from 2) above.
644    4. Everything has now been compiled for the x86/linux target.  We need
645       to compile the C code for x86 and create a lisp.core from the
646       kernel.core.  This is where it's useful to have both platforms be
647       able to access the same file system.  If not, you will need to copy
648       all of the generated files from ppc/darwin to x86/linux.  Basically
649       everything in xtarget needs to be copied.
651       Note carefully that you may have to edit lisp/internals.h and/or
652       lisp/internals.inc to have the correct features.  This is a known
653       bug in the generation of these files during cross-compilation.
655       Compile the lisp code:
657            src/tools/rebuild-lisp.sh x86-target
659    5. Now run load-world.sh to create the desired lisp.core from lisp and
660       kernel.core.  As above, PCL has not been compiled, so select
661       restart 3 (return nil from pclload) to create lisp.core
663            src/tools/load-world.sh x86-target "new x86"
665    At this point, you will have a shiny new lisp on the new platform.
666    Since it's missing PCL, you will need to do at least one normal build
667    to get PCL included.  This is also a good check to see if everything
668    was compiled properly.  A full set of builds via build.sh might be
669    good at this point too.

Removed from v.1.2  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.5