Last time I did that (crossing to ARMv8) I needed to use --with-gcc=<cross compiler> option since for some reason I had not time to debug setting target triple with --target was not enough. Speaking about GHC HEAD as of new year eve (2014) time...
But well, since it this is already some time I'm not sure this was to cure issue like you have now, but at least you may give it a try...
Karel
On 03/28/14 06:08 PM, eng. Vassil Ognyanov Keremidchiev wrote:
Hello!cp mk/build.mk.sample mk/build.mk <http://build.mk>
Could someone help me with compiling GHC under Ubuntu as a ARM
cross-compiler?
Currently I have done those steps:
sudo apt-get update
sudo apt-get install autoconf alex happy libtool autopoint zlib1g-dev
libncurses5-dev ghc-haddock
sudo export PATH=~/.cabal/bin:$PATH
sudo cabal install --reinstall happy alex terminfo libffi html regex-compat
git clone http://darcs.haskell.org/ghc.git
cd ghc
./sync-all --no-dph get
./sync-all pull
./boot
sudo ./configure --target=arm-linux-gnueabi --enable-unregisterised_______________________________________________
# here I enable quick-cross configuration
sudo make
and I get:
echo "compiler_stage1_depfile_c_asm_EXISTS = YES" >>
compiler/stage1/build/.depend-v.c_asm.tmp
mv compiler/stage1/build/.depend-v.c_asm.tmp
compiler/stage1/build/.depend-v.c_asm
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-gnueabi-nm"
/usr/bin/arm-linux-gnueabi-nm:
includes/dist-derivedconstants/header/tmp.o: File format not recognized
deriveConstants: readProcess: /usr/bin/arm-linux-gnueabi-nm
"includes/dist-derivedconstants/header/tmp.o" (exit 1): failed
make[1]: *** [includes/dist-derivedconstants/header/DerivedConstants.h]
Error 1
make: *** [all] Error 2
What I have done wrong? I did not understand the error message well, too.
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs