From cbc5242afd27883fc700d661c55fd6bf3b0f50f2 Mon Sep 17 00:00:00 2001 From: bdrewery Date: Wed, 25 Nov 2015 19:44:51 +0000 Subject: META MODE: Fix 'make bootstrap-tools'. The main problem was bitrot after elftoolchain being swapped in for the GNU toolchain. This also reworks how the list of 'host allowed' libraries is determined to only allow INTERNALLIBs, which is needed for libelftc to come in. For usr.bin/readelf use the same hack, as libelf and libdward, to bring in the needed sys/ headers for host builds. This has not yet been a problem due to readelf not being built as a host tool in buildworld. This is possible in the meta build though when building the toolchain. Sponsored by: EMC / Isilon Storage Division --- targets/pseudo/bootstrap-tools/Makefile | 2 +- targets/pseudo/toolchain/Makefile.depend | 36 ++++++++------------------------ 2 files changed, 10 insertions(+), 28 deletions(-) (limited to 'targets') diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 8d90d1c..f196c8a 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -62,7 +62,7 @@ cross-tools build-tools bootstrap-tools: .MAKE .META touch $@ # MAKELEVEL=0 so that dirdeps.mk does its thing -# LEGACY_TOOLS lets us use the bootstaped stuff above +# LEGACY_TOOLS lets us use the bootstrapped stuff above # TARGET* is so that MK_CLANG gets set correctly. BSTCENV= \ MAKELEVEL=0 \ diff --git a/targets/pseudo/toolchain/Makefile.depend b/targets/pseudo/toolchain/Makefile.depend index 827e3f9..c3af1f1 100644 --- a/targets/pseudo/toolchain/Makefile.depend +++ b/targets/pseudo/toolchain/Makefile.depend @@ -5,44 +5,26 @@ .if !defined(MK_CLANG) .include "${SRCTOP}/share/mk/src.opts.mk" .endif -DIRDEPS= -.if ${MK_TOOLCHAIN} == "yes" -DIRDEPS+= \ +DIRDEPS= \ + gnu/usr.bin/binutils/as \ + gnu/usr.bin/binutils/ld \ usr.bin/addr2line \ - usr.bin/cxxflit \ + usr.bin/ar \ + usr.bin/cxxfilt \ usr.bin/elfcopy \ + usr.bin/elfdump \ usr.bin/nm \ usr.bin/readelf \ usr.bin/size \ - usr.bin/strip \ usr.bin/strings \ - -.else -DIRDEPS+= \ - gnu/usr.bin/binutils/addr2line \ - gnu/usr.bin/binutils/nm \ - gnu/usr.bin/binutils/readelf \ - gnu/usr.bin/binutils/size \ - gnu/usr.bin/binutils/strip \ - gnu/usr.bin/binutils/strings \ - -.endif - -DIRDEPS+= \ + usr.bin/strip \ usr.bin/xinstall \ - gnu/usr.bin/binutils/ar \ - gnu/usr.bin/binutils/as \ - gnu/usr.bin/binutils/ld \ - gnu/usr.bin/binutils/objcopy \ - gnu/usr.bin/binutils/objdump \ - gnu/usr.bin/binutils/ranlib \ - -.if ${MK_CLANG} == "yes" +.if ${MK_CLANG_BOOTSTRAP} == "yes" DIRDEPS+= targets/pseudo/clang .endif -.if ${MK_GCC} == "yes" +.if ${MK_GCC_BOOTSTRAP} == "yes" DIRDEPS+= targets/pseudo/gcc .endif -- cgit v1.1