Another porting question... (SPARC-Linux this time)
Tue, 22 May 2001 09:48:18 +0100
> [sorry to bring this subject up every now and then, but I can work on
> it only occasionally...]
> Since the PPC machine I was working on is currently unavailable, I
> gave GHC for SPARC-Linux a try.
> Here's the current state:
> 1) I generated unregisterized .hc files for ghc-4.08.1 (gen'd on i386)
> (following SimonM's instructions, using 2 source trees, taking the
> .hc files from the second one)
> 2) Using just these .hc files, I was able to bootstrap a working
> unregisterized GHC for i386 again. I did this more or less
> following the procedures from Manuel's hc-build script, but with
> again with the same build.mk that I used for generating the .hc
> (I did this as a test whether they worked at all).
> 3) I tried the same on a Sparc64 (with exactly the same procedure).
> The stage1 compilation succeeded without error, i.e. I have a hsc
> binary, but when trying to compile even simple programs, it yields
> a segfault.
First thing to do is run gdb on the hsc binary (ok, you have to jump
through a couple of hoops to do this with 4.08: run ghc -v and ^Z when
hsc starts running, then cut-n-paste the command line into gdb). If
this gives you enough information to track down the problem, then all
well and good. Otherwise we'll have to dig deeper... compile the RTS
with debugging turned on (see config.mk for the options to turn on), and
we'll take it from there.
> Additional information (please ask, if more is needed):
> * configure recognizes the machine as:=20
> (I canonicalized that to 'sparc-unknown-linux')
> * sizeof(int) =3D=3D 4 (despite Sparc_64_)
sizeof(void *) better be 4 too, otherwise we're into untested territory
(the 64-bit support hasn't been used for a while).