From 0fcba03f4d69f19be01271321459634acdbd0cb3 Mon Sep 17 00:00:00 2001 From: John Marino Date: Tue, 20 Dec 2016 12:32:53 -0600 Subject: [PATCH] Fix world build in NO_ALTBINUTILS edge case In the case that the machine has been updated within 30 days but with NO_ALTBINUTILS set, the world build fails. This is due because the logic to fallback to earlier binutils versions fails due to empty directories that are installed regardless of the NO_ALBINUTILS setting. The logic was updated to search for binutils programs rather than directories. In the edge case, the oldest version of binutils on the system is used to build the native versions during the early build phases. --- share/mk/bsd.cpu.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index f09b107be6..4adb031c32 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -28,7 +28,8 @@ HOST_CCVER?= ${_DEFAULT_CCVER} .if exists(/usr/libexec/${_DEFAULT_BINUTILSVER}/elf/as) HOST_BINUTILSVER?= ${_DEFAULT_BINUTILSVER} .else -HOST_BINUTILSVER!= basename `find -s /usr/libexec/binutils* -depth 0 | tail -1` +_NEXTAS!= find -s /usr/libexec/binutils* -name as -print0 -quit +HOST_BINUTILSVER?= ${_NEXTAS:H:H} .endif .if defined(FORCE_CPUTYPE) -- 2.11.4.GIT