compilation error (Mac OS X Lion, Xcode 4.2): LLVM cannot handle register variable ‘R1’
I tried building ghc-7.2.2 on Mac OS X 10.7.2 (Lion) x86_64-apple-darwin with Xcode 4.2. gcc is version 4.2.1; bootstrapping with ghc-7.0.4.
The configure script default /usr/bin/gcc-4.2 failed configure. (It is actually broken on my system, now that I check.) So I explicitly tried the LLVM-backended gcc, which is the usual default gcc on this system, and got an LLVM-related error compiling StgCRun.c that said "report me":
$ CC=/usr/bin/llvm-gcc-4.2 ./configure
...
$ make
...
"inplace/bin/ghc-stage1" -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-Wredundant-decls -optc-Iincludes -optc-Irts -optc-DCOMPILING_RTS -optc-fno-strict-aliasing -optc-fno-common -optc-Ilibffi/build/include -optc-DDTRACE -optc-fomit-frame-pointer -optc-DRtsWay=\"rts_v\" -optc-w -H32m -O -Iincludes -Irts -DCOMPILING_RTS -package-name rts -dcmm-lint -Ilibffi/build/include -DDTRACE -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -optc-O2 -c rts/StgCRun.c -o rts/dist/build/StgCRun.o
In file included from includes/Stg.h:230,
from rts/StgCRun.c:70:0:
includes/stg/Regs.h:177:0:
sorry, unimplemented: LLVM cannot handle register variable ‘R1’, report a bug
make[1]: *** [rts/dist/build/StgCRun.o] Error 1
make: *** [all] Error 2