The LLVM backend driver currently assumes that we are targeting the same architecture as LLVM is defaultly set to target. The hack solution is:

diff --git a/compiler/main/DriverPipeline.hs
b/compiler/main/DriverPipeline.hs
index fd5694f..80a7b99 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1331,9 +1331,9 @@ runPhase LlvmOpt input_fn dflags
 output_fn <- phaseOutputFilename LlvmLlc

 io $ SysTools.runLlvmOpt dflags
 ([ SysTools.FileOption "" input_fn,
 SysTools.Option "-o",
- SysTools.FileOption "" output_fn
+ SysTools.FileOption "" output_fn, SysTools.Option 
"-mtriple=arm-unknown-nto-qnx8.0.0eabi"]
 ++ optFlag
 ++ [SysTools.Option tbaa]
 ++ map SysTools.Option lo_opts)

And this is exactly the tripl as passed to / detected by GHC's `./configure` script, so to my mind the nicest solution would be to preserve that target triple from `./configure` and always pass it through to LLVM.

Thoughts?

--
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to