RE: GHC Alpha port?

A few users at our site have asked about running GHC on Alpha machines. In addition to following the instructions at http://www.haskell.org/ghc/docs/4.08.2/building/sec-port-info.html I'm also personally curious about what work would involved in making GHC work again on Alphas. Could someone give an overview?
Sure: the first thing to do is to get GHC running "unregisterised" on your platform. This means building an unregisterised set of .hc files with GHC on a supported platform, shipping these to the Alpha and bootstrapping using them. A couple of people did this recently for MacOS/X (using GHC 4.08.X), so you should be able to get more detailed instructions from the mailing list archives. There will also be some porting effort involved in getting 64-bit support going again. There are sure to be some accidental 32-bit dependencies in the RTS, but they won't be fatal - the RTS was designed to be word-size independent, it just hasn't been used on a 64-bit platform up to now. Once you have an unregisterised build working (& bootstrapped), you can start trying to get the mangler going for full registerised support. The mangler has Alpha support, but it is old and bound to be rotten to some extent. One other thing: you'll probably be better off starting from 4.08.2, because 5.00 has some problems with hc-bootstrapping at the moment. We'll be happy to help out if you get into difficulties.... good luck! Cheers, Simon

OK-- I'm probably not the most qualified person to try to port GHC to the Alpha, but my attempt begins... To get started, I want to generate .hc files using my existing ghc-5.00.2 installation on my i386-unknown-linux box. I tried to follow the steps in http://www.cs.uu.nl/~atze/Programming/GHC/cp-b1-b2-all as follows. First I create a shadow directory tree and configure: mkdir c1 c1-obj cd c1 lndir ../ghc-5.00.2 ./configure --prefix=$PWD-obj Second I create c1/mk/build.mk: GhcHcOpts += -H24m -keep-hc-files-too -optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C GhcRtsHcOpts += -optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C SplitObjs = NO Then I ran "make". It stopped in c1/ghc/rts, at: ../../ghc/compiler/ghc-inplace -optc-O -optc-O2 -optc-fomit-frame-pointer -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wbad-function-cast -optc-DCOMPILING_RTS -ldl -I../includes -I. -Iparallel -O2 -optc-DNO_REGS -optc-DUSE_MINIINTERPRETER -fno-asm-mangling -funregisterised -fvia-C -DCOMPILING_RTS -static -c Adjustor.c -o Adjustor.o Segmentation fault (core dumped) Indeed, even running ../../ghc/compiler/ghc-inplace by itself, or running c1/ghc/compiler/ghc-5.00.2 by itself, gives a seg fault. Being unfamiliar with the build system, I would appreciate any advice on how to debug this problem. Or has the .hc generation procedure changed between ghc4 and ghc5? -- Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig no
participants (2)
-
Ken Shan
-
Simon Marlow