What if you build a copy of head with the native code gen. Then build the cross compiler using head on head?<span></span><br><br>On Sunday, August 11, 2013, Luke Iannini  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">And the truly final word for the moment : ) —<div>I built a tool to partially automate the indentation workaround for LLVM 3.0 and it yields the same &quot;co-processor offset out of range&quot;/&quot;unsupported relocation on symbol LCPI65_0&quot; errors LLVM 3.3/3.4 did when it finally gets to integer-simple/GHC/Integer/Type.hs.</div>


</div><div><br><br><div>On Sun, Aug 11, 2013 at 3:06 AM, Luke Iannini <span dir="ltr">&lt;<a>lukexipd@gmail.com</a>&gt;</span> wrote:<br>

<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK! So just to summarize:<div>Building GHC HEAD with LLVM 3.0 or 3.2 (using GHC 7.6.3 as the bootstrap) on OS X 10.9 DP5/Xcode 5 DP5 exhibits very strange behavior wherein layout-based code along with mixed-tabs-and-spaces code fails to parse correctly, with issues in hundreds of files in the GHC HEAD tree.</div>



<div>I don&#39;t have a 10.8 machine to check if this is a 10.9 exclusive issue, so I&#39;d love if someone can try using these binaries to build GHC HEAD: <a href="http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz" target="_blank">http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz</a></div>



<div><br></div><div>Building GHC HEAD with LLVM 3.3 or 3.4 works great as a regular compiler with the 10.9 workarounds I outlined in another thread, but fails when compiling as a cross-compiler (./configure --target=arm-apple-darwin10) with these errors: </div>



<div><a href="https://gist.github.com/lukexi/2b129f34fa027172c5ee" target="_blank">https://gist.github.com/lukexi/2b129f34fa027172c5ee</a></div><div><br></div><div>So I&#39;m between a rock and a hard place at the moment.</div>


<div><br></div>
<div>The only (very tedious and slow) workaround I&#39;ve found for the 3.0/3.2 bug is to manually expand tabs to spaces, and to transform</div><div><font face="courier new, monospace">do x</font></div><div><font face="courier new, monospace">   y</font></div>



<div><font face="arial, helvetica, sans-serif">into</font></div><div><font face="courier new, monospace">do</font></div><div><font face="courier new, monospace">    x</font></div><div><font face="courier new, monospace">    y</font></div>



<div><font face="arial, helvetica, sans-serif">(similarly for where and let blocks)</font></div><div><br></div><div>Cheers</div><span><font color="#888888"><div>Luke</div></font></span></div><div>

<div><div><br><br><div>On Sun, Aug 11, 2013 at 1:53 AM, Luke Iannini <span dir="ltr">&lt;<a>lukexipd@gmail.com</a>&gt;</span> wrote:<br>


<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Argh, sorry for the confusion: 3.2 *does* exhibit the issue. 3.3 and 3.4 do not.</div><div>
<div><div><br><br><div>On Sun, Aug 11, 2013 at 1:39 AM, Luke Iannini <span dir="ltr">&lt;<a>lukexipd@gmail.com</a>&gt;</span> wrote:<br>



<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Further investigation:<div><br></div><div>I grabbed 7.6.3 just to see if I somehow had a bad install of GHC, but the problem still occurred.</div>




<div><br></div><div>The problem only occurs with LLVM 3.0. </div>
<div><br></div><div>It is not related to cross-compilation or Stephen&#39;s patches: I tested this on multiple fresh clones with --with-gcc=clang.<br></div><div><br></div><div>LLVM 3.2, 3.3 and 3.4 do not exhibit the issue.</div>





<div><br></div><div>If anyone wants to try to reproduce, you can grab the LLVM 3.0 binaries here <a href="http://llvm.org/releases/3.0/clang+llvm-3.0-x86_64-apple-darwin11.tar.gz" target="_blank">Clang Binaries for MacOS X/x86-64</a> and just drop them in your path.</div>





<div><br></div><div>(Stephen, I&#39;m now trying your patch with LLVM 3.2)</div><div><br></div><div>Cheers</div><span><font color="#888888"><div>Luke</div></font></span></div><div><div>
<div><br><br><div>On Sat, Aug 10, 2013 at 8:11 PM, Luke Iannini <span dir="ltr">&lt;<a>lukexipd@gmail.com</a>&gt;</span> wrote:<br>



<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The first error on a fresh checkout is<div><p style="margin:0px;font-size:11px;font-family:Menlo">&quot;/usr/local/bin/ghc&quot; -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O  -package-db libraries/bootstrapping.conf  -hide-all-packages -i -iutils/hsc2hs/. -iutils/hsc2hs/dist/build -iutils/hsc2hs/dist/build/autogen -Iutils/hsc2hs/dist/build -Iutils/hsc2hs/dist/build/autogen     -optP-include -optPutils/hsc2hs/dist/build/autogen/cabal_macros.h -package base-4.6.0.1 -package containers-0.5.0.0 -package directory-1.2.0.1 -package filepath-1.3.0.1 -package process-1.1.0.2 -XHaskell98 -XCPP -XForeignFunctionInterface  -no-user-package-db -rtsopts      -odir utils/hsc2hs/dist/build -hid</p>
</div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></blockquote>