diff options
author | simonmar <unknown> | 2002-05-02 13:33:27 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-05-02 13:33:27 +0000 |
commit | 95792891d27d6e5409f8d4fa53e4817f4a26f723 (patch) | |
tree | acf0decce3acbc1a0421ae5e6bd488e8929d5088 /distrib/cross-port | |
parent | 5248496621bd23d3d42f8e0929278e110797d1c1 (diff) | |
download | haskell-95792891d27d6e5409f8d4fa53e4817f4a26f723.tar.gz |
[project @ 2002-05-02 13:33:27 by simonmar]
Add this script which does an unregisterised bootstrap to build HC
files for porting GHC.
Diffstat (limited to 'distrib/cross-port')
-rw-r--r-- | distrib/cross-port | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/distrib/cross-port b/distrib/cross-port new file mode 100644 index 0000000000..ea616bee1d --- /dev/null +++ b/distrib/cross-port @@ -0,0 +1,59 @@ +#! /bin/bash + +# This script can be used to generate some unregisterised .hc files +# for bootstrapping GHC on a new/unsupported platform. It involves a +# two-stage bootstrap: the first stage builds an unregisterised set of +# libraries & RTS, and the second stage builds an unregisterised +# compiler. + +# Take the .hc files from the libraries of stage 1, and the compiler +# of stage 2, to the target system and bootstrap from these to get a +# working (unregisterised) compiler. + +set -e + +long='-optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C' + +base=`pwd` + +if [ ! -f b1-stamp ]; then + mkdir b1 + cd b1 + lndir ../fptools + cd .. + + mkdir b1-obj + + cd b1 + ./configure --prefix=$base/b1-obj + echo "GhcLibHcOpts = -O -H24m -keep-hc-files-too $long" >> mk/config.mk + echo "GhcRtsHcOpts = -O $long" >> mk/config.mk + make boot + make all + make install + cd .. + + touch b1-stamp +fi + +# exit 0 + +if [ ! -f b2-stamp ]; then + mkdir b2 + cd b2 + lndir ../fptools + cd .. + + mkdir b2-obj + cd b2 + ./configure --prefix=$base/b2-obj --with-hc=$base/b1-obj/bin/ghc + echo "WithGhcHc = $base/b1-obj/bin/ghc" >> mk/config.mk + echo "GhcHcOpts = -O -H24m -keep-hc-files-too $long" >> mk/config.mk + echo "GhcWithNativeCodeGen=NO" >> mk/config.mk + make boot + make all + make install + cd .. + + touch b2-stamp +fi |