Subject: building ghc-7.1.20110125 under Mac OS X

hi list.

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 "-march=-i686". Any ideas?

BTW while still here. Are there any specific docs available on building 64-bit mac os x compiler?

Hi Pavel,

I'm not aware of any specific docs for building 64-bit on os x, but I didn't have any difficulty last time I tried.  The key point is you need a 64-bit bootstrap compiler (probably until http://hackage.haskell.org/trac/ghc/ticket/3472 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

./configure --with-ghc=/path/to/ghc64bin/ && make

and it should work.

N.B. don'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.

Cheers,
John