Hi Clang Developers,
I downloaded the latest revision (r123891) of LLVM via SVN and followed the instructions at http://clang.llvm.org/get_started.html to configure and build.
After building, compiling a simple C code gives follwing error:
/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/bin/ld: crtbegin.o: No such file: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
After searching for error, i followed instructions at http://stackoverflow.com/questions/4160262/clang-linker-problem.
Hence I added the paths for crtbegin.o, crtend.o, crti.o,crt1.o,etc by adding following lines to llvm/tools/clang/lib/Driver/ToolChains.cpp :
Paths.push_back(“/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/lib/gcc/x86_64-unknown-linux-gnu/3.4.2”);
Paths.push_back(“/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root/usr/lib64”);
But this doesn’t works.
What can be done to rectify the specified clang linker problem ?
Thanks,
Mohit Asudani