> I am trying to build GHC 5.02 on an x86 Solaris machine (with 
> the x86 HC
> stuff) and I am getting this error:
> 
> 
> gcc -x c MArray.hc -o MArray.raw_s -S -O  -fno-defer-pop 
> -fomit-frame-pointer   -DDONT_WANT_WIN32_DLL_SUPPORT 
> -D__GLASGOW_HASKELL__=502  -O   
> -I/tmp/foo/ghc-5.02/ghc/includes 
> -I/tmp/foo/ghc-5.02/ghc/lib/std/cbits 
> -I/tmp/foo/ghc-5.02/hslibs/lang/cbits 
> -I/tmp/foo/ghc-5.02/hslibs/posix/cbits 
> -I/tmp/foo/ghc-5.02/hslibs/util/cbits 
> -I/tmp/foo/ghc-5.02/hslibs/text/cbits 
> -I/tmp/foo/ghc-5.02/hslibs/hssource/cbits  
> -I../../ghc/lib/std/cbits -I../../ghc/includes -Icbits    -I. 
>  `echo  | sed 's/^$/-DSTOLEN_X86_REGS=4/'`
> MArray.hc: In function `sbMI_ret':
> MArray.hc:5292: fixed or forbidden register 3 (bx) was 
> spilled for class GENERAL_REGS.
> MArray.hc:5292: This may be due to a compiler bug or to impossible asm
> MArray.hc:5292: statements or clauses.
> MArray.hc:5292: This is the instruction:
> (insn 28 26 31 (set (mem/s:DI (plus:SI (plus:SI (mult:SI (reg:SI 25)
>                         (const_int 8 [0x8]))
>                     (reg:SI 26))
>                 (const_int 8 [0x8])) 0)
>         (reg/v:DI 24)) 79 {movdi+1} (insn_list 16 (insn_list 
> 24 (insn_list 26 (nil))))
>     (expr_list:REG_DEAD (reg/v:DI 24)
>         (expr_list:REG_DEAD (reg:SI 25)
>             (expr_list:REG_DEAD (reg:SI 26)
>                 (nil)))))
> make[1]: *** [MArray.raw_s] Error 1
> make: *** [all] Error 1
> make: Leaving directory `/tmp/foo/ghc-5.02/hslibs'

You need to add the line

        MArray_HC_OPTS += -monly-3-regs

to fptools/hslibs/lang/Makefile.

> I have also fount it neccesary to add
> /tmp/foo/ghc-5.02/ghc/driver/mangler to the path for ghc-asm - should
> this be needed?

I don't know, we haven't tested the bootstrapping process very
thoroughly due to lack of time.  I'll be happy to look through any
patches you come up with, though.

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to