/[cmucl]/src/BUILDING
ViewVC logotype

Diff of /src/BUILDING

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

revision 1.1.6.1 by rtoy, Mon Dec 19 01:09:45 2005 UTC revision 1.24 by rtoy, Wed May 11 14:20:27 2011 UTC
# Line 245  the scripts included with this little te Line 245  the scripts included with this little te
245  Overview of the included build scripts  Overview of the included build scripts
246  --------------------------------------  --------------------------------------
247    
248    * src/tools/build.sh [-123obvuBCU?]
249    
250    This is the main build script.  It essentially calls the other build
251    scripts described below in the proper sequence to build cmucl from an
252    existing binary of cmucl.
253    
254  * src/tools/create-target.sh target-directory [lisp-variant [motif-variant]]  * src/tools/create-target.sh target-directory [lisp-variant [motif-variant]]
255    
256  This script creates a new target directory, which is a shadow of the  This script creates a new target directory, which is a shadow of the
# Line 613  again.  Just follow the directions for a Line 619  again.  Just follow the directions for a
619  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
620  to create a new directory where the result can go.  to create a new directory where the result can go.
621    
622    Cross-Platform Cross-Compile
623    ----------------------------
624    
625    A cross-platform cross-compile is very similar to a normal
626    cross-compile, and the basic steps are the same.  For the sake of
627    concreteness, assume we are on ppc/darwin and want to cross-compile
628    to x86/linux.
629    
630    To simplify things, we assume that both platforms have access to the
631    same file system, via NFS or something else.
632    
633    1. As above, we need to create directories for the cross-compiler and
634       compiled target.  We assume we are on ppc/darwin.  So, when running
635       create-target.sh we need to specify the target:
636    
637            src/tools/create-target.sh x86-cross x86
638            src/tools/create-target.sh x86-target x86
639    
640    2. Adjust the cross-compilation script.  An example for ppc/darwin to
641       x86/linux is in src/tools/cross-scripts/cross-ppc-x86.lisp.
642    
643    3. Build the cross compiler and target, as above, using the specified
644       cross-compile script:
645    
646            src/tools/cross-build-world.sh x86-target x86-cross cross.lisp [ppc binary]
647    
648       where cross.lisp is the cross-compile script from 2) above.
649    
650    4. Everything has now been compiled for the x86/linux target.  We need
651       to compile the C code for x86 and create a lisp.core from the
652       kernel.core.  This is where it's useful to have both platforms be
653       able to access the same file system.  If not, you will need to copy
654       all of the generated files from ppc/darwin to x86/linux.  Basically
655       everything in xtarget needs to be copied.
656    
657       Note carefully that you may have to edit lisp/internals.h and/or
658       lisp/internals.inc to have the correct features.  This is a known
659       bug in the generation of these files during cross-compilation.
660    
661       Compile the lisp code:
662    
663            src/tools/rebuild-lisp.sh x86-target
664    
665    5. Now run load-world.sh to create the desired lisp.core from lisp and
666       kernel.core.  As above, PCL has not been compiled, so select
667       restart 3 (return nil from pclload) to create lisp.core
668    
669            src/tools/load-world.sh x86-target "new x86"
670    
671    At this point, you will have a shiny new lisp on the new platform.
672    Since it's missing PCL, you will need to do at least one normal build
673    to get PCL included.  This is also a good check to see if everything
674    was compiled properly.  A full set of builds via build.sh might be
675    good at this point too.
676    
677    Some of the details for each command may have changed;  You can get
678    help for each command by using the -h argument.
679    
680    In particular steps 3, 4, and 5 can be combined into one by using the
681    -c, -r, and -l options for cross-build-world.sh.  The -c option cleans
682    out the targe and cross directories; -r does step 4; and -l does step
683    5.

Legend:
Removed from v.1.1.6.1  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.5