> A typo:
> 
> $ diff fptools-orig/ghc/rts/RtsFlags.c fptools/ghc/rts/RtsFlags.c
> 219c219
> < "  -M<size> Sets the maximum heap size (default 64M)  Egs: 
> -M256k -M1G",
> ---
> > "  -M<size> Sets the maximum heap size (default 64M)  Egs: 
> -H256k -H1G",

Thanks, fixed. 

> Then, ghc refused to compile because of lacking heap. (Although this
> seems a little strange: how did anybody compile it then?)
> 
> $ diff fptools-orig/ghc/compiler/Makefile 
> fptools/ghc/compiler/Makefile
> 193c193
> < rename/ParseIface_HC_OPTS   += -Onot -H75m 
> -fno-warn-incomplete-patterns
> ---
> > rename/ParseIface_HC_OPTS   += -Onot -H45m 
> -fno-warn-incomplete-patterns

Firstly, use -dcore-lint when compiling this module (it seems to alleviate a
space leak).  Then ParseIface will compile in about 55M, which is still
very, very bad, but not *as* bad.

The options I use most often to bootstrap the compiler are

        GhcHcOpts = -O -dcore-lint -H24m

and possibly -W for fun.

> To increase the heap to 75m, I head to increase the heap limit (-M) as
> well, but the ghc-4.02 from the binary distribution claimed 
> not to know
> about this option. So I browsed through the driver and found the
> following workaround. (Maybe it's clear to you what is going 
> wrong here
> and you know a proper fix? Is it me again?)

Use -optCrts-M<size> to pass this option to the compiler proper.
Unfortunately, we've already used -M for something else (to run mkdependHS).
And we really don't anticipate needing to pass -M to the compiler very
often.

Just gotta fix that space leak <sigh>.

Cheers,
        Simon

Reply via email to