[LLVMdev] Error when attempting to build llvm-gcc-1.5 on Mac OS X 10.5.6
Elvis Dowson
elvis.dowson at mac.com
Sun Dec 28 17:33:54 PST 2008
Thanks!! :-) I managed to get the full environment working. :-)
The solution was to build the llvm tools first and then continue with
the rest of the build process. I've attached the full procedure below.
Best regards,
Elvis
Procedure
Step 01: Specify environment variables
export LLVM_HOME=$HOME/Tool/llvm-1.5
export LLVM_GCC_HOME=$HOME/Tool/llvm-gcc-1.5
export PATH=$PATH:$ANT_HOME/bin:$LLVM_HOME/install/bin:$LLVM_GCC_HOME/
install/bin:
Step 02: Configure, build and install llvm tools. This will build the
gccas and gccld tools required to build the llvm-gcc front end.
$ ../src/configure --enable-checking --prefix=`pwd`/../install --
disable-bootstrap --disable-multilib
$ make tools-only $BUILDOPTIONS -j 2 ENABLE_OPTIMIZED=0
$ make install
The llvm tools will be installed into the $LLVM_HOME/install/bin
directory.
Step 03: Configure, build and install llvm-gcc-1.5.
llvm-gcc-1.5
/ build
/ install
/ src
Type the following commands to build a debug version of llvm-gcc
$ cd build
$ export TARGETOPTIONS='--with-arch=i386'
$ export TRIPLE=i386-apple-darwin9.6.0
$ export BUILDOPTIONS=LLVM_VERSION_INFO=1.5
$ ../src/configure --enable-checking --with-gxx-include-dir=/usr/
include/c++/4.0.0 --build=$TRIPLE --host=$TRIPLE --target=$TRIPLE --
prefix=`pwd`/../install --program-prefix=llvm- --enable-languages=c,c++
$EXTRALANGS $TARGETOPTIONS --disable-bootstrap --disable-multilib
$ make $BUILDOPTIONS -j 2 ENABLE_OPTIMIZED=0
$ make install
$ ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib
$ ln -sf /usr/lib/libstdc++.6.dylib `pwd`/../install/lib/libstdc++.dylib
The last step, "ln -sf ..." is required so that the linker (collect2)
can find libstdc++ ('-lstdc++') and subsequently link C++ executables
correctly.
Type the following command to see if llvm-gcc is correctly installed:
$ llvm-gcc -v
$ gcc version 3.4-llvm 20030924 (experimental)
Step 04: Configure, build and install llvm-1.5.
Directory structure:
llvm-1.5
/ build
/ src
The following commands will build a debug version of llvm.
$ cd build
$ ../src/configure
$ make -j 2 ENABLE_OPTIMIZED=0
To build a release version of llvm, type the following command
$ make ENABLE_OPTIMIZED=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081229/254eb3c1/attachment.html>
More information about the llvm-dev
mailing list