
On Thu, Sep 10, 2009 at 5:41 PM, Malcolm Wallace
1. The hc files are generated by nhc98comp? I will still need to modify nhc98comp to always produce the unsigned char*?
Yes, and yes. The latter will be easy - it should be a single line change 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. The main reason for using the nhc98 script is just 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++ = (Node)&constptr[ HEAPOFFSET(ip[0])]; ip+=1; 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 -- http://www.fernski.com