Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk * If EXTERNAL_TOOLCHAIN is defined, consider it to ...



details:   https://anonhg.NetBSD.org/src/rev/d9a5cbdf37b8
branches:  trunk
changeset: 539818:d9a5cbdf37b8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Nov 26 19:51:16 2002 +0000

description:
* If EXTERNAL_TOOLCHAIN is defined, consider it to be the root of
  where the GNU tools are found, e.g. ${EXTERNAL_TOOLCHAIN}/bin/...
* Allow MACHINE_GNU_PLATFORM to be set in mk.conf.

diffstat:

 share/mk/bsd.own.mk |  25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diffs (54 lines):

diff -r 0a301b13b8a0 -r d9a5cbdf37b8 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Tue Nov 26 19:49:00 2002 +0000
+++ b/share/mk/bsd.own.mk       Tue Nov 26 19:51:16 2002 +0000
@@ -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 @@
 .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 @@
 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} == "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 \



Home | Main Index | Thread Index | Old Index