projects/clang600-import and ld.lld

Dimitry Andric dim at FreeBSD.org
Fri Jan 12 15:18:00 UTC 2018


On 12 Jan 2018, at 15:38, Shawn Webb <shawn.webb at hardenedbsd.org> wrote:
> 
> I know it's early in the game, but I thought I'd report this anyways.
> I have lld as the default linker (MK_LLD_IS_LD=yes). When lld tries to
> link usr.bin/clang/llvm-extract/llvm-extract, lld errors out with some
> unresolved symbols. The log is below.
> 
> Has anyone else run into this?
> 
> /usr/obj/scratch/hbsd-playground/amd64.amd64/tmp/usr/bin/ld: error: undefined symbol: compressBound
>>>> referenced by Compression.cpp:63 (/scratch/hbsd-playground/contrib/llvm/lib/Support/Compression.cpp:63)
>>>>              Compression.o:(llvm::zlib::compress(llvm::StringRef, llvm::SmallVectorImpl<char>&, llvm::zlib::CompressionLevel)) in archive /usr/obj/scratch/hbsd-playground/amd64.amd64
> /lib/clang/libllvm/libllvm.a

It links fine for me, and I haven't heard any other reports of this, but
can you please try adding a line:

LIBADD+=        z

to usr.bin/clang/llvm-extract/Makefile locally, and see if that fixes it
for you?

At some point I've tried minimizing the number of libraries pulled in,
and on my systems llvm-extract didn't use any of the compression
functions.  If you compile it differently, it could end up pulling in
those functions anyway.

Do you have any non-default settings in make.conf or src.conf?

-Dimitry

P.S. The clang600-import branch should be mostly ready for general
consumption, except for a number of ports that are still problematic,
see https://bugs.freebsd.org/224669

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-toolchain/attachments/20180112/6d369993/attachment.sig>


More information about the freebsd-toolchain mailing list