Wrong CPP during cross-compilation
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
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |