3 # This script can be used to generate some unregisterised .hc files
4 # for bootstrapping GHC on a new/unsupported platform. It involves a
5 # two-stage bootstrap: the first stage builds an unregisterised set of
6 # libraries & RTS, and the second stage builds an unregisterised
9 # Take the .hc files from the libraries of stage 1, and the compiler
10 # of stage 2, to the target system and bootstrap from these to get a
11 # working (unregisterised) compiler.
15 long='-optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C'
19 if [ ! -f b1-stamp ]; then
28 ./configure --prefix=$base/b1-obj
29 echo "GhcLibHcOpts = -O -H24m -keep-hc-files-too $long" >> mk/config.mk
30 echo "GhcRtsHcOpts = -O $long" >> mk/config.mk
41 if [ ! -f b2-stamp ]; then
49 ./configure --prefix=$base/b2-obj --with-hc=$base/b1-obj/bin/ghc
50 echo "WithGhcHc = $base/b1-obj/bin/ghc" >> mk/config.mk
51 echo "GhcHcOpts = -O -H24m -keep-hc-files-too $long" >> mk/config.mk
52 echo "GhcWithNativeCodeGen=NO" >> mk/config.mk