Unreg/registerised hc booting success
Donald Bruce Stewart
Wed, 3 Sep 2003 18:08:32 +1000
> On Wed, Sep 03, 2003 at 12:39:33PM +1000, Donald Bruce Stewart wrote:
> > $ ghc/ghc-6.0.1/ghc/compiler/ghc-inplace
> > ghc-6.0.1: no input files
> > Usage: For basic information, try the `--help' option.
> > $ ghc/ghc-6.0.1/ghc/compiler/ghc-inplace hello.hs
> > hello.hs:1:
> > Failed to load interface for `Prelude':
> > Could not find interface file for `Prelude'
> > (use -v to see a list of the files searched for)
> > I'll solve this library thing, try and build a compiler.
> > And then try a sparc.
> I have found that I need to copy the library/ .hi files across, although
> Simon Marlow seemed to think that should be unnecessary. Also,
> ghc/driver/package.conf.inplace seems to become the empty list; I
> haven't bothered to look into this as it's easy enough just to copy
> ghc/driver/package.conf.inplace.old over the top of it. This isn't
> following the new docs online so YMMV.
I tarred up the libraries/ .hi files on the host box:
$ find libraries -name '*.hi' -print > /tmp/f
$ tar czf ghc-6.0.1-hi.tar.gz `cat /tmp/f`
copied them across, and untarred over the tree. Also needed the
package.conf.in tweak. And I had to turn off "dl" in the
extra_libraries list of package.co.inplace (for FreeBSD).
Yay! A pretty straightforward cross-os bootstrap, from
i386-*-openbsd to i386-*-freebsd:
$ cat hello.hs
main = print System.Info.arch >> print System.Info.os
$ ghc/ghc-6.0.1/ghc/compiler/ghc-inplace --numeric-version
$ ghc/ghc-6.0.1/ghc/compiler/ghc-inplace hello.hs
$ % ./a.out
I'll try a cross-processor port now.