From 0e229e5357af85c1284fe028bb4904bcec80eee9 Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 27 Dec 2017 21:34:11 +0000 Subject: [PATCH] Better EXTERNAL_TOOLCHAIN support from Zachary McGrew - Allow mdsetimage and dbsym to be built with EXTERNAL_TOOLCHAIN - Allow BFDDIR and IBERTYDIR to be overwritten for mdsetimage and dbsym --- tools/Makefile | 6 ++---- tools/dbsym/Makefile | 6 +++--- tools/mdsetimage/Makefile | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 36506491c169..bf52658ddfdd 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.191 2017/06/07 10:38:33 skrll Exp $ +# $NetBSD: Makefile,v 1.192 2017/12/27 21:34:11 christos Exp $ .include .include @@ -53,9 +53,7 @@ TOOLCHAIN_BITS+= pcc . endif .endif -.if ${TOOLCHAIN_MISSING} == "no" -# XXX Eventually, we want to be able to build dbsym and mdsetimage -# XXX if EXTERNAL_TOOLCHAIN is set. +.if ${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN) TOOLCHAIN_BITS+= dbsym mdsetimage .endif diff --git a/tools/dbsym/Makefile b/tools/dbsym/Makefile index b025c1eb04c9..46a456176835 100644 --- a/tools/dbsym/Makefile +++ b/tools/dbsym/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2017/01/06 20:27:19 christos Exp $ +# $NetBSD: Makefile,v 1.12 2017/12/27 21:34:11 christos Exp $ NOMAN= # defined @@ -9,8 +9,8 @@ HOSTPROGNAME= ${MACHINE_GNU_PLATFORM}-dbsym HOST_SRCDIR= external/gpl3/binutils/usr.sbin/dbsym TOOLCHAINOBJ!= cd ${.CURDIR}/../binutils && ${PRINTOBJDIR} -BFDDIR= ${TOOLCHAINOBJ}/build/bfd -IBERTYDIR= ${TOOLCHAINOBJ}/build/libiberty +BFDDIR?= ${TOOLCHAINOBJ}/build/bfd +IBERTYDIR?= ${TOOLCHAINOBJ}/build/libiberty .include "${.CURDIR}/../Makefile.host" diff --git a/tools/mdsetimage/Makefile b/tools/mdsetimage/Makefile index af17ad4fc516..6f2503d78d65 100644 --- a/tools/mdsetimage/Makefile +++ b/tools/mdsetimage/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2017/01/06 20:27:19 christos Exp $ +# $NetBSD: Makefile,v 1.14 2017/12/27 21:34:12 christos Exp $ NOMAN= # defined @@ -9,8 +9,8 @@ HOSTPROGNAME= ${MACHINE_GNU_PLATFORM}-mdsetimage HOST_SRCDIR= external/gpl3/binutils/usr.sbin/mdsetimage TOOLCHAINOBJ!= cd ${.CURDIR}/../binutils && ${PRINTOBJDIR} -BFDDIR= ${TOOLCHAINOBJ}/build/bfd -IBERTYDIR= ${TOOLCHAINOBJ}/build/libiberty +BFDDIR?= ${TOOLCHAINOBJ}/build/bfd +IBERTYDIR?= ${TOOLCHAINOBJ}/build/libiberty .include "${.CURDIR}/../Makefile.host"