[LLVMdev] LLVM Build Difficulties
ofv at wanadoo.es
Tue Sep 22 09:35:17 PDT 2009
Curtis Jones <curtis.jones at gmail.com> writes:
> Thanks for the reply. As is usually the case, I managed to figure out
> that problem shortly after sending the email. I finally stumbled
> across directions that used "cmake" instead of the usual configure/
> make, and it worked perfectly. However, I'm stuck again.
> I've got llvm/clang built as well as llvm-gcc,
Your llvm-gcc is not using llvm. Please see README.LLVM on gcc source
This is how llvm-gcc -v looks when properly built:
oscar at qcore:~/dev/llvm$ gcc-bin/bin/llvm-gcc -v
Using built-in specs.
Configured with: ../gcc/configure --disable-multilib --prefix=/home/oscar/dev/llvm/gccbuild/../gcc-bin --program-prefix=llvm- --enable-llvm=/home/oscar/lib/llvm64StaticRelease/ --enable-languages=c,c++
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5653) (LLVM build)
`--enable-llvm` is the key `configure` option for using LLVM with
Apart from this, if you use cmake to build LLVM, you must pass the path
to the *install* directory of LLVM to --enable-llvm, this means that you
must execute `make install` on the directory where you built llvm. The
variable CMAKE_INSTALL_PREFIX may be interesting to you on this regard,
see the cmake docs.
That said, it is possible that the problem about the undefined reference
is not related to llvm-gcc.
More information about the llvm-dev