diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index ff70f216a00e..564bd3fe49a1 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.317 2002/11/26 19:30:13 thorpej Exp $ +# $NetBSD: bsd.own.mk,v 1.318 2002/11/26 19:51:16 thorpej Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -108,6 +108,24 @@ TOOLDIR:= ${_TOOLOBJ}/tools.${HOST_OSTYPE} .MAKEOVERRIDES+= TOOLDIR .endif +# If an external toolchain base is specified, use it. +.if defined(EXTERNAL_TOOLCHAIN) +AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar +AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as +LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld +NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm +OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy +OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump +RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib +SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size +STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip + +CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc +CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp +CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ +FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 +OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc +.else # Define default locations for common tools. .if ${USETOOLS_BINUTILS:Uyes} == "yes" AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar @@ -128,6 +146,7 @@ CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc .endif +.endif # EXTERNAL_TOOLCHAIN ASN1_COMPILE= ${TOOLDIR}/bin/nbasn1_compile CAP_MKDB= ${TOOLDIR}/bin/nbcap_mkdb @@ -382,9 +401,9 @@ MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} ${MACHINE_GNU_ARCH} == "sh5le" || \ ${MACHINE_ARCH} == "sparc" || \ ${MACHINE_ARCH} == "vax") -MACHINE_GNU_PLATFORM=${MACHINE_GNU_ARCH}--netbsdelf +MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf .else -MACHINE_GNU_PLATFORM=${MACHINE_GNU_ARCH}--netbsd +MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd .endif TARGETS+= all clean cleandir depend dependall includes \