Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2017 21:22:12 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320248 - head/share/mk
Message-ID:  <201706222122.v5MLMCCv033936@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Thu Jun 22 21:22:12 2017
New Revision: 320248
URL: https://svnweb.freebsd.org/changeset/base/320248

Log:
  LINKER_VERSION: Support external binutils.
  
  The ports binutils stores the version in the 5th word so just look for
  a version using a pattern instead.
  
  Reported by:	rpokala
  MFC after:	2 weeks
  Sponsored by:	Dell EMC Isilon

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

Modified: head/share/mk/bsd.linker.mk
==============================================================================
--- head/share/mk/bsd.linker.mk	Thu Jun 22 21:03:30 2017	(r320247)
+++ head/share/mk/bsd.linker.mk	Thu Jun 22 21:22:12 2017	(r320248)
@@ -48,7 +48,7 @@ _ld_version!=	${${ld}} --version 2>/dev/null | head -n
 .endif
 .if ${_ld_version:[1..2]} == "GNU ld"
 ${X_}LINKER_TYPE=	binutils
-_v=	${_ld_version:[3]}
+_v=	${_ld_version:M[1-9].[0-9]*:[1]}
 .elif ${_ld_version:[1]} == "LLD"
 ${X_}LINKER_TYPE=	lld
 _v=	${_ld_version:[2]}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706222122.v5MLMCCv033936>