Difference between revisions of "Yhc/Porting"

From HaskellWiki
< Yhc
Jump to navigation Jump to search
m ("i.e." means "that is,"; "e.g. GCC" would be appropriate but we don't need abbreviations!)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{Yhc}}
 
{{Yhc}}
   
This describes how to port Yhc to a new architecture. It does not describe building which is covered in [[Yhc:Building|building Yhc]], and should probably be read before this.
+
This describes how to port Yhc to a new architecture. It does not describe building which is covered in [[Yhc/Building|building Yhc]], and should probably be read before this.
   
 
== Requirements ==
 
== Requirements ==
   
The target system must have an ANSI compliant (ish) C compiler (i.e. GCC) that can produce binaries for that platform. Whether you can cross compile C, or native compile C is not an issue.
+
The target system must have an ANSI compliant (ish) C compiler (such as GCC) that can produce binaries for that platform. Whether you can cross compile C, or native compile C is not an issue.
   
 
== Steps ==
 
== Steps ==

Latest revision as of 19:16, 3 August 2006

Part of Yhc

(Download)

This describes how to port Yhc to a new architecture. It does not describe building which is covered in building Yhc, and should probably be read before this.

Requirements

The target system must have an ANSI compliant (ish) C compiler (such as GCC) that can produce binaries for that platform. Whether you can cross compile C, or native compile C is not an issue.

Steps

Compile yhi

Compile the runtime system, this is written in ANSI C. You will need a config.h file, which can either be generated from configure, or written by hand. If you need to make further changes to the source code, please send patches or bug reports. The standard build method is using a Makefile, although manually compiling and linking every *.c file also works fine.

Finished

Once yhi is running, you can use the cross platform version of yhc, as a .hbc file, and you have a haskell compiler on your target system. Of course, on an embedded system it is unlikely that you will want the haskell compiler as well.