[LLVMdev] Building libLLVM-2.8svn.so fails to link on FreeBSD
yuri at rawbw.com
Thu Aug 19 21:03:43 PDT 2010
Please check in the attached patch: it fixes the problem on FreeBSD.
Before I used the patch from someone (don't remember). It just had an
else clause on HOST_OS in the Makefile with the same options in 'else'
clause as for Linux.
On 08/19/2010 15:45, Yuri wrote:
> I am getting this error on FreeBSD-8.1 (amd64):
> llvm: Linking Debug+Asserts Shared Library libLLVM-2.8svn.so
> In function `llvm::sys::Program::Execute(llvm::sys::Path const&, char
> const**, char const**, llvm::sys::Path const**, unsigned int,
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >*)':
> /tmp/llvm-svn/llvm/lib/System/Unix/Program.inc:209: undefined reference
> to `environ'
> I found that the error disappears when -Wl,--no-undefined is removed
> from the linker command line (below).
> Also in an unrelated observation I noticed that both -Wl,--whole-archive
> and -Wl,--no-whole-archive are specified which is probably wrong.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the llvm-dev