On Mon, Mar 17, 2008 at 01:25:07AM -0400, Dustin DeWeese wrote:
> I'm working on a registerised port of GHC 6.8.2 to an ARM CPU.

Great!

> After making the changes needed (listed in the 'Porting GHC' wiki page), I am 
> trying to compile GHC.
> 
> The build fails while compiling the stage 2 compiler with this error message:
> 
> basicTypes/OccName.lhs-boot:1:0:
>     Bad interface file: 
> /home/dusty/deb-src2/ghc6-6.8.2/libraries/base/dist/build/Prelude.hi
>         mismatched interface file ways: expected , found u
> 
> I am pretty sure that Prelude is registerised because ghc-asm prints out some 
> diagnostics while compiling it.
> 
> Does anyone know what's going on or how I can fix it?  How can I check a .hi 
> file to see if it is unregisterised?

Hmm, ghc --show-iface doesn't seem to tell you.

Here's the start of hexdump -C on an unregisterised Prelude.hi:

00000000  01 fa ce 64 00 00 00 00  00 00 18 7e 04 00 00 00 |...d.......~....|
00000010  36 00 00 00 30 00 00 00  38 00 00 00 32 01 00 00 |6...0...8...2...|
00000020  00 75 00 00 00 00 00 00  18 76 00 00 00 00 00 00 |.u.......v......|

The 01 (byte 30) after the version number is the length of the way
string. the next 4 bytes are treated as a Word32 which is converted into
the Char 'u'.

Here's a registerised Prelude.hi, with no way string (length 0):

00000000  01 fa ce 64 00 00 00 00  00 00 18 7a 04 00 00 00 |...d.......z....|
00000010  36 00 00 00 30 00 00 00  38 00 00 00 32 00 00 00 |6...0...8...2...|
00000020  00 00 00 00 18 72 00 00  00 00 00 00 00 00 00 00 |.....r..........|

Some bits may be smaller if you are 32bit, but the version number should
allow you to orientate yourself.

> Here is my build.mk:

Nothing jumps out as being wrong. To save time, you might want to add

GhcLibWays=

and remove your GhcRTSWays definitions, as there's no point building the
profiling libraries and RTS for now.


Also, what is the output of

    compiler/stage1/ghc-inplace --info

?


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to