
W.B. Kloke wrote:
In my effort to produce a working FreeBSD-amd64 compiler I made some progress. Now I have a working stage1/ghc-inplace (which is a 32bit executable producing 64bit code). But the compilation of rts fails in file Apply.cmm with the following message:
== gmake all -r; in /.amd_mnt/vestein/host/usr/home/wb/ghc-6.8.1/rts ------------------------------------------------------------------------ ../compiler/ghc-inplace -H16m -O -optc-O2 -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -dcmm-lint -c Apply.cmm -o Apply.o
In file included from Apply.cmm:13:0:
/.amd_mnt/vestein/host/usr/home/wb/ghc-6.8.1/includes/Cmm.h:333:2: error: #error mp_limb_t != StgWord: assumptions in PrimOps.cmm are now false gmake[1]: *** [Apply.o] Error 1 gmake: *** [stage1] Error 1
This is, of course, because the derived constants SIZEOF_mp_limb_t is wrong. Is there a way to get to a working system from this intermediate stage?
Are you following the porting instructions in http://hackage.haskell.org/trac/ghc/wiki/Building/Porting? I would expect SIZEOF_mp_limb_t to be correct, as it is generated by mkDerivedConstants. Perhaps you compiled mkDerivedConstants as a 32-bit executable? Cheers, Simon