svn commit: r357963 - in projects/clang1000-import: . share/mk

Dimitry Andric dim at FreeBSD.org
Sat Feb 15 14:53:27 UTC 2020


Author: dim
Date: Sat Feb 15 14:53:26 2020
New Revision: 357963
URL: https://svnweb.freebsd.org/changeset/base/357963

Log:
  Tentatively apply D23691, which takes LINKER_FREEBSD_VERSION from the
  numerical field after the dash.  This avoids re-bootstrapping of the
  linker, when only the git commit hash changes.

Modified:
  projects/clang1000-import/Makefile.inc1
  projects/clang1000-import/share/mk/bsd.linker.mk

Modified: projects/clang1000-import/Makefile.inc1
==============================================================================
--- projects/clang1000-import/Makefile.inc1	Sat Feb 15 13:00:39 2020	(r357962)
+++ projects/clang1000-import/Makefile.inc1	Sat Feb 15 14:53:26 2020	(r357963)
@@ -272,9 +272,10 @@ WANT_LINKER_TYPE=
     !make(test-system-compiler)
 .if ${WANT_LINKER_TYPE} == "lld"
 WANT_LINKER_FREEBSD_VERSION_FILE= lib/clang/include/VCSVersion.inc
-WANT_LINKER_FREEBSD_VERSION!= \
+_WANT_LINKER_FREEBSD_VERSION!= \
 	awk '$$2 == "LLD_REVISION" {gsub(/"/, "", $$3); print $$3}' \
 	${SRCDIR}/${WANT_LINKER_FREEBSD_VERSION_FILE} || echo unknown
+WANT_LINKER_FREEBSD_VERSION=${_WANT_LINKER_FREEBSD_VERSION:C/.*-(.*)/\1/}
 WANT_LINKER_VERSION_FILE= lib/clang/include/lld/Common/Version.inc
 WANT_LINKER_VERSION!= \
 	awk '$$2 == "LLD_VERSION" {split($$3, a, "."); print a[1] * 10000 + a[2] * 100 + a[3]}' \

Modified: projects/clang1000-import/share/mk/bsd.linker.mk
==============================================================================
--- projects/clang1000-import/share/mk/bsd.linker.mk	Sat Feb 15 13:00:39 2020	(r357962)
+++ projects/clang1000-import/share/mk/bsd.linker.mk	Sat Feb 15 14:53:26 2020	(r357963)
@@ -69,9 +69,11 @@ _v=	${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=	lld
 _v=	${_ld_version:[2]}
-${X_}LINKER_FREEBSD_VERSION!= \
-	${${ld}} --version | \
-	awk '$$3 ~ /FreeBSD/ {print substr($$4, 1, length($$4)-1)}'
+.if ${_ld_version:[3]} == "(FreeBSD"
+${X_}LINKER_FREEBSD_VERSION:=	${_ld_version:[4]:C/.*-(.*)\)/\1/}
+.else
+${X_}LINKER_FREEBSD_VERSION=	0
+.endif
 .else
 .warning Unknown linker from ${ld}=${${ld}}: ${_ld_version}, defaulting to bfd
 ${X_}LINKER_TYPE=	bfd


More information about the svn-src-projects mailing list