7. Booting/porting from C (.hc) files

This section is for people trying to get GHC going by using the supplied intermediate C (.hc) files. This would probably be because no binaries have been provided, or because the machine is not ``fully supported''.

The intermediate C files are normally made available together with a source release, please check the announce message for exact directions of where to find them. If we haven't made them available or you can't find them, please ask.

Assuming you've got them, unpack them on top of a fresh source tree. This will place matching .hc files next to the corresponding Haskell source in the compiler subdirectory ghc and in the language package of hslibs (i.e., in hslibs/lang). Then follow the `normal' instructions in Section 5 for setting up a build tree.

The actual build process is fully automated by the hc-build script located in the distrib directory. If you eventually want to install GHC into the directory INSTALL_DIRECTORY, the following command will execute the whole build process (it won't install yet):

foo% distrib/hc-build --prefix=INSTALL_DIRECTORY

By default, the installation directory is /usr/local. If that is what you want, you may omit the argument to hc-build. Generally, any option given to hc-build is passed through to the configuration script configure. If hc-build successfully completes the build process, you can install the resulting system, as normal, with

foo% make install

That's the mechanics of the boot process, but, of course, if you're trying to boot on a platform that is not supported and significantly `different' from any of the supported ones, this is only the start of the adventure…(ToDo: porting tips—stuff to look out for, etc.)