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
This commit is contained in:
Bryan Drewery 2017-06-22 21:22:12 +00:00
parent 81b4423f05
commit 89bf31fd63
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320248

View File

@ -48,7 +48,7 @@ _ld_version!= ${${ld}} --version 2>/dev/null | head -n 1 || echo none
.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]}