... | ... | @@ -26,11 +26,24 @@ Note well: XCode 5 doesn't come with a real GCC, and currently GHC builds most e |
|
|
|
|
|
In both cases, you need to [ register](https://developer.apple.com/programs/register/) as an Apple developer first (free).
|
|
|
|
|
|
### OS X 10.9 Mavericks: Clang
|
|
|
### OS X 10.9 Mavericks, 10.10 Yosemite: Clang
|
|
|
|
|
|
|
|
|
Start by installing the latest Xcode or command line tools as per above. Then install a clang wrapper and update your GHC settings file ([ http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9](http://justtesting.org/post/64947952690/the-glasgow-haskell-compiler-ghc-on-os-x-10-9) for instructions)
|
|
|
|
|
|
|
|
|
If you are not bootstrapping from the haskell platform, but building using a binary distribution of ghc, or using [ ghcformacosx](http://github.com/ghcformacosx/ghc-dot-app) -- see the GHC section below -- then the wrapper is not needed. Nevertheless, the configure script may still conclude that you are using gcc. While this will still allow you to build ghc, you can specify that you are using clang explicitly by running the `configure` step thus:
|
|
|
|
|
|
```wiki
|
|
|
ghc> CC=/usr/bin/clang ./configure --with-gcc=/usr/bin/clang
|
|
|
```
|
|
|
|
|
|
|
|
|
which will add some extra clang-specific flags to the compilation.
|
|
|
|
|
|
|
|
|
NB: You will still need to install llvm (eg, using `homebrew install llvm` to use the llvm back end.
|
|
|
|
|
|
### Previous versions of OS X and Xcode
|
|
|
|
|
|
|
... | ... | @@ -48,7 +61,7 @@ Secondly, you need a installation of GHC for use as your bootstrap compiler. |
|
|
You can install a binary distribution of GHC in three ways:
|
|
|
|
|
|
1. Install the [ Haskell Platform](http://www.haskell.org/platform/).
|
|
|
1. Install a [binary distribution from GHC](http://www.haskell.org/ghc/download).
|
|
|
1. Install a [binary distribution from GHC](http://www.haskell.org/ghc/download). This can be installed as a relocatable .app using [ ghcformacosx](http://github.com/ghcformacosx/ghc-dot-app)
|
|
|
1. Use one of Fink, MacPorts or Brew. If using brew, we strongly recommend using Darin's [ brewtap](https://github.com/darinmorrison/homebrew-haskell) for ghc
|
|
|
|
|
|
**NB:** You need to use a binary distribution of GHC 7.4.1 (or later) as your bootstrap compiler.
|
... | ... | |