
I'm considering taking some effort to port GHC to powerpc linux. The task seems moderately doable, given that GHC once ran on the powerpc architecture.
Cool! :)
I guess as a good first question: should I start with 4.08.1, or should I venture off with the CVS tree. The driver in CVS seems to have been written in Haskell, and it seems to be needed to build the runtime. This sounds like it would preclude building from .hc files.
I would start from 4.08.1, for exactly that reason. We haven't tackled the issue of bootstrapping with the Haskell driver. The plan was to use a handwritten Makefile to build an unregisterised driver from .hc sources using plain gcc, but this isn't done yet. Furthermore, we're about to merge the driver with the compiler proper as part of the GHCi reorganisation, so things are going to be broken for a while...
I've got my x86 linux box ready to build some unregistered .hc files.
You'll need two build trees. In the first tree, build the compiler as normal, and the libraries/RTS with -unreg -keep-hc-files-too. You should be able to use these .hc files to try out some simple programs on the PPC. In the second tree, bootstrap the compiler using the compiler from the first tree with -unreg -keep-hc-files-too. Take these .hc files to the PPC and bootstrap them there. Cheers, Simon PS. there may be some difficulties with the -unreg flag: it actually specifies way 'u', so you may get .u_hc files instead of .hc files. It might be a better idea to expand -unreg into its component parts: -optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C

On Tue, Oct 10, 2000 at 03:15:49AM -0700, Simon Marlow wrote:
I've got my x86 linux box ready to build some unregistered .hc files.
You'll need two build trees. In the first tree, build the compiler as normal, and the libraries/RTS with -unreg -keep-hc-files-too. You should be able to use these .hc files to try out some simple programs on the PPC.
In the second tree, bootstrap the compiler using the compiler from the first tree with -unreg -keep-hc-files-too. Take these .hc files to the PPC and bootstrap them there.
Ok. Here's what I've done. I've made two trees, b1 and b2, and some appropriate directories ton install in. Inside b1, I edited b1/ghc/lib/std/Makefile to add the options -optc-DNO_REGS... and compiled this compiler. I then went into b2 and added the unregister options to SRC_HC_OPTS in b2/mk/config.mk (Configured to use the compiler generated in step b1. During the build here, the compiler SEGVs when compiling the first haskell file built with the new built compiler. ... ../../driver/ghc-inplace -keep-hc-file-too -optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing -O -package-name std -static -split-objs -H12m -c PrelBase.lhs -o PrelBase.o -osuf o Haskell compiler received signal 11 ... I'm guessing I didn't do the b1 build right. The compiler it generated builds, but doesn't even run. Do I need to add the unregistered options throughout the build, or just in the library? Thanks, Dave Brown
participants (2)
-
David Brown
-
Simon Marlow