From 8b817932f716a73867ee4064d2b1b4a4ef6b383a Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 21 Jan 2015 21:49:03 +0000 Subject: [PATCH] Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL ELF Tool Chain tools need libelf and libdwarf. Submitted by: jmallett (earlier version) Reviewed by: jmallett Sponsored by: The FreeBSD Foundation --- Makefile.inc1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 984d240c6edb..afa49408e688 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1292,12 +1292,16 @@ _clang_tblgen= \ usr.bin/clang/clang-tblgen .endif +# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. # dtrace tools are required for older bootstrap env and cross-build # pre libdwarf -.if ${MK_CDDL} != "no" && (${BOOTSTRAPPING} < 1100006 \ - || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) -_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ - lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge +.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \ + ${MACHINE_ARCH} != ${TARGET_ARCH}) +_elftoolchain_libs= lib/libelf lib/libdwarf +.if ${MK_CDDL} != "no" +_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \ + cddl/usr.bin/ctfmerge +.endif .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly @@ -1324,6 +1328,7 @@ bootstrap-tools: .MAKE .for _tool in \ ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ + ${_elftoolchain_libs} \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \