From owner-dev-commits-src-all@freebsd.org Thu Aug 5 09:25:53 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 A45E5660265; Thu, 5 Aug 2021 09:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GgNWj2JB7z4nLn; Thu, 5 Aug 2021 09:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27A4617CB1; Thu, 5 Aug 2021 09:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1759Prfr006736; Thu, 5 Aug 2021 09:25:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1759Prwk006735; Thu, 5 Aug 2021 09:25:53 GMT (envelope-from git) Date: Thu, 5 Aug 2021 09:25:53 GMT Message-Id: <202108050925.1759Prwk006735@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: e2e533bdcc7f - stable/13 - bsd.linker.mk: Detect LLD when built with PACKAGE_VENDOR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e2e533bdcc7f033fddd9155d126b1f8ddb095e56 Auto-Submitted: auto-generated 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: Thu, 05 Aug 2021 09:25:53 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=e2e533bdcc7f033fddd9155d126b1f8ddb095e56 commit e2e533bdcc7f033fddd9155d126b1f8ddb095e56 Author: Alex Richardson AuthorDate: 2021-07-20 15:04:56 +0000 Commit: Alex Richardson CommitDate: 2021-08-05 09:00:36 +0000 bsd.linker.mk: Detect LLD when built with PACKAGE_VENDOR Recent versions of homebrew's LLD are built with PACKAGE_VENDOR (since https://github.com/Homebrew/homebrew-core/commit/e7c972b6062af753e564104e58d1fa20c0d1ad7a). This means that the -v output is now `Homebrew LLD 12.0.1 (compatible with GNU linkers)` and bsd.linker.mk no longer detects it as LLD since it only checks whether the first word is LLD. This change allow me to build on macOS again and should unbreak the GitHub actions CI. Reviewed By: imp, uqs MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D31224 (cherry picked from commit f8147dad44f1036160a413bb00b4e8b41f7a4a84) --- share/mk/bsd.linker.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 344a5b937380..7209d7f173ae 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -69,7 +69,9 @@ _ld_version!= (${${ld}} -v 2>&1 || echo none) | sed -n 1p ${X_}LINKER_TYPE= bfd ${X_}LINKER_FREEBSD_VERSION= 0 _v= ${_ld_version:M[1-9]*.[0-9]*:[1]} -.elif ${_ld_version:[1]} == "LLD" +.elif ${_ld_version:MLLD} +# Strip any leading PACKAGE_VENDOR string (e.g. "Homebrew") +_ld_version:=${_ld_version:[*]:C/^.* LLD /LLD /:[@]} ${X_}LINKER_TYPE= lld _v= ${_ld_version:[2]} .if ${_ld_version:[3]} == "(FreeBSD"