diff --git a/share/mk/bsd.linker.mk b/share/mk/bsd.linker.mk index 839479280ccc..f90a1a31e210 100644 --- a/share/mk/bsd.linker.mk +++ b/share/mk/bsd.linker.mk @@ -49,7 +49,7 @@ ${var}= ${${var}.${${X_}_ld_hash}} .if ${ld} == "LD" || (${ld} == "XLD" && ${XLD} != ${LD}) .if !defined(${X_}LINKER_TYPE) || !defined(${X_}LINKER_VERSION) -_ld_version!= (${${ld}} --version || echo none) | head -n 1 +_ld_version!= (${${ld}} --version || echo none) | sed -n '1,1p' .if ${_ld_version} == "none" .warning Unable to determine linker type from ${ld}=${${ld}} .endif