[GHC] #9895: No -mtriple param being passed to opt/llc when cross compiling

GHC ghc-devs at haskell.org
Mon Dec 29 00:23:08 UTC 2014


#9895: No -mtriple param being passed to opt/llc when cross compiling
-------------------------------------+-------------------------------------
              Reporter:  erikd       |            Owner:  erikd
                  Type:  feature     |           Status:  patch
  request                            |        Milestone:  7.12.1
              Priority:  normal      |          Version:  7.9
             Component:  Compiler    |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Moderate (less
  Unknown/Multiple                   |  than a day)
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D576   |
-------------------------------------+-------------------------------------

Comment (by Erik de Castro Lopo <erikd@…>):

 In [changeset:"58ac9c8f6e986bac817ad08d5a2fd11cd167f029/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="58ac9c8f6e986bac817ad08d5a2fd11cd167f029"
 LlvmCodeGen cross-compiling fixes (#9895)

 Summary:
 * Throw an error when cross-compiling without a target definition.
   When cross compiling via LLVM, a target 'datalayout' and 'triple' must
   be defined or LLVM will generate code for the compile host instead of
   the compile target.

 * Add aarch64-unknown-linux-gnu target.
   The datalayout and triple lines were found by using clang to compile a
   small C program and -emit-llvm to get the LLVM IR output.

 Signed-off-by: Erik de Castro Lopo <erikd at mega-nerd.com>

 Test Plan: validate

 Reviewers: rwbarton, carter, hvr, bgamari, austin

 Reviewed By: austin

 Subscribers: carter, thomie, garious

 Differential Revision: https://phabricator.haskell.org/D585

 GHC Trac Issues: #9895
 }}}

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


More information about the ghc-tickets mailing list