[LLVMdev] Replacing llvm-gcc in Xcode 3.1.1 with svn version

Tatu Vaajalahti tatuvaaj at mac.com
Tue Oct 21 06:07:55 PDT 2008


Hello all,

I have replaced the llvm-gcc shipped with the Xcode by the latest  
version and I was wondering if I have missed something... (everything  
*seems* to work).
Here's what I did:

0. Checkout LLVM (and clang) + llvm-gcc

1. Build LLVM (with clang) and install into /Developer/usr/local :
     # mkdir llvmobj
     # cd llvmobj
     # CC=gcc-4.2 CXX=g++-4.2 ../llvm/configure --prefix=/Developer/ 
usr/local --enable-optimized
     # make -j2
     # make install
     # cp -p ../llvm/tools/clang/utils/* /Developer/usr/local/bin/

2. Build llvm-gcc
     # cd llvm-gcc
     # make clean
     # rm -rf build
     # mkdir -p build/obj build/dst build/sym
     # (NOTE: I don't want PowerPC code)
     # gnumake install RC_OS=macos RC_ARCHS="i386" TARGETS="i386  
x86_64" SRCROOT=`pwd` OBJROOT=`pwd`/build/obj DSTROOT=`pwd`/build/dst  
SYMROOT=`pwd`/build/sym

3. Replace old llvm-gcc with new one
     # rm -rf /Developer/usr/llvm-gcc-4.2
     # ditto build/dst /

------ rest only once -------

4. Fix libLTOs
     # rm  /Developer/usr/lib/libLTO.dylib
     # ln -sf /Developer/usr/local/lib/libLTO.dylib /Developer/usr/lib/ 
libLTO.dylib
     # rm /usr/lib/libLTO.dylib
     # ln -sf /Developer/usr/local/lib/libLTO.dylib /usr/lib/ 
libLTO.dylib

5. Fix /Developer/SDKs/MacOSX10.5.sdk/Developer/usr
     # cd /Developer/SDKs/MacOSX10.5.sdk/Developer/usr
     # mv llvm-gcc-4.2 llvm-gcc-4.2.old
     # ln -sf /Developer/usr/llvm-gcc-4.2 llvm-gcc-4.2


TIA!

---
Tatu Vaajalahti
Tampere, Finland









More information about the llvm-dev mailing list