How to compile .hc files with gcc?

Srđan Stipić srdjan.stipic at gmail.com
Tue Jul 3 06:36:22 EDT 2007


I wanted to compile simple Haskell program (simple.hs) to .c and after
that to target platform (x86).

I did  the following things:

ghc -C simple.hs
mv simple.hc simple.c
gcc -c simple.c -I/usr/lib/ghc-6.6/include/

And I got the following error message:

In file included from /usr/lib/ghc-6.6/include/Stg.h:148,
                 from treci.c:3:
/usr/lib/ghc-6.6/include/Regs.h:220: warning: call-clobbered register
used for global register variable
/usr/lib/ghc-6.6/include/Regs.h:226: warning: call-clobbered register
used for global register variable
/tmp/ccBtIPsT.s: Assembler messages:
/tmp/ccBtIPsT.s:31: Error: junk at end of line, first unrecognized
character is `-'
/tmp/ccBtIPsT.s:63: Error: junk at end of line, first unrecognized
character is `-'

How to compile .hc files with gcc?

Tnx,
Srdjan


More information about the Glasgow-haskell-users mailing list