On Tue, Jul 22, 2003 at 09:18:06AM -0700, Simon Marlow wrote:
> simonmar 2003/07/22 09:18:06 PDT
>
> Modified files:
> distrib cross-port
> Log:
> Commit an untested, but hopefully more workable and up-to-date version
> of this script.
Using ghc 6.0 with this script it felt like I was getting most of the
way to an Alpha Linux compiler from an x86 Linux one. It fails with
gcc -x c GHC/Int.hc -o GHC/Int.raw_s -S -O -mieee -static -w
-D__GLASGOW_HASKELL__=600 -O -I/home/igloo/ghc/ghc-6.0/ghc/includes
-I/home/igloo/ghc/ghc-6.0/libraries/base/include
-I/home/igloo/ghc/ghc-6.0/hslibs/lang/cbits
-I/home/igloo/ghc/ghc-6.0/hslibs/posix/cbits
-I/home/igloo/ghc/ghc-6.0/hslibs/util/cbits
-I/home/igloo/ghc/ghc-6.0/hslibs/text/cbits
-I/home/igloo/ghc/ghc-6.0/hslibs/hssource/cbits -I. `echo | sed
's/^$/-DSTOLEN_X86_REGS=4/'`
GHC/Int.hc: In function `sbsy_ret':
GHC/Int.hc:3092: `int64ToIntegerzh_fast' undeclared (first use in this function)
GHC/Int.hc:3092: (Each undeclared identifier is reported only once
GHC/Int.hc:3092: for each function it appears in.)
GHC/Int.hc: In function `sbst_ret':
GHC/Int.hc:3169: `int64ToIntegerzh_fast' undeclared (first use in this function)
make[1]: *** [GHC/Int.raw_s] Error 1
I'm not sure how to fix this - I can give 'config.h's from the target
system and recompile the library '.hc's, but I think the generated code
also depends on the compiler which will break if compiled with the wrong
sizes. Any suggestions?
Here are the things I've had to do to get this far:
Normal gcc 3.3 fixes:
ghc/compiler/nativeGen/MachMisc.lhs
ghc/compiler/nativeGen/RegAllocInfo.lhs
ghc/driver/mangler/ghc-asm.lprl
Files copied across to the alpha:
b1: "*.hc", "*_hsc.c" package.conf
b2: "*.hc", ".depend*"
Comment out the $(AUTO_APPLY) rule in ghc/rts/Makefile
Make ghc/utils/ghc-pkg/ghc-pkg-inplace a script that just returns true
Changed "alpha*-unknown-linux" to "alpha*-unknown-linux*" in configure
(it's detected as alphaev67-unknown-linux-gnu)
Change
$T_HDR_literal = "\.rdata\n\t\.align 3\n";
to
$T_HDR_literal = "\.text\n\t\.align 3\n";
to fix
as -o Control/Concurrent.o Control/Concurrent.s
Control/Concurrent.s: Assembler messages:
Control/Concurrent.s:8: Error: unknown pseudo-op: `.rdata'
A quick google suggests this might be an alpha-linuxecoff vs elf issue,
but I don't know anything about this.
The dependency files still try to get built, but $(MKDEPEND_HS) is
empty. As it happens this means the line ends up starting -M so make
tried to run M, fails because it doesn't exist but continues thanks to
the -.
Thanks
Ian
_______________________________________________
Cvs-fptools mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-fptools