Well, just wild guessing what's needed on RPi, but could you who do have this board attempt to use attached patch? Don't forget to ./boot as this change configure. Also testing it on completely clean tree may be wise idea. Also after configure run please check that you do have VFPv2 in the ext list. -- this is indeed a wild guess for ARMv6, but as we do the same for ARMv7 (guessing VFPv3) I don't think this is show-stopper now...

Please let me know if this is working...

Karel

On 01/15/13 06:25 PM, Ben Gamari wrote:
rocon...@theorem.ca writes:

Okay, I tried:

SRC_HC_OPTS        = -H64m -Rghc-timing -optc-mfloat-abi=hard -optc-march=armv6 
-optc-mfpu=vfp -optlc=-mattr=+vfp2
GhcStage1HcOpts    = -O -fllvm
GhcStage2HcOpts    = -O0 -fllvm
GhcLibHcOpts       = -O -fllvm -optlc-float-abi=hard

and I got the same error at a different build step.  I'm not sure if it is
earlier or later.

It seems still not everything is using the hard-float ABI.

===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final all
    HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
/usr/bin/ld: error: utils/hsc2hs/dist-install/build/tmp/hsc2hs uses VFP 
register arguments, utils/hsc2hs/dist-install/build/Main.o does not
/usr/bin/ld: failed to merge target specific data of file 
utils/hsc2hs/dist-install/build/Main.o

I found this as well and have been unable to figure out what in the
build system needs to be tweaked. This is ultimately where I gave up on
7.4.

Anyone have any ideas what flags this is built with? It seems that
neither GhcStage2HcOpts nor GhcLibHcOpts make it to the compiler here,

     "inplace/bin/ghc-stage1"   -H64m -Rghc-timing -v    -hide-all-packages -i 
-iutils/hsc2hs/. -iutils/hsc2hs/dist-install/build 
-iutils/hsc2hs/dist-install/build/autogen -Iutils/hsc2hs/dist-install/build -Iutils/hsc2
     hs/dist-install/build/autogen     -optP-include 
-optPutils/hsc2hs/dist-install/build/autogen/cabal_macros.h -package 
base-4.5.1.0 -package containers-0.4.2.1 -package directory-1.1.0.2 -package 
process-1.1.0.1  -X
     Haskell98 -XCPP -XForeignFunctionInterface  -no-user-package-conf -rtsopts 
    -odir utils/hsc2hs/dist-install/build -hidir 
utils/hsc2hs/dist-install/build -stubdir utils/hsc2hs/dist-install/build -hisuf 
hi -osuf
      o -hcsuf hc -c utils/hsc2hs/./Main.hs -o 
utils/hsc2hs/dist-install/build/Main.o


Cheers,

  - Ben

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


diff --git a/aclocal.m4 b/aclocal.m4
index 127f528..a2db986 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -356,7 +356,7 @@ AC_DEFUN([GET_ARM_ISA],
                 [AC_DEFINE(arm_HOST_ARCH_PRE_ARMv7, 1, [ARM pre v7])
                  changequote(, )dnl
                  ARM_ISA=ARMv6
-                 ARM_ISA_EXT="[]"
+                 ARM_ISA_EXT="[VFPv2]"
                  changequote([, ])dnl
                 ],
                 [changequote(, )dnl
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index b128c1f..c71546c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1453,14 +1453,17 @@ runPhase LlvmLlc input_fn dflags
                                       else if (elem VFPv3D16 ext)
                                            then ["-mattr=+v7,+vfp3,+d16"]
                                            else []
+                   ArchARM ARMv6 ext _ -> if (elem VFPv2 ext)
+                                          then ["-mattr=+v6,+vfp2"]
+                                          else ["-mattr=+v6"]
                    _                 -> []
         -- On Ubuntu/Debian with ARM hard float ABI, LLVM's llc still
         -- compiles into soft-float ABI. We need to explicitly set abi
         -- to hard
         abiOpts = case platformArch (targetPlatform dflags) of
-                    ArchARM ARMv7 _ HARD -> ["-float-abi=hard"]
-                    ArchARM ARMv7 _ _    -> []
-                    _                    -> []
+                    ArchARM _ _ HARD -> ["-float-abi=hard"]
+                    ArchARM _ _ _    -> []
+                    _                -> []
 
 -----------------------------------------------------------------------------
 -- LlvmMangle phase
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to