From b38b45af2faa0f3736ed53097e6e6b52e387afdf Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Thu, 28 Jun 2018 18:22:20 +0000 Subject: [PATCH] tinderbox: If the clang lookup fails fallback to the old default behavior. This fixes errors from the MK_CLANG_BOOTSTRAP/MK_LLD_BOOTSTRAP lookups to not force using XCC/XLD but to rather just build them as normal by allowing their own bootstrap logic to work. MFC after: 3 weeks X-MFC-with: r335711 r335769 Sponsored by: Dell EMC --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0e2f94e0cda3..0d62c09a29a0 100644 --- a/Makefile +++ b/Makefile @@ -587,19 +587,21 @@ universe_${target}_worlds: .PHONY _need_clang_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \ - ${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP 2>/dev/null || \ + echo unknown .export _need_clang_${target}_${target_arch} .endif .if !defined(_need_lld_${target}_${target_arch}) _need_lld_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \ - ${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP 2>/dev/null || \ + echo unknown .export _need_lld_${target}_${target_arch} .endif # Setup env for each arch to use the one clang. .if defined(_need_clang_${target}_${target_arch}) && \ - ${_need_clang_${target}_${target_arch}} != "no" + ${_need_clang_${target}_${target_arch}} == "yes" # No check on existing XCC or CROSS_BINUTILS_PREFIX, etc, is needed since # we use the test-system-compiler logic to determine if clang needs to be # built. It will be no from that logic if already using an external @@ -613,7 +615,7 @@ MAKE_PARAMS_${target}+= \ XCPP="${HOST_OBJTOP}/tmp/usr/bin/cpp" .endif .if defined(_need_lld_${target}_${target_arch}) && \ - ${_need_lld_${target}_${target_arch}} != "no" + ${_need_lld_${target}_${target_arch}} == "yes" MAKE_PARAMS_${target}+= \ XLD="${HOST_OBJTOP}/tmp/usr/bin/ld" .endif @@ -625,9 +627,9 @@ universe_${target}_done: universe_${target}_worlds .PHONY .for target_arch in ${TARGET_ARCHES_${target}} universe_${target}_worlds: universe_${target}_${target_arch} .PHONY .if (defined(_need_clang_${target}_${target_arch}) && \ - ${_need_clang_${target}_${target_arch}} != "no") || \ + ${_need_clang_${target}_${target_arch}} == "yes") || \ (defined(_need_lld_${target}_${target_arch}) && \ - ${_need_lld_${target}_${target_arch}} != "no") + ${_need_lld_${target}_${target_arch}} == "yes") universe_${target}_${target_arch}: universe-toolchain universe_${target}_prologue: universe-toolchain .endif