From owner-freebsd-toolchain@freebsd.org Fri Jan 12 17:04:58 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 CBA9CE704EE for ; Fri, 12 Jan 2018 17:04:58 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x22b.google.com (mail-wr0-x22b.google.com [IPv6:2a00:1450:400c:c0c::22b]) (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 57FE473DEF for ; Fri, 12 Jan 2018 17:04:58 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x22b.google.com with SMTP id z48so5876373wrz.6 for ; Fri, 12 Jan 2018 09:04:58 -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=2wA9pLI/yu5Z7xG6G/Ml5RJtzVcd4A8Sb1UtMx3aPx8=; b=y2rfoo0IHJ8jdAbDgUaH85bboOk/oi8B+8/9Sgi5jQUoL7L920q9i8vs+zqBZDe9bX Q1qQZVQHN9ygnsn0cgEbcpUp7ceEhY7ddN1HmNd7+AuTudUVoqEuKot/HsBsRX6dn4T1 S+qr1Mf494oQ9TgWb74y8z8AB8NkJ/9pOxDiJ2zoqgdHRjDmR8+5joDl9pCy0eB0XdQY zt5thLRQ0wWW8Gfk3HPgLARRP1Aqx0ZRWLKnRQeDPKpdj+FYj+MRzykgDL4Adt5UvaBv T3vbBFSdZ+l33WD10EjfCAW56QdVQwAYe5Q7B+UHOeuNdQRXth+WC7bKbRaXBw9d3X+5 mdRA== 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=2wA9pLI/yu5Z7xG6G/Ml5RJtzVcd4A8Sb1UtMx3aPx8=; b=qQZ2DDAZnxlijFrpuuYT5BnyBbBt2jU6sYWBPw6/aaeuZ+a5q9Cqxlf7o+L70+ghD9 iB53QLiEHEzu744YA/k8iFQ7a6MdoD0D4HR+xf9BL1LTAnc1M5oMG/qflPdEKsUJEuod GCdO9Gh/lcZsgdLVtZe6hhNHpzSxtwdW6f3dctyg+nG/Utewjvd/KdYpjmLsD1M2YSAu Jrazb9RbV+x290oRm+1iuwrGLCzivb8GOQRkiY9NGZh2WcuJ6xw0Tgv5b2IUZuvuA3KG 5RgHkSD86J8RoYSBS7KFygNxiGI1WovEter2GvVORWP5aTSmrM0a99TH4oPeAPe0PUK5 U0KA== X-Gm-Message-State: AKGB3mIcG1oW7i32SUuDNjIkNDPdboZLJcdKwVVR3rmKI3OCkFMcSo3S xQafGy+FokUjwqRbONjK5NixzhDAwvo= X-Google-Smtp-Source: ACJfBovg4eYI40GIGQezOs9Wr85FRWNr1EIz2Y7YofWodWNzIvo2hhXkeH1MOWvSdapas9Y93i6BrQ== X-Received: by 10.223.199.197 with SMTP id y5mr20482829wrg.158.1515776696410; Fri, 12 Jan 2018 09:04:56 -0800 (PST) Received: from mutt-hbsd ([5.188.10.8]) by smtp.gmail.com with ESMTPSA id j89sm6855516wrj.18.2018.01.12.09.04.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jan 2018 09:04:55 -0800 (PST) Date: Fri, 12 Jan 2018 12:04:46 -0500 From: Shawn Webb To: Dimitry Andric Cc: freebsd-toolchain@freebsd.org Subject: Re: projects/clang600-import and ld.lld Message-ID: <20180112170446.knmihdnrrsqzwyba@mutt-hbsd> References: <20180112143851.wzp373hapbsxyntu@mutt-hbsd> <7D27872B-1FAF-4DCE-AD90-B8F9EB866C75@FreeBSD.org> <20180112152659.rqkvhzny6hzczv3k@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="miw4ckkvngodbw6t" Content-Disposition: inline In-Reply-To: <20180112152659.rqkvhzny6hzczv3k@mutt-hbsd> 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 17:04:58 -0000 --miw4ckkvngodbw6t Content-Type: multipart/mixed; boundary="pumelxrelb6mbmqh" Content-Disposition: inline --pumelxrelb6mbmqh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2018 at 10:26:59AM -0500, Shawn Webb wrote: > 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: u= ndefined 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&, llvm::zlib::CompressionLevel)) in archive /us= r/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 >=20 > 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 > >=20 > > to usr.bin/clang/llvm-extract/Makefile locally, and see if that fixes it > > for you? >=20 > I'll give that a shot, but it seems the error is within lld itself. >=20 > >=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? >=20 > 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 > >=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 >=20 > Great to hear! >=20 > [1]: https://github.com/hardenedbsd/hardenedbsd-playground/tree/hardened/= current/retpoline >=20 > 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. I've attached a patch which allows buildworld to succeed on HardenedBSD's retpoline branch. Thanks, --=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 --pumelxrelb6mbmqh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="clang600.patch.txt" Content-Transfer-Encoding: quoted-printable diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index 9c99507acf9..ca6ce80a060 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -19,6 +19,7 @@ SRCS+=3D API/SBAttachInfo.cpp SRCS+=3D API/SBBlock.cpp SRCS+=3D API/SBBreakpoint.cpp SRCS+=3D API/SBBreakpointLocation.cpp +SRCS+=3D API/SBBreakpointOptionCommon.cpp SRCS+=3D API/SBBroadcaster.cpp SRCS+=3D API/SBCommandInterpreter.cpp SRCS+=3D API/SBCommandReturnObject.cpp @@ -47,6 +48,7 @@ SRCS+=3D API/SBModule.cpp SRCS+=3D API/SBModuleSpec.cpp SRCS+=3D API/SBPlatform.cpp SRCS+=3D API/SBProcess.cpp +SRCS+=3D API/SBProcessInfo.cpp SRCS+=3D API/SBQueue.cpp SRCS+=3D API/SBQueueItem.cpp SRCS+=3D API/SBSection.cpp diff --git a/usr.bin/clang/llvm-extract/Makefile b/usr.bin/clang/llvm-extra= ct/Makefile index 6079e1c0006..cc356a060c4 100644 --- a/usr.bin/clang/llvm-extract/Makefile +++ b/usr.bin/clang/llvm-extract/Makefile @@ -5,4 +5,6 @@ PROG_CXX=3D llvm-extract SRCDIR=3D tools/llvm-extract SRCS+=3D llvm-extract.cpp =20 +LIBADD+=3D z + .include "../llvm.prog.mk" --pumelxrelb6mbmqh-- --miw4ckkvngodbw6t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlpY6qsACgkQaoRlj1JF bu64SQ//b5ZxKajjoUvxgZgo0RFnY3JfsOI8V1X24oEbvZOhjwU2svSzzUsmiIR+ y0yKxrt2BGzwqGeqHcSjEMUz8iPX7bgCgIPo1WrckNCzCYRatJ7N2MOT1uQkq6Xq 4TOI0JAPO9TC5d2FuMMuBpjATAtULVRrO7hLCxUtFkZaw7dnGo6zYGYN0fsQhaBM cNTWUUfwFXmBBSIs6dpqOECoNVSH+z4SSd+ghkpgo+xG+LL8gvipCTgj5fNO18aq h/XugmEuyR2zlHlp4VHefw0sKgTg4koVeaUq21Yd30CXgUXeZO5WB1XPgaNquLOm DCLMlaL8DI5NMWS/OtNXTjk7DsdeGMpdS1bOJ4FrDhXl0H5ijhJbF/8IL1KiECt3 2us8kIjE8n9REPEkbeEjrVq2zJmVXX6mBRIR+PHF0rVArc8m7Jby/tT7pL5pKmuU tCwx1bcJoaAerKBuBtRSqNKSMHy3gqzxdQ4yR8Z+eJSk5g9GMQbh8Io2Qoj04mCe dmIKq3pJpelog6WcCc2jCy18sVW3qwUMEdu91eCNCsSsOldFo2I7YEZ9eQzwz3dZ WtGIzFbNrRLJWnZfIqlqHSPMlX/Kalj1R87nmmWvBpkwgsHIOzOH3yATmt7oapmN V4sgRN3YrETbbXTbn5f2tfz1eHAwr1PezHbpl/6k/nhvNTQVSmk= =3YgX -----END PGP SIGNATURE----- --miw4ckkvngodbw6t--