<div dir="ltr">Hello!<div><br></div><div>Thanks, it continued with building until some LLVM errors.</div><div>But will --with-gcc= arm based compiler will create GHC with:</div><div>Host: x86 Ubuntu (where compilation should happen)</div>
<div>Target: ARMv7 Linux ?</div><div><br></div><div>Because I don't want to have GHC on my slow and restricted ARM machine.</div><div><br></div><div>Best regards,</div><div>  Vassil</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014-03-28 20:09 GMT+02:00 Karel Gardas <span dir="ltr"><<a href="mailto:karel.gardas@centrum.cz" target="_blank">karel.gardas@centrum.cz</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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...<br>

<br>
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...<br>
<br>
Karel<div class=""><br>
<br>
On 03/28/14 06:08 PM, eng. Vassil Ognyanov Keremidchiev wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
Hello!<br>
<br>
Could someone help me with compiling GHC under Ubuntu as a ARM<br>
cross-compiler?<br>
<br>
Currently I have done those steps:<br>
sudo apt-get update<br>
sudo apt-get install autoconf alex happy libtool autopoint zlib1g-dev<br>
libncurses5-dev ghc-haddock<br>
sudo export PATH=~/.cabal/bin:$PATH<br>
sudo cabal install --reinstall happy alex terminfo libffi html regex-compat<br>
<br>
git clone <a href="http://darcs.haskell.org/ghc.git" target="_blank">http://darcs.haskell.org/ghc.<u></u>git</a><br>
cd ghc<br>
<br>
./sync-all --no-dph get<br>
./sync-all pull<br>
./boot<br>
sudo ./configure --target=arm-linux-gnueabi --enable-unregisterised<br></div>
cp mk/build.mk.sample mk/<a href="http://build.mk" target="_blank">build.mk</a> <<a href="http://build.mk" target="_blank">http://build.mk</a>><div class=""><br>
# here I enable quick-cross configuration<br>
sudo make<br>
<br>
and I get:<br>
<br>
echo "compiler_stage1_depfile_c_<u></u>asm_EXISTS = YES" >><br>
compiler/stage1/build/.depend-<u></u>v.c_asm.tmp<br>
mv compiler/stage1/build/.depend-<u></u>v.c_asm.tmp<br>
compiler/stage1/build/.depend-<u></u>v.c_asm<br>
inplace/bin/deriveConstants --gen-header -o<br>
includes/dist-<u></u>derivedconstants/header/<u></u>DerivedConstants.h --tmpdir<br>
includes/dist-<u></u>derivedconstants/header/ --gcc-program "/usr/bin/gcc"<br>
--gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag<br>
-Iincludes/dist --gcc-flag -Iincludes/dist-<u></u>derivedconstants/header<br>
--gcc-flag -Iincludes/dist-ghcconstants/<u></u>header --gcc-flag -Irts<br>
--gcc-flag -fcommon --nm-program "/usr/bin/arm-linux-gnueabi-<u></u>nm"<br>
/usr/bin/arm-linux-gnueabi-nm:<br>
includes/dist-<u></u>derivedconstants/header/tmp.o: File format not recognized<br>
deriveConstants: readProcess: /usr/bin/arm-linux-gnueabi-nm<br>
"includes/dist-<u></u>derivedconstants/header/tmp.o" (exit 1): failed<br>
make[1]: *** [includes/dist-<u></u>derivedconstants/header/<u></u>DerivedConstants.h]<br>
Error 1<br>
make: *** [all] Error 2<br>
<br>
<br>
What I have done wrong? I did not understand the error message well, too.<br>
<br>
<br>
<br></div>
______________________________<u></u>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/ghc-devs</a><br>
</blockquote>
<br>
</blockquote></div><br></div>