mxcl/homebrew — pull request #11351 by 2bits (2012-03-31 23:34:35+00:00)
Title: luajit - fix compile errors with clang, llvm

Luajit 2.0.0beta9 has patches upstream that fix the compile errors
with clang and llvm, thanks to the help of the developer, Paul.
Remove the patches at 2.0.0beta10 due out at the end of April.
All changes were discussed in several emails. The plan is:

* Change the Hotfix patch to apply only to stable.
* Patch for missing /usr/include/unwind.h on 10.6.8 with clang.
* Patch src/Makefile to not call -dumpspec. Clang doesn't have it.
* Remove the instruction to the user to `sudo ln -s`.
* Remove the fails_with_llvm. It compiles against llvm 2336.
* Inreplaces should persist through version updates.
* Respect the developer's choice that optimization is best at -O2.
* Remove the hardcoded -O2 so we can set -O2 or switch to -Og.
* Override the hardcoded CC=gcc. Use ENV.cc.
* Remove the -march=i686 from CCOPT_X86. We set accurate march.
* Use args for clarity.
* For debug builds using clang, use -Og. See clang man page.

Both stable and head work again on Lion and 64bit Snow Leopard
using all five compilers from XCode-4.3.2 and 4.0.2.