NixOS/nixpkgs — pull request #2896 by cstrahan (2014-06-11 10:07:39+00:00)
Title: fix compilation of gccApple

While trying to add cross-building support for `gccApple` (via the `-arch` flags handling in [`driverdriver.c`](http://opensource.apple.com/source/gcc/gcc-5666.3/driverdriver.c)), I discovered that the `gccApple` fails to install under the latest clang/llvm-based native compiler (`/usr/bin/gcc`).

I've added some patches to fix various compilation failures, but I couldn't figure out how to resolve few when compiling libstdcxx ([a bunch of problems regarding `unwind.h`](https://gist.github.com/cstrahan/697e575ec9124f9a4db4)).

As a (potentially stopgap) solution, I've added a `gccAppleBootstrap` package that fetches the same prebuilt binaries as used by the [Homebrew](https://github.com/Homebrew/homebrew) project, which I then use to compile `gccApple`.

If someone can lend a hand with the remaining compilation errors under `/usr/bin/gcc`, we might be able to skip the bootstrap binaries - let me know if you'd like to work on this with me :smile:.