[LLVMdev] Building libLLVM-2.8svn.so fails to link on FreeBSD

Yuri 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.

Thank you,
Yuri

On 08/19/2010 15:45, Yuri wrote:
> I am getting this error on FreeBSD-8.1 (amd64):
>
> llvm[1]: Linking Debug+Asserts Shared Library libLLVM-2.8svn.so
> /tmp/llvm-svn/llvm-objects/Debug+Asserts/lib/libLLVMSystem.a(Program.o)(.text+0xa2b):
> 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.
>
> Yuri
>
>    
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fbsd-shlib.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100819/6565c6f5/attachment.ksh>


More information about the llvm-dev mailing list