On 2001-07-05T10:34:27+0100, Simon Marlow wrote:
> This isn't right: you shouldn't set GhcHcOpts in the first build. In
> the URL you gave, this line was commented out. That's certainly the
> reason for the core dumps.
Ah! Careless me. Thank you.
> In GHC 5.00.2, there's an easier way. For the c1 & c2 builds, you can
> just set
> GhcUnregisterised = YES
> in build.mk, and you can set $long to empty.
This seems to have worked. By the way, the "old way" (as specified in
the MacOS port readme) does not work with ghc 5 -- I got a seg fault
when running ghc-inplace during the second stage.
> When you get around to bootstrapping on the Alpha, I'll probably need to
> help you some more, because bootstrapping from .hc files is quite tricky
> on 5.00.
I'm there!
The first obstacle I encountered is that PackedString.raw_s seems to
be mangled incorrectly.
PWD = /a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/lang
------------------------------------------------------------------------
gcc -x c PackedString.hc -o PackedString.raw_s -S -O -D__GLASGOW_HASKELL__=500
-O -I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/ghc/includes
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/ghc/lib/std/cbits
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/lang/cbits
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/posix/cbits
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/util/cbits
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/text/cbits
-I/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/hslibs/hssource/cbits -DNO_REGS
-I. `echo | sed 's/^$/-DSTOLEN_X86_REGS=4/'`
In file included from
/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/ghc/includes/Stg.h:168,
from PackedString.hc:1:
/a/lair62/vol/vol0/home/ccshan/u/ghc-port/alpha/ghc/includes/TailCalls.h:86:
warning: call-clobbered register used for global register variable
../../ghc/driver/mangler/ghc-asm PackedString.raw_s PackedString.s
gcc -c -o PackedString.o PackedString.s
as0: Error: PackedString.hc, line 6: Conflicting definition of symbol s7sY_fast4
as0: Warning: PackedString.hc, line 6: .ent/.end block never defined the procedure
name
.end s7sY_fast4
gmake[1]: *** [PackedString.o] Error 1
rm PackedString.s PackedString.raw_s
gmake: *** [all] Error 1
The intermediate files in question are at
http://www.eecs.harvard.edu/~ccshan/ghc-port/
If I assemble PackedString.raw_s directly, the assmbler is happy. If
I comment out the ".file" directive in PackedString.s and assemble it,
I get the more informative line numbers in
as0: Error: PackedString.s, line 12108: Conflicting definition of symbol s7sY_fast4
as0: Warning: PackedString.s, line 12211: .ent/.end block never defined the
procedure name
The culprit appears to be that lines 11396-11404 in
PackedString.raw_s:
.rdata
.align 3
$LC8:
.quad -9187201950435737471
.text
.align 5
.ent s7sY_fast4
s7sY_fast4:
.frame $30,0,$26,0
got mangled into lines 12103-12109 in PackedString.s:
.rdata
.align 3
$LC8:
.quad -9187201950435737471
.ent s7sY_fast4
s7sY_fast4:
.frame $30,0,$26,0
When I added ".text" manually between the ".quad" and the ".ent", the
assembler became happy.
... But is this the right fix? (Do I need to ".align" anything?) If
it is the right fix, perhaps someone more familiar with the mangler
can point me to the right fix in ghc-asm.lprl?
--
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
"There isn't anyone out there who isn't Seymour's fat lady."
PGP signature