<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Subject: building ghc-7.1.20110125 under Mac OS X<br>
<br>
hi list.<br>
<br>
i have to build ghc-7.1.20110125 under mac os x, so i grabbed the stable snapshot. Everything builds fine but the resulting compiler has problems  with ld. It passes gcc flags to ld like &quot;-march=-i686&quot;. Any ideas?<br>

<br>
BTW while still here. Are there any specific docs available on building 64-bit mac os x compiler?<br></blockquote><div><br></div><div>Hi Pavel,</div><div><br></div><div>I&#39;m not aware of any specific docs for building 64-bit on os x, but I didn&#39;t have any difficulty last time I tried.  The key point is you need a 64-bit bootstrap compiler (probably until <a href="http://hackage.haskell.org/trac/ghc/ticket/3472">http://hackage.haskell.org/trac/ghc/ticket/3472</a> is fixed), however there are binary distributions of ghc you can use for this.  After you install a 64-bit binary, go to the ghc src and do</div>
<div><br></div><div>./configure --with-ghc=/path/to/ghc64bin/ &amp;&amp; make</div><div><br></div><div>and it should work.</div><div><br></div><div>N.B. don&#39;t install 32-bit and 64-bit versions of the same ghc, because the libraries will clobber each other.  If you want to have this, change the version before you install the second arch.</div>
<div><br></div><div>Cheers,</div><div>John</div></div>