]> xenbits.xensource.com Git - freebsd.git/commitdiff
Allow for compiler versions >= 10
authormhorne <mhorne@FreeBSD.org>
Sun, 8 Sep 2019 19:40:52 +0000 (19:40 +0000)
committermhorne <mhorne@FreeBSD.org>
Sun, 8 Sep 2019 19:40:52 +0000 (19:40 +0000)
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

share/mk/bsd.compiler.mk

index 70f08bc8a9d676dcb2fc1b05c02dd9a3903a6a7d..0cf6f1749e3ff43e6e955a6d003dee2a31a3bafd 100644 (file)
@@ -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