Cross-compiling YHC for XScale/ARM based WinCE

I have a PDA, I'm trying to port YHC to it. It's currently using Windows (in the PDA only), and I'm not planning to change it for the time being. I'm using cegcc to compile yhc. Since yhc is written in haskell, I used ghc to generate the .hc files, then used cegcc to compile them to binary code. I'm getting this error: In file included from /usr/lib/ghc-6.4.2/include/Stg.h:149, from State.c:3: /usr/lib/ghc-6.4.2/include/Regs.h:213: error: invalid register name for 'R1' ... Looks like has something to do with ghc. Should I install yhc and use it to generate the C code instead? Any suggestions?

Iván Pérez Domínguez
I'm using cegcc to compile yhc. Since yhc is written in haskell, I used ghc to generate the .hc files, then used cegcc to compile them to binary code.
If you bootstrap yhc with ghc, then you will first need to port ghc to your platform. The C-code produced by ghc on one platform is not portable to other platforms, unless you follow the instructions on cross-compiling ghc. (This is likely to take a significant amount of effort.) Unfortunately, yhc is not yet self-hosting, otherwise it would be much easier to move it to a new platform. I do not know whether nhc98 might suit your needs better? It can be bootstrapped using just a C compiler, is self-compilable after that, and includes many more libraries than yhc. Regards, Malcolm

Hi Ivan,
Unfortunately, yhc is not yet self-hosting, otherwise it would be much easier to move it to a new platform. I do not know whether nhc98 might suit your needs better? It can be bootstrapped using just a C compiler, is self-compilable after that, and includes many more libraries than yhc.
This is sadly true. You're likely to undergo much pain with nhc as well, since wince is basically a Windows platform, and nhc is not available on Windows in any pleasant way. What you really need is the good bits of nhc and Yhc in one single compiler project - which we should definately do!!! Thanks Neil
participants (3)
-
Iván Pérez Domínguez
-
Malcolm Wallace
-
Neil Mitchell