
Hi Ken,
On 2001-07-05T10:34:27+0100, Simon Marlow wrote:
This isn't right: you shouldn't set GhcHcOpts in the first build. In the URL you gave, this line was commented out. That's certainly the reason for the core dumps.
Ah! Careless me. Thank you.
In GHC 5.00.2, there's an easier way. For the c1 & c2 builds, you can just set GhcUnregisterised = YES in build.mk, and you can set $long to empty.
This seems to have worked. By the way, the "old way" (as specified in the MacOS port readme) does not work with ghc 5 -- I got a seg fault when running ghc-inplace during the second stage.
Hmm, I should really add a section to the building guide on porting and unregisterised compilation.
When you get around to bootstrapping on the Alpha, I'll probably need to help you some more, because bootstrapping from .hc files is quite tricky on 5.00.
I'm there!
Great, you're in uncharted territory now :-) (no-one has bootstrapped from unregisterised .hc files with 5.00 yet...)
The first obstacle I encountered is that PackedString.raw_s seems to be mangled incorrectly.
Ok, for unregisterised building we need to disable the mangler. You should be able to just compile the .hc files directly using gcc, but you'll need to make sure that -DNO_REGS and -DUSE_MINIINTERPRETER are added to gcc's command line. The relevant makefile code is in fptools/mk/bootstrap.mk - I'm sure you'll be able to modify it to do the right thing. When you've got it working we'll think about how to set up the bootstrapping system so mangling is optional. (if you're wondering why this is harder than it used to be with 4.08, it's because we used to have the "driver" written in Perl, and the driver knew all about compiling .hc files. Now the driver is in Haskell and part of the compiler itself, we have to manage without it during bootstrapping, hence the new bootstrap.mk makefile) Cheers, Simon

On 2001-07-10T10:24:30+0100, Simon Marlow wrote:
Great, you're in uncharted territory now :-) (no-one has bootstrapped from unregisterised .hc files with 5.00 yet...)
Heh.
Ok, for unregisterised building we need to disable the mangler. You should be able to just compile the .hc files directly using gcc, but you'll need to make sure that -DNO_REGS and -DUSE_MINIINTERPRETER are added to gcc's command line.
For now, I added these flags to EXTRA_CC_OPTS in mk/build.mk. It seems to work. Meanwhile --
The relevant makefile code is in fptools/mk/bootstrap.mk - I'm sure you'll be able to modify it to do the right thing. When you've got it working we'll think about how to set up the bootstrapping system so mangling is optional.
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. (By the way, are *_hsc.[hc] files considered part of the ".hc distribution"? I needed them for compiling, say, Directory.hc.) Anyway, the current hurdle is that ghc/lib/std/PrelInt.hc doesn't compile because int64ToIntegerzh_fast is not declared because ghc/includes/PrimOps.h did not declare it because SUPPORT_LONG_LONGS is not defined in ghc/includes/StgTypes.h because SUPPORT_LONG_LONGS is defined in ghc/includes/StgTypes.h if and only if HAVE_LONG_LONG && SIZEOF_VOID_P < 8, and SIZEOF_VOID_P is 8. I'm not sure what the right fix is here. Why does StgTypes.h not define SUPPORT_LONG_LONGS if SIZEOF_VOID_P >= 8, anyway? -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig "There isn't anyone out there who isn't Seymour's fat lady."
participants (2)
-
Ken Shan
-
Simon Marlow