[GHC] #10456: Wrong CPP during cross-compilation

GHC ghc-devs at haskell.org
Wed May 27 21:50:00 UTC 2015


#10456: Wrong CPP during cross-compilation
-------------------------------------+-------------------------------------
              Reporter:  jakzale     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  low         |         Milestone:
             Component:  Build       |           Version:  7.11
  System                             |  Operating System:  Unknown/Multiple
              Keywords:              |   Type of failure:  Building GHC
          Architecture:              |  failed
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 It appears that during cross-compilation the build system uses the wrong
 compiler as C preprocessor.

 It may cause errors by passing incompatible flags to the cross-compiler
 --- for example when trying to cross-compile using 32-bit clang on a
 64-bit system (sample output attached below).

 {{{
 /Users/jakub/src/nacl_sdk/pepper_canary/toolchain/mac_pnacl/bin/pnacl-
 clang -E
   -DMAKING_GHC_BUILD_SYSTEM_DEPENDENCIES  -m64 -fno-stack-protector -Wall
   -Icompiler/stage1/build/autogen -Icompiler/. -Icompiler/parser
 -Icompiler/utils
   -Icompiler/stage1
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/proce_0hwN3CTKynhHQqQkChnSdH/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/direc_3TcTyYedch32o1zTH2MR00/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/unix_G4Yo1pNtYrk8nCq1cx8P9d/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/time_Hh2clZW6in4HpYHx5bLtb7/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/bytes_6vj5EoliHgNHISHCVCb069/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/base_I5BErHzyOm07EBNpKBEeUv/include'
 -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include'
   -isystem'/Applications/ghc-7.10.1.app/Contents/lib/ghc-7.10.1/include'
   -Wno-unknown-pragmas      -MM -x c compiler/ghci/keepCAFsForGHCi.c -MF
 compiler/stage1/build/.depend-v.c_asm.bit pnacl-clang: Unrecognized
 option: -m64
   Use '--help' for more information. make[1]: ***
 [compiler/stage1/build/.depend-v.c_asm] Error 255 make: *** [all] Error 2
 }}}

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


More information about the ghc-tickets mailing list