svn commit: r360474 - releng/11.3/share/mk

Ed Maste emaste at FreeBSD.org
Wed Apr 29 18:59:40 UTC 2020


Author: emaste
Date: Wed Apr 29 18:59:37 2020
New Revision: 360474
URL: https://svnweb.freebsd.org/changeset/base/360474

Log:
  MF11 r352638,r358076: correct Clang and lld version checks
  
  r352638 (mhorne): Allow for compiler versions >= 10
  r358076 (dim): Correctly recognize linker versions greater than 10.0.
  
  These routines determine the host compiler and linker version, and caused
  attempts to build 12.1-RELEASE on 13-CURRENT to fail after the latter was
  updated to Clang 10.  The host compiler version was also misdetected on
  11.3 although it seems not to have caused the same build failure there.
  
  We don't guarantee such a build config to work, but it is used by FreeBSD
  ports build processes.  As a result the fixes from stable/11 will be
  included with the next set of advisories, and are being committed to the
  releng branch now to unblock ports builds.
  
  PR:		245973
  Reported by:	sbruno, antoine
  Approved by:	so
  Errata:		EN-20:10.build
  Sponsored by:	The FreeBSD Foundation

Modified:
  releng/11.3/share/mk/bsd.compiler.mk
  releng/11.3/share/mk/bsd.linker.mk
Directory Properties:
  releng/11.3/   (props changed)

Modified: releng/11.3/share/mk/bsd.compiler.mk
==============================================================================
--- releng/11.3/share/mk/bsd.compiler.mk	Wed Apr 29 18:51:34 2020	(r360473)
+++ releng/11.3/share/mk/bsd.compiler.mk	Wed Apr 29 18:59:37 2020	(r360474)
@@ -156,7 +156,7 @@ ${X_}COMPILER_TYPE:=	clang
 . endif
 .endif
 .if !defined(${X_}COMPILER_VERSION)
-${X_}COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}'
+${X_}COMPILER_VERSION!=echo "${_v:M[1-9]*.[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}'
 .endif
 .undef _v
 .endif

Modified: releng/11.3/share/mk/bsd.linker.mk
==============================================================================
--- releng/11.3/share/mk/bsd.linker.mk	Wed Apr 29 18:51:34 2020	(r360473)
+++ releng/11.3/share/mk/bsd.linker.mk	Wed Apr 29 18:59:37 2020	(r360474)
@@ -55,7 +55,7 @@ _ld_version!=	(${${ld}} --version || echo none) | sed 
 .endif
 .if ${_ld_version:[1..2]} == "GNU ld"
 ${X_}LINKER_TYPE=	bfd
-_v=	${_ld_version:M[1-9].[0-9]*:[1]}
+_v=	${_ld_version:M[1-9]*.[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=	lld
 _v=	${_ld_version:[2]}
@@ -64,7 +64,7 @@ _v=	${_ld_version:[2]}
 ${X_}LINKER_TYPE=	bfd
 _v=	2.17.50
 .endif
-${X_}LINKER_VERSION!=	echo "${_v:M[1-9].[0-9]*}" | \
+${X_}LINKER_VERSION!=	echo "${_v:M[1-9]*.[0-9]*}" | \
 			  awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}'
 .undef _ld_version
 .undef _v


More information about the svn-src-all mailing list