Hey, My projects are not compiling on 10.5 using llvm-gcc 4.2 in Xcode 3.1.4. These are caused by some llvm bugs that are now fixed. Since Apple will not release a Xcode update for 10.5, I am trying to compile a recent version of llvm-gcc 4.2 (from the LLVM 2.7 branch - but I could use ToT if this helps) to use on 10.5 intel. I easily built llvm-gcc-4.2 on 10.5 intel by following the README.LLVM instructions. Everything seems to be working as expected. Then I tried to replace the llvm-gcc 4.2 build contained in Xcode 3.1.4 (/Developer/usr/llvm-gcc-4.2/) by the build I compiled. But that appears to not work because Xcode 3.1.4 uses the "-arch" option that my compiled version of llvm-gcc doesn't know about. When I compile a C file with my llvm-gcc 4.2 version, I get the following error: $ /Volumes/xData/llvm/install/bin/llvm-gcc -o test -arch i386 test.c cc1: error: unrecognized command line option "-arch" The original llvm-gcc included in Xcode 3.1.4 has no problem to build this C file with the same command (llvm-gcc-4.2 -o test -arch i386 test.c ). Did someone manage to update llvm-gcc 4.2 contained in Xcode 3.1.4? Is there a trick? Does anyone know how to enable the -arch option? Thanks, Alexandre
Hello> Did someone manage to update llvm-gcc 4.2 contained in Xcode 3.1.4? Is there a trick? Does anyone know how to enable the -arch option?You have to build llvm-gcc in so-called "Apple-way". Read README.Apple for more information. Note, however, that it describes the non-LLVM-enabled build, so you should tune the cmdlines mentioned there accordingly. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
I finally managed to compile llvm-gcc 4.2 (from the 2.7 branch) on 10.5 in the "Apple-way". After replacing the llvm-gcc binaries, I could build my projects on 10.5 with a newer version of llvm-gcc using Xcode 3.1.4. It seems that everything is working as expected now. Thanks, Alexandre> Hello > >> Did someone manage to update llvm-gcc 4.2 contained in Xcode 3.1.4? Is there a trick? Does anyone know how to enable the -arch option? > You have to build llvm-gcc in so-called "Apple-way". Read README.Apple > for more information. Note, however, that it describes the > non-LLVM-enabled build, so you should tune the cmdlines mentioned > there accordingly. > > -- > With best regards, Anton Korobeynikov > Faculty of Mathematics and Mechanics, Saint Petersburg State University >