
On 2001-07-11T10:28:33+0100, Simon Marlow wrote:
I wonder if it matters whether PLATFORM_CC_OPTS is set to -static in mk/bootstrap.mk? The comments there say that the flags "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 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 -static.
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
./configure $MAKE -C ghc/utils clean boot # ...
(the "./configure" in which I interpret as um, shorthand for
GHC=
\ HappyCmd= \ ./configure ), but making boot in ghc/utils involves "ghc-inplace -M", which fails:
$ .../ghc-inplace -M -optdep-f -optdep.depend -osuf o -cpp -DPKG_TOOL -DWANT_PRETTY -package lang -package util -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 is: - 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. Cheers, Simon
participants (1)
-
Simon Marlow