/[cmucl]/src/BUILDING
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.14 by rtoy, Tue Jan 24 19:51:45 2006 UTC
# Line 68  Setting up a build environment Line 68  Setting up a build environment
68    
69  That's it, you are now ready to build CMU CL.  That's it, you are now ready to build CMU CL.
70    
71    A quick guide for simple builds
72    -------------------------------
73    
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.
78    
79    a) Simple builds
80    
81       Use this to build from a version of CMUCL that is very close to the
82       sources you are trying to build now:
83    
84       src/tools/build.sh -C "" -o "<name-of-old-lisp> <options-to-lisp>"
85    
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.
90    
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.
94    
95    b) Slightly more complicated builds
96    
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.
100    
101       For these, you can use this:
102    
103       src/tools/build.sh -C "" -o "<old-lisp>" -B boot1.lisp -B boot2.lisp
104    
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.
107    
108       As in a) above, three builds are done, and the result is in the
109       directory build-4.
110    
111    c) More complicated builds
112    
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.
117    
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.
123    
124    If there are no bootfiles, then you can use a) above.
125    
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.
129    
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.
615    
616    Cross-Platform Cross-Compile
617    ----------------------------
618    
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.
623    
624    To simplify things, we assume that both platforms have access to the
625    same file system, via NFS or something else.
626    
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:
630    
631            src/tools/create-target.sh x86-cross x86
632            src/tools/create-target.sh x86-target x86
633    
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.
636    
637    3. Build the cross compiler and target, as above, using the specified
638       cross-compile script:
639    
640            src/tools/cross-build-world.sh x86-target x86-cross cross.lisp [ppc binary]
641    
642       where cross.lisp is the cross-compile script from 2) above.
643    
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.
650    
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.
654    
655       Compile the lisp code:
656    
657            src/tools/rebuild-lisp.sh x86-target
658    
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
662    
663            src/tools/load-world.sh x86-target "new x86"
664    
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.
670    
671    
672    
673    
674    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.5