From owner-dev-commits-src-all@freebsd.org Sat Sep 11 16:18:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67EB967443E for ; Sat, 11 Sep 2021 16:18:15 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H6HwR1x62z4dJh for ; Sat, 11 Sep 2021 16:18:15 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x72c.google.com with SMTP id c10so5605057qko.11 for ; Sat, 11 Sep 2021 09:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yb9k3h4t0SMUat3R7IRbluujl4qB4TcGFdSDBbY7AZw=; b=aD+1fDWsN1geArCkwW5vc2nvj9PjC+1QRUHzVWc2BDxqNmbjTGTZZsSgZG10TM31DL FzIkYiAj2Umd3ns/friN8kvQ0Xk2rIsTNW4Yh9gIIRZlZVlcU/n6qRB1oxnKMuUUmMrF fuBp3tN1ocCXsegwLpOsFpmkVJUCnv/5lp+FLFzuE/BytYrGmz2mC8uAsf70FOcwsH9u mrLVU8G9hnLSdc/gLMp0gVBU9KjlZRAdPe9gXrR4hIHpjf71crloto9TRChm+sCU1+bg STOyiwRTDSHV2ddZ8o5SpmvREd9FmY/OJu1zI3ABzxrpLbZ/E/guE0gGLQ1Tm41HZ+4A GZlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yb9k3h4t0SMUat3R7IRbluujl4qB4TcGFdSDBbY7AZw=; b=F6TCMO3tGBBbMqOuphXP81wUh04s0ZviN3GDJkQ2lG4aymehUojy062dmrk9F52l6P cYfSNgNwPECmNP9VgDigeBelZTA2gZzygK65LH07zZahPzrbJVnBN4HHBwrYlJNEt17i 9ttSh1eqha7dlpGbER3U5KMqoAD882d9/zotYvJaonnUHD8aSPWLRGhDMnp63u89juvH FV41vJAB0oElWs457uBoyG2Hin9Bec/izvaHLJNnA05APt+7+4ebLrvIgDmOAUfg4wA0 FQFgDYVTmVAJKHDMgqQjPC8SHnUuMx7/SO89e3/2WrjcsouoJTEnOGOmlhQxu/ov3E+b 4Elg== X-Gm-Message-State: AOAM531wWasUciWExMf2mmLOOtka02PcG/OyRicNzVQoOHdogMsAx3Ef iDV8korxEdaebe1UoHCLGpa34Q== X-Google-Smtp-Source: ABdhPJzgX28mUSxxurnOGF+HkPooOqtgfcsx6O+kU1XKaniqtbTK3XLkPsQnHQxyjkbHSkJSU8J37A== X-Received: by 2002:a37:2e81:: with SMTP id u123mr2633926qkh.156.1631377089401; Sat, 11 Sep 2021 09:18:09 -0700 (PDT) Received: from mutt-hbsd (pool-100-16-224-136.bltmmd.fios.verizon.net. [100.16.224.136]) by smtp.gmail.com with ESMTPSA id p187sm1484763qkd.101.2021.09.11.09.18.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 09:18:09 -0700 (PDT) Date: Sat, 11 Sep 2021 12:18:08 -0400 From: Shawn Webb To: Jessica Clarke Cc: Alex Richardson , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 021385aba562 - main - Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain Message-ID: <20210911161808.yui4ltlsaih3ajq5@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 14.0-CURRENT-HBSD FreeBSD 14.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc References: <202109060924.1869O2Dk045877@gitrepo.freebsd.org> <20210911144340.pmpxca7obksc7v5g@mutt-hbsd> <712AB9FB-E2D8-490F-B9C8-CA9A7A654856@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p6s6tueerglebyg6" Content-Disposition: inline In-Reply-To: <712AB9FB-E2D8-490F-B9C8-CA9A7A654856@freebsd.org> X-Rspamd-Queue-Id: 4H6HwR1x62z4dJh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2021 16:18:15 -0000 --p6s6tueerglebyg6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 11, 2021 at 03:54:59PM +0100, Jessica Clarke wrote: > On 11 Sep 2021, at 15:43, Shawn Webb wrote: > >=20 > > On Mon, Sep 06, 2021 at 09:24:02AM +0000, Alex Richardson wrote: > >> The branch main has been updated by arichardson: > >>=20 > >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D021385aba56279febcfdcc6= 4d23673a0106ae45d > >>=20 > >> commit 021385aba56279febcfdcc64d23673a0106ae45d > >> Author: Alex Richardson > >> AuthorDate: 2021-09-06 08:49:49 +0000 > >> Commit: Alex Richardson > >> CommitDate: 2021-09-06 08:49:49 +0000 > >>=20 > >> Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolc= hain > >>=20 > >> When WITH_LLVM_BINUTILS is set, we will install the LLVM binutils as > >> ar/ranlib/nm/objcopy/etc. instead of the elftoolchain ones. > >> Having the LLVM binutils instead of the elftoolchain ones allows us= to use > >> features such as LTO that depend on binutils that understand LLVM I= R. > >> Another benefit will be an improved user-experience when compiling = with > >> AddressSanitizer, since ASAN does not symbolize backtraces correctl= y if > >> addr2line is elftoolchain addr2line instead of llvm-symbolizer. > >> See https://lists.freebsd.org/archives/freebsd-toolchain/2021-July/= 000062.html > >> for more details. > >>=20 > >> This is currently off by default but will be turned on by default a= t some > >> point in the near future. > >=20 > > Hey Alex, > >=20 > > It appears when MK_LLVM_BINUTILS is set, a strip binary/link doesn't > > get installed. So /usr/bin/strip doesn't exist. This causes a problem > > when building packages since even ports-mgmt/pkg relies on strip. > >=20 > > I'm working on a candidate patch to fix this right now. But if you > > beat me to the punch, all the better. ;-) >=20 > I guess this: >=20 > diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-obj= copy/Makefile > index 2e6fc8aba356..afd03b848b19 100644 > --- a/usr.bin/clang/llvm-objcopy/Makefile > +++ b/usr.bin/clang/llvm-objcopy/Makefile > @@ -44,8 +44,11 @@ CLEANFILES+=3D ${TGHDRS} ${TGHDRS:C/$/.d/} > =20 > LIBADD+=3D z > =20 > +LINKS=3D ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip > + > .if ${MK_LLVM_BINUTILS} !=3D "no" > -LINKS=3D ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy > +LINKS+=3D ${BINDIR}/llvm-objcopy ${BINDIR}/objcopy \ > + ${BINDIR}/llvm-strip ${BINDIR}/strip > MLINKS=3D llvm-objcopy.1 objcopy.1 > .endif > =20 > Can=E2=80=99t do MLINKS yet as there=E2=80=99s no generated manpage for l= lvm-strip; not > sure what the process is to generate them from the upstream .rst files > other than =E2=80=9Cask dim@ nicely=E2=80=9D. A patch I wrote, nearly exactly similar to yours works. I'd say just take yours. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --p6s6tueerglebyg6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmE81r0ACgkQ/y5nonf4 4fqC+g//RkOVOer8A/cw69Pzwt5x8U53e0CFXDy5vVuqMBEXX+nQcQg3RwaPLuGZ j3b+Cu+nI24RM4mK36/Ey6WkaU7aYImGqjKNC7IMuw9rPXNH5vXs5Zc/G+rnK6L1 MTdNbxpn9CA2+PsjB346RTv07TRWdlf/RSYwolkwjL/kSyU3H+9nfhOKjsXaa2Kf ccW4WO8/9s8oIOn6fbzsNGjaPbJvRs7NXHg7qHPkQod5yn+G7m9lIsTxdv3EUM9w fy2uLsjiJjWFko6P3DeUP2qnvVTdRt1drzBvO3HIrO9O2UNfdJUzmc3Piuj04+M5 IMjSZ6Ttq8m69uI1tkUJTDx5dsWnlWIoHBYQNgfwf4pHw/HeR/grMiISpeSbDGLE 8ZbJwOiECOG6JSnKDna6PVHUgQC8yGofBoij8jXVjNCpWYnXNsA+ZRmFCraTgn+R 4/abmwtgg1UiBzZ++jBLNFujeczcQsBd3Fvdj5XXC8/CYHeac5FZFXnBTh8UW8RY Gg+8fH9TdTHtadgIFcGnyyMY7XhrRlxeKEL4SsQiFCB1/5RTGr5kj0TsWiL3fBfZ 73P94Qbq4Q2LxCd4wke9JExZa/2UIS506P14JGa6IMeL0xqcSO777bgokVuq4/Zz 3fH26pMdjv0eOtoeLdrDes2L/Z0QVi820aq+7j0rx8VfJYGCETo= =4u6K -----END PGP SIGNATURE----- --p6s6tueerglebyg6--