[GHC] #7608: Triple not passed to LLVM when cross-compiling

GHC cvs-ghc at haskell.org
Thu Jan 31 10:17:39 CET 2013


#7608: Triple not passed to LLVM when cross-compiling
-------------------------------------+--------------------------------------
    Reporter:  singpolyma            |       Owner:                         
        Type:  bug                   |      Status:  new                    
    Priority:  normal                |   Milestone:                         
   Component:  Compiler (LLVM)       |     Version:  7.7                    
    Keywords:  cross-compiling llvm  |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple      |     Failure:  GHC doesn't work at all
  Difficulty:  Unknown               |    Testcase:                         
   Blockedby:                        |    Blocking:  7610                   
     Related:                        |  
-------------------------------------+--------------------------------------
Changes (by simonmar):

  * difficulty:  => Unknown


Comment:

 This bug is somewhat false.  The `.ll` file generated by my linux->arm
 cross compiler starts with:

 {{{
 target datalayout =
 "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32"
 target triple = "arm-unknown-linux-gnueabi"
 }}}

 which is emitted by the code in `LlvmCodeGen.Ppr.moduleLayout`.  If
 there's a bug here at all, it is that there are a fixed set of cases
 handled by `moduleLayout`, so to cross-compile for a new target you need
 to modify this code by hand.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7608#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list