svn commit: r352033 - head/share/mk

Mitchell Horne mhorne at FreeBSD.org
Sun Sep 8 19:40:53 UTC 2019


Author: mhorne
Date: Sun Sep  8 19:40:52 2019
New Revision: 352033
URL: https://svnweb.freebsd.org/changeset/base/352033

Log:
  Allow for compiler versions >= 10
  
  Both clang and gcc development branches have reached version 10. Since we
  only parse for a single digit in the major version number, this causes
  COMPILER_VERSION to be set to its default of 0.0.0, meaning version checks
  fail with these newer compilers.
  
  Reviewed by:	emaste
  Approved by:	markj (mentor)
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D21413

Modified:
  head/share/mk/bsd.compiler.mk

Modified: head/share/mk/bsd.compiler.mk
==============================================================================
--- head/share/mk/bsd.compiler.mk	Sun Sep  8 19:39:45 2019	(r352032)
+++ head/share/mk/bsd.compiler.mk	Sun Sep  8 19:40:52 2019	(r352033)
@@ -187,7 +187,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


More information about the svn-src-head mailing list