Cross-compiling broken for ARM/Linux target
I've attempted to cross compile GHC HEAD on Ubuntu 13.10 with ubuntu's hard-float tool-chain and LLVM. I've configured GHC with:
$ ./configure --target=arm-linux-gnueabihf
and compiling by make works till it fails with:
inplace/bin/deriveConstants --gen-header -o includes/dist-derivedconstants/header/DerivedConstants.h --tmpdir includes/dist-derivedconstants/header/ --gcc-program "/usr/bin/gcc" --gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag -Iincludes/dist --gcc-flag -Iincludes/dist-derivedconstants/header --gcc-flag -Iincludes/dist-ghcconstants/header --gcc-flag -Irts --gcc-flag -fcommon --nm-program "/usr/bin/arm-linux-gnueabihf-nm"
/usr/bin/arm-linux-gnueabihf-nm: includes/dist-derivedconstants/header/tmp.o: File format not recognized
deriveConstants: readProcess: /usr/bin/arm-linux-gnueabihf-nm "includes/dist-derivedconstants/header/tmp.o" (exit 1): failed
make[1]: *** [includes/dist-derivedconstants/header/DerivedConstants.h] Error 1
As a workaround for this issue, it's possible to use --with-gcc= and this way deriveConstants gets the right cross GCC. Looks like a bug somewhere in make machinery or configure itself.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |