Date: Thu, 5 Aug 2021 09:25:53 GMT From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e2e533bdcc7f - stable/13 - bsd.linker.mk: Detect LLD when built with PACKAGE_VENDOR Message-ID: <202108050925.1759Prwk006735@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=e2e533bdcc7f033fddd9155d126b1f8ddb095e56 commit e2e533bdcc7f033fddd9155d126b1f8ddb095e56 Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-07-20 15:04:56 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108050925.1759Prwk006735>