Re: porting nhc98 to plan9
Fernan Bolando <[email protected]> Sat, 12 Sep 2009 18:19:34 +0800
| Newsgroups | gmane.comp.lang.haskell.nhc.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Sep 10, 2009 at 5:41 PM, Malcolm Wallace <[email protected]> wrote: >> 1. The hc files are generated by nhc98comp? I will still need to >> modify nhc98comp to always produce the unsigned char*? > > Yes, and yes. =A0The latter will be easy - it should be a single line cha= nge > in src/compiler98/EmitState.hs > >> 2. I am also bypassing nhc98 script during the prelude build. I am >> created a separate script to compile prelude under plan9. The script >> just loads the hc files into the C compiler. > > Might be reasonable. =A0The main reason for using the nhc98 script is jus= t to > ensure that the right header files etc are visible. > >> 3. I am still guessing here, but If item 2 is an ok approach is it >> possible to simply compile src/runtime/Runtime.a and use the .o files >> from a unix build? > > Yes, that might well work, if the .o files are ABI-compatible across unix > and plan9. > Hi Thanks for the help. I can now compile most of the hc files. As a test I also compiled cpphs. It compiles fine, but as I expected it crashes very early into the intialization. It seems segfaults somewhere in run(toplevel) Case(HEAP_CADR_P1): *hp++ =3D (Node)&constptr[ HEAPOFFSET(ip[0])]; ip+=3D1; Break; The ip appears to be bieng initialized by a wrong value, but I dont have any way of proving this yet. Is there some additional documentation in the boot steps of the G-machine? fernan --=20 http://www.fernski.com