GHC Alpha port?
Mon, 16 Jul 2001 10:50:10 +0100
> On 2001-07-11T10:28:33+0100, Simon Marlow wrote:
> > > I wonder if it matters whether PLATFORM_CC_OPTS is set to=20
> -static in
> > > mk/bootstrap.mk? The comments there say that the flags=20
> "should match
> > > the list in machdepCCOpts in ghc/compiler/DriverFlags.hs", and
> > > DriverFlags.hs does set -static for alpha.
> > I'm not sure whether -static is needed; try it without and see what
> > happens.
> I have no idea why, but...
> puffin:~/u/ghc-port/alpha/ghc/compiler$ ./ghc-inplace
> Alloc Collect Live GC GC TOT TOT =20
> Page Flts
> bytes bytes bytes user elap user elap
> ASSERTION FAILED: file GC.c, line 1347
> IOT/Abort trap (core dumped)
> The assertion in question is:
> /* make sure the info pointer is into text space */
> ASSERT(q && (LOOKS_LIKE_GHC_INFO(GET_INFO(q))
> || IS_HUGS_CONSTR_INFO(GET_INFO(q))));
> It seems that the GC code is sensitive to the layout of the virtual
> memory address space. In particular, I had to change HEAP_BASE from
> 0x50000000 to 0x200000000L in MBlock.h to get GC to work even with
So it doesn't work without -static? A HEAP_BASE change is not
unexpected, it all depends where the system puts its shared libraries.
> I assume it is supposed to be able to find these .hi files? The
> hc-build script calls for
> $MAKE -C ghc/utils clean boot
> # ...
> (the "./configure" in which I interpret as um, shorthand for
> GHC=3D<the ghc-inplace I just built from the .hc files> \
> HappyCmd=3D<a fake happy that simulates happy -v output> \
> ), but making boot in ghc/utils involves "ghc-inplace -M", which
> $ .../ghc-inplace -M -optdep-f -optdep.depend -osuf o =20
> -cpp -DPKG_TOOL -DWANT_PRETTY -package lang -package util=20
> -package text Main.hs Package.hs
> Main.hs: can't find one of the following: `IO.hi' `IO.hs' `IO.lhs'
> So... perhaps it would be obvious to you what I am missing?
The hc-build script is a little broken. What you actually need to do
- Take the .hs files generated from the .hsc files from the host
to the target (these should be part of the .hc file bundle).
- Build in ghc/lib/std and hslibs before ghc/utils,
- Then build in ghc/utils using the newly built libraries.