From owner-freebsd-toolchain@freebsd.org Fri Jan 12 15:27:31 2018 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9DDCE6AE30 for ; Fri, 12 Jan 2018 15:27:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E3766F979 for ; Fri, 12 Jan 2018 15:27:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wm0-x233.google.com with SMTP id f140so12510779wmd.2 for ; Fri, 12 Jan 2018 07:27:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Z26XxE2q9ndh0WtJrSWmuBYgNiHTlE9/gTSlm/FMEmU=; b=ec5Xc9ER/g2NJ5Wn5XAxHI6w+l9IP8bI1i686QQnNpnNR3Nt/eb1KbsqwovgLqtTf3 RTxm1akeR6vQB3UNfu6cx3Ci9IovaxVngmROM8/YJGyfZNeSlDJP7OVAy1PoGSD4Dh2a UTdVILvfApMLPp2TCHqtTeP0uf8MLeXH5gmtWOiIOtNPC4xTSUiPa5Scy46ZW5mAoE00 fWZjOxweyExjzTAHma8MmzkfMJH5tX1Wm3jSjiR4au4qePB3i5WXUJS1/hshhIFYF8vl bM7E0dUyptC3livx8U5CCTqMOsyWDnP7+6Ay7xU56QV3uNAo7dVohYf7VlJoN/ZMrZpV Wx4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Z26XxE2q9ndh0WtJrSWmuBYgNiHTlE9/gTSlm/FMEmU=; b=q7bc+RgIJxfmGAr7UezgNcV36rTjmWu9vYvXEmPULkbdM2fDh/IPL4+rHiCPgFJBHJ jftmVEcxeHuX4B6H7r/5skXNSsuYdR64O/2hzXEZsTGxxaMqQhDrLAYHEOTviH4CH3UA cL1m7YEPJ+G6q/qqZx60Nwu6DaiachK8cdzofmJG4SbE4Q4WXkhdufe20/R3808t0k1z ZBspDewR2F1UvDC7Raew69XzmMPphkfprUobqs9pQ2Gf5xqNbgV6F0nh3UmExrm9zz3E p9lVVsW05QuZLBLaFErwl3RLrX+jZCOfq3YsPcuB6pmHAw7sJx251ax7K+dNl5ibvjZM 1Vbg== X-Gm-Message-State: AKGB3mIWhND4Vujm9Y0wwkbgp2GRlS8P9lYTjDLgJqHm6bc9vofZkAwC HMZoQn97Fhy7yvdPxmN/QoaIfA== X-Google-Smtp-Source: ACJfBosE+V6vb5lZvkGbQ+69OISvPFCrLdjhZhKqNDKR8MAhHZwdAfuy74nnFJKKz7+Gn4HNIFdG6w== X-Received: by 10.80.231.13 with SMTP id a13mr36599588edn.264.1515770849749; Fri, 12 Jan 2018 07:27:29 -0800 (PST) Received: from mutt-hbsd ([94.177.123.116]) by smtp.gmail.com with ESMTPSA id k42sm5103588edb.44.2018.01.12.07.27.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jan 2018 07:27:28 -0800 (PST) Date: Fri, 12 Jan 2018 10:26:59 -0500 From: Shawn Webb To: Dimitry Andric Cc: freebsd-toolchain@freebsd.org Subject: Re: projects/clang600-import and ld.lld Message-ID: <20180112152659.rqkvhzny6hzczv3k@mutt-hbsd> References: <20180112143851.wzp373hapbsxyntu@mutt-hbsd> <7D27872B-1FAF-4DCE-AD90-B8F9EB866C75@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5reuvyv7mw6kigem" Content-Disposition: inline In-Reply-To: <7D27872B-1FAF-4DCE-AD90-B8F9EB866C75@FreeBSD.org> X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20171208 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 15:27:31 -0000 --5reuvyv7mw6kigem Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2018 at 04:17:50PM +0100, Dimitry Andric wrote: > On 12 Jan 2018, at 15:38, Shawn Webb wrote: > >=20 > > 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=3Dyes). When lld tries to > > link usr.bin/clang/llvm-extract/llvm-extract, lld errors out with some > > unresolved symbols. The log is below. > >=20 > > Has anyone else run into this? > >=20 > > /usr/obj/scratch/hbsd-playground/amd64.amd64/tmp/usr/bin/ld: error: und= efined symbol: compressBound > >>>> referenced by Compression.cpp:63 (/scratch/hbsd-playground/contrib/l= lvm/lib/Support/Compression.cpp:63) > >>>> Compression.o:(llvm::zlib::compress(llvm::StringRef, ll= vm::SmallVectorImpl&, llvm::zlib::CompressionLevel)) in archive /usr/= obj/scratch/hbsd-playground/amd64.amd64 > > /lib/clang/libllvm/libllvm.a >=20 > It links fine for me, and I haven't heard any other reports of this, but > can you please try adding a line: >=20 > LIBADD+=3D z Can do. I'm also using llvm-ar as the default ar and ranlib, llvm-nm as the default nm, and llvm-objdump as the default objdump. It might be the combination (I kinda suspect llvm-ar) that could be the issue. It's possible there's a regression in llvm-ar. >=20 > to usr.bin/clang/llvm-extract/Makefile locally, and see if that fixes it > for you? I'll give that a shot, but it seems the error is within lld itself. >=20 > 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. >=20 > Do you have any non-default settings in make.conf or src.conf? Nope. This is HardenedBSD's source tree, though, so we do have several different WITH_* flags. I'm working on pulling in the retpoline patch into a feature branch in the HardenedBSD Playground repo[1]. >=20 > -Dimitry >=20 > 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 >=20 Great to hear! [1]: https://github.com/hardenedbsd/hardenedbsd-playground/tree/hardened/cu= rrent/retpoline Thanks for the help. I'll do more investigating and report back. In the meantime, if you have any further ideas, please let me know. Thanks again, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --5reuvyv7mw6kigem Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlpY08EACgkQaoRlj1JF bu7XwxAAvoFpROHxhjS0GKkAY0cvyrQP+kme0C2Kq1FjmcN14pZ02QJR+fWvc7vt 7opyfkJ7eS9KsCJQoCeO8iYsYky70l2rrQGOyUArMQ2+nc+hVuuQDKjtUGQ2lm0/ uedrbx565738dacHPyLjBVT11sjgJExjCAhrUDKk93ZHQvlg99JsdLtrooOyoitq oajaQOBNT3VzggAYI04n0PfIziVmDHu+GEJjWYVccVQ8FWuDPRB7lYtrguAXxp1F ZN4qhdIDUCVgvqpkVcLFszOZB9LLuMSKHSKEERODsQbO8pltYupX011dbSfkf+Bt j1fG7eq2KYlDv2dXwg6QeQ3BbqgnGK/sgvIUMh8lpDbXsfp5JGqzTwFLME7rLR80 1C1nlE4UvGyRNJAQ7u90GdkwaAPAQomF9GAnEy2I8/sfa4oulqLnpXFPP5JCYP0S uDZvqSPo6mPIPRgg6QSc1l95dccH86KTIAF56zh1OIhecSGyqllGfis9edNW51R2 /2qU4BUx9lmW+WbJnys/Igjiq0Y7M2XCL8FXdi1Q16Rm2JDu5FW0fAP9sNHRmcKd kNte3YbnovbJyCgMDYxc7lHab0PWdCal7lSUfEAR8Ch01BtsSLet3cia5ykc8xgp aFksDWyJfn1RI7DeaXiiZ8SUnshgnmsuEGNV4hzogKTBSpcrjic= =8+ei -----END PGP SIGNATURE----- --5reuvyv7mw6kigem--