On 10/13/11 05:28 PM, Ben Gamari wrote:
Also to get to this stage I needed to apply attached patch. However I'm
not sure I got `A' definition right hence just commenting out #ifdefs....
Thanks for pointing this out. A actually shouldn't appear at all in this
code, it's just the variable that appears in the specification so I must
have mindlessly copied it. Anyways, that was a bug which is now fixed.
Oh, but `A' was needed for i386 and DEBUG cases! I've just reused this
for ARM by commenting out #ifdefs!
Finally, I have implemented both R_ARM_THM_JUMP8 and
R_ARM_THM_JUMP11. The new code has been pushed.
OK! Quick testing reveals:
Loading package ghc-prim ... linking ... ghc-stage2:
/export/home/karel/vcs/ghc-src/bgamari-ghc-arm-linker/libraries/ghc-prim/dist-install/build/HSghc-prim-0.2.0.0.o:
ARM to Thumb transition unsupported
ghc-stage2: unable to load package `ghc-prim'
which is indeed progress. Also I needed to apply following patch:
diff --git a/rts/Linker.c b/rts/Linker.c
index 990b8e3..fcfd740 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -4334,7 +4334,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
if (!T) {
errorBelch("%s: Thumb to ARM transition unsupported\n",
- oc->fileNmae);
+ oc->fileName);
return 0;
}
@@ -4369,7 +4369,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
if (!T) {
errorBelch("%s: Thumb to ARM transition unsupported\n",
- oc_fileName);
+ oc->fileName);
return 0;
}
to compile it.
Also, what ghc commit are you testing? What LLVM commit are you using?
I've been having very bad luck even getting an unpatched GHC build. It
would be good to know what you are using.
Please read
http://hackage.haskell.org/trac/ghc/wiki/Building/ARMLinuxGnuEABI and
also read http://ghcarm.wordpress.com/2011/07/03/llvm-on-arm-testing/ --
this should give you an idea what's going on when you try to use LLVM
compiled natively on ARM. Not well supported indeed!
So I'm here using custom compiled gcc 4.4.1 and LLVM of appropriate
version compiled with just -O1. That's what tested here. Also working
LLVMs are 2011-07-12, 2011-09-18 and also something in between, but I'm
not sure now. Certainly there was huge breakage also somewhere in
between, but for your idea I do have all those here:
arm-llvm-ghc-steve-support-vfp3-2011-07-12 -- OK
arm-llvm-ghc-steve-support-vfp3-2011-08-08 -- certainly buggy
(ghc-stage2 segfaulting)
arm-llvm-ghc-steve-support-vfp3-2011-08-29 -- don't know
arm-llvm-ghc-steve-support-vfp3-2011-09-10 -- probably working
arm-llvm-ghc-steve-support-vfp3-2011-09-18 -- OK
arm-llvm-ghc-steve-support-vfp3-2011-10-13 -- testing now.
Otherwise I'm using just GHC HEAD with patch submitted by you to fix
compilation failure in PprC.hs and another one submitted by me here:
http://www.haskell.org/pipermail/cvs-ghc/2011-October/066578.html
Karel
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc