From owner-dev-commits-src-all@freebsd.org Sat Sep 11 14:55:08 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 23CD4673173 for ; Sat, 11 Sep 2021 14:55:08 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 4H6G4W6q4Vz3ljG for ; Sat, 11 Sep 2021 14:55:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f52.google.com with SMTP id u15so1109153wru.6 for ; Sat, 11 Sep 2021 07:55:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=5g8m7BNdiIgszIoLWGBjAlsGpa5CxMm60TBiWYsemqw=; b=wpHhfSKaUB6m4OYzQAQ2jK76WJATvDwa54WTO7DhdiHh7E4ZXs0CtdnM3fPZtt93/O DPls8lhMZZm5jdjWwhEy9ZM909ZPNK/Qld5QAVsoHydE4raCf1HBLNRoN68+Jmyl3ixA Yke/Uo++MkhaPxIKSJi/2O1mxDK6NUJL9KxNG+mqbZXryAeULQkGO7ZCVj+lRjFrb1Mk uneLI7y3boNSzdZKB6RhfUxWAJBauSLeVa9g8A+Py6HXu6ouoSvplNklNpRABG91ZfPE JE81ZFrb6Pi9Qa5f2VeQPCAAe1mMSuWHfgg/Pt280B83B0YqiVwNesFh7kxsTbsWSBO0 43IQ== X-Gm-Message-State: AOAM533Irb/J37TfsWrnvz9lrinAv8gyKG4ehNBpon1YC/IG4Bvpxpvg oQ0ZEVVr+TIVDuDlk9afDdRMSw== X-Google-Smtp-Source: ABdhPJye1bYEiHf4Gfa8ZN6VPbbZ0VWWPn6uAL2aN9E2hjV7bSZ17zsDoHRAX0EwCNVwEFtEED/GWw== X-Received: by 2002:adf:ec02:: with SMTP id x2mr3444851wrn.407.1631372100866; Sat, 11 Sep 2021 07:55:00 -0700 (PDT) Received: from smtpclient.apple (global-5-143.nat-2.net.cam.ac.uk. [131.111.5.143]) by smtp.gmail.com with ESMTPSA id l15sm1031300wme.42.2021.09.11.07.55.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Sep 2021 07:55:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: git: 021385aba562 - main - Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain From: Jessica Clarke In-Reply-To: <20210911144340.pmpxca7obksc7v5g@mutt-hbsd> Date: Sat, 11 Sep 2021 15:54:59 +0100 Cc: Alex Richardson , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <712AB9FB-E2D8-490F-B9C8-CA9A7A654856@freebsd.org> References: <202109060924.1869O2Dk045877@gitrepo.freebsd.org> <20210911144340.pmpxca7obksc7v5g@mutt-hbsd> To: Shawn Webb X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4H6G4W6q4Vz3ljG 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 14:55:08 -0000 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=3D021385aba56279febcfdcc64d23673a0= 106ae45d >>=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 = Elftoolchain >>=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 = IR. >> Another benefit will be an improved user-experience when compiling = with >> AddressSanitizer, since ASAN does not symbolize backtraces = correctly 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 = at 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. ;-) I guess this: diff --git a/usr.bin/clang/llvm-objcopy/Makefile = b/usr.bin/clang/llvm-objcopy/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 = llvm-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. Jess