Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split ...
details: https://anonhg.NetBSD.org/src/rev/a5894270bd7c
branches: trunk
changeset: 536516:a5894270bd7c
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Sep 17 23:18:25 2002 +0000
description:
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
diffstat:
Makefile | 11 +-
gnu/lib/Makefile | 23 +---
gnu/lib/libbfd/Makefile | 225 +------------------------------------
gnu/lib/libg2c/Makefile | 149 +------------------------
gnu/lib/libgcc/Makefile | 84 +-------------
gnu/lib/libiberty/Makefile | 9 +-
gnu/lib/libobjc/Makefile | 62 +----------
gnu/lib/libstdc++/Makefile | 85 +-------------
gnu/lib/libstdc++/config/Makefile | 27 +----
gnu/lib/libstdc++/include/Makefile | 6 +-
gnu/lib/libstdc++/io/Makefile | 18 +--
gnu/usr.bin/gcc/Makefile | 5 +-
gnu/usr.bin/sim/Makefile | 6 +-
gnu/usr.sbin/dbsym/Makefile | 8 +-
gnu/usr.sbin/mdsetimage/Makefile | 8 +-
share/mk/bsd.README | 41 +++++-
share/mk/bsd.hostlib.mk | 4 +-
share/mk/bsd.hostprog.mk | 4 +-
share/mk/bsd.own.mk | 82 ++++++------
tools/Makefile | 9 +-
usr.bin/crunch/crunchgen/Makefile | 13 +-
usr.sbin/Makefile | 4 +-
22 files changed, 125 insertions(+), 758 deletions(-)
diffs (truncated from 1311 to 300 lines):
diff -r 476b1eb2914c -r a5894270bd7c Makefile
--- a/Makefile Tue Sep 17 21:37:13 2002 +0000
+++ b/Makefile Tue Sep 17 23:18:25 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.186 2002/09/14 16:46:24 thorpej Exp $
+# $NetBSD: Makefile,v 1.187 2002/09/17 23:18:25 thorpej Exp $
# This is the top-level makefile for building NetBSD. For an outline of
# how to build a snapshot or release, as well as other release engineering
@@ -184,10 +184,11 @@
# Special components of the "make build" process.
check-tools:
-.if defined(USE_NEW_TOOLCHAIN) && (${USE_NEW_TOOLCHAIN} != "nowarn")
- @echo '*** WARNING: Building on MACHINE=${MACHINE} with USE_NEW_TOOLCHAIN.'
- @echo '*** This platform is not yet verified to work with the new toolchain,'
- @echo '*** and may result in a failed build or corrupt binaries!'
+.if ${TOOLCHAIN_MISSING} == "yes" && !defined(EXTERNAL_TOOLCHAIN)
+ @echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.'
+ @echo '*** May result in a failed build or corrupt binaries!'
+.elif defined(EXTERNAL_TOOLCHAIN)
+ @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.'
.endif
.if defined(NBUILDJOBS)
@echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!'
diff -r 476b1eb2914c -r a5894270bd7c gnu/lib/Makefile
--- a/gnu/lib/Makefile Tue Sep 17 21:37:13 2002 +0000
+++ b/gnu/lib/Makefile Tue Sep 17 23:18:25 2002 +0000
@@ -1,9 +1,7 @@
-# $NetBSD: Makefile,v 1.29 2001/12/31 23:04:12 thorpej Exp $
+# $NetBSD: Makefile,v 1.30 2002/09/17 23:18:32 thorpej Exp $
.include <bsd.own.mk>
-.if defined(USE_NEW_TOOLCHAIN)
-
.if ${MKBFD} != "no"
SUBDIR+= libbfd libiberty
.endif
@@ -14,23 +12,4 @@
SUBDIR+= libmalloc
-.else
-#
-# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
-#
-HAVE_GCC29!= ${CXX} --version | egrep "^(2\.9)" ; echo
-
-SUBDIR+= libbfd libmalloc
-
-.if empty(HAVE_GCC29) || make (obj) || make(cleandir) || make(clean)
-SUBDIR+= libg2c libgcc libobjc
-.if (${MACHINE_ARCH} != "sparc64") && (${MACHINE_ARCH} != "arm")
-SUBDIR+= libstdc++
-.endif
-.endif
-#
-# XXX - END - Old toolchain build goop - delete when everything migrated - XXX
-#
-.endif
-
.include <bsd.subdir.mk>
diff -r 476b1eb2914c -r a5894270bd7c gnu/lib/libbfd/Makefile
--- a/gnu/lib/libbfd/Makefile Tue Sep 17 21:37:13 2002 +0000
+++ b/gnu/lib/libbfd/Makefile Tue Sep 17 23:18:25 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2002/08/19 15:01:34 lukem Exp $
+# $NetBSD: Makefile,v 1.31 2002/09/17 23:18:32 thorpej Exp $
NOLINKLIB= # defined
NOLINT= # defined
@@ -9,8 +9,6 @@
LIB= bfd
-.if defined(USE_NEW_TOOLCHAIN)
-
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
.include "${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk"
@@ -46,227 +44,6 @@
.include <bsd.prog.mk> # do nothing
.endif
-.else
-#
-# XXX - BEGIN - Old toolchain build goop - delete when everything migrated - XXX
-#
-
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 0
-
-.if (${OBJECT_FMT} == "ELF") || defined(BOOTSTRAP_ELF)
-ELF_PLEASE=
-.endif
-
-# XXX BFD_UNIFIED should go away if benchmarking shows minor to no difference
-.if ${MKPIC} == "no" || !defined(BFD_UNIFIED)
-BFD_SLIM=
-.endif
-
-.if (${MACHINE_ARCH} == "alpha") || \
- (${MACHINE_ARCH} == "sparc64")
-BFD64=
-CPPFLAGS += -DBFD_TARG_64
-.endif
-
-DIST= ${NETBSDSRCDIR}/gnu/dist
-
-# generic bfd
-SRCS= archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
- format.c init.c lib_bfd.c opncls.c reloc.c section.c syms.c \
- targets.c hash.c linker.c srec.c binary.c tekhex.c \
- ihex.c stabs.c stab-syms.c netbsd-core.c \
- dis-buf.c disassemble.c
-
-# libiberty (yuck.)
-SRCS+= argv.c basename.c choose-temp.c concat.c cplus-dem.c \
- fdmatch.c fnmatch.c getopt.c getopt1.c getruntime.c hex.c \
- floatformat.c objalloc.c obstack.c pexecute.c spaces.c \
- strerror.c strsignal.c xatexit.c xexit.c xmalloc.c xstrdup.c \
- xstrerror.c insque.c
-
-CPPFLAGS+= -DHAVE_CONFIG_H -I. -I${.CURDIR} \
- -I${DIST}/bfd -I${DIST}/opcodes -I${DIST}/include \
- ${ARCHES:S/^/-DARCH_/} ${SELECT_VECS:S/^/-DHAVE_/} \
- -DSELECT_ARCHITECTURES="${ARCHES:S/^/,\&bfd_/:S/$/_arch/:S/^,//1}" \
- -DDEFAULT_VECTOR=${DEFAULT_VEC.${MACHINE_ARCH}} \
- -DSELECT_VECS="${SELECT_VECS:S/^/,\&/:S/^,//1}"
-
-DPSRCS+= bfd.h elf32-target.h elf64-target.h targmatch.h \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
-CLEANFILES+= bfd.h elf32-target.h elf64-target.h targmatch.h \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
-
-TEXINFO= bfd.texinfo
-INFOFLAGS= -I${DIST}/bfd/doc
-SELECT_VECS= netbsd_core_vec
-
-.PATH: ${DIST}/bfd ${DIST}/opcodes ${DIST}/libiberty ${DIST}/include \
- ${DIST}/bfd/doc
-
-bfd.h: bfd-in2.h bfd-h.sed
- sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.h} >$@
-
-##### alpha #####
-
-.if defined(BFD64) && (${MACHINE_ARCH} == "alpha" || !defined(BFD_SLIM))
-ARCHES+= alpha
-DEFAULT_VEC.alpha= bfd_elf64_alpha_vec
-SELECT_VECS+= ${DEFAULT_VEC.alpha} ecoffalpha_little_vec
-SRCS+= cpu-alpha.c elf64-alpha.c coff-alpha.c \
- alpha-dis.c alpha-opc.c ecoff.c ecofflink.c \
- elf64.c elf.c elflink.c dwarf2.c
-.endif
-
-##### arm32 #####
-
-.if (${MACHINE_ARCH} == "arm32" || !defined(BFD_SLIM))
-ARCHES+= arm
-DEFAULT_VEC.arm32= armnetbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.arm32}
-SRCS+= cpu-arm.c aout-arm32.c armnetbsd.c arm-dis.c
-.endif
-
-##### i386 #####
-
-.if (${MACHINE_ARCH} == "i386" || !defined(BFD_SLIM))
-ARCHES+= i386
-.if defined(ELF_PLEASE)
-DEFAULT_VEC.i386= bfd_elf32_i386_vec
-SELECT_VECS+= ${DEFAULT_VEC.i386} i386netbsd_vec i386bsd_vec \
- i386freebsd_vec i386coff_vec
-.else
-DEFAULT_VEC.i386= i386netbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.i386} bfd_elf32_i386_vec i386bsd_vec \
- i386freebsd_vec i386coff_vec
-.endif
-SRCS+= cpu-i386.c i386bsd.c i386freebsd.c i386netbsd.c \
- coff-i386.c elf32-i386.c i386-dis.c \
- aout32.c cofflink.c elf32.c elf.c elflink.c dwarf2.c \
- netbsdaout.c
-.endif
-
-##### m68k #####
-
-.if (${MACHINE_ARCH} == "m68k" || !defined(BFD_SLIM))
-ARCHES+= m68k
-.if defined(ELF_PLEASE)
-DEFAULT_VEC.m68k= bfd_elf32_m68k_vec
-SELECT_VECS+= ${DEFAULT_VEC.m68k} m68knetbsd_vec \
- m68k4knetbsd_vec sunos_big_vec
-.else
-DEFAULT_VEC.m68k= m68knetbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.m68k} m68k4knetbsd_vec \
- bfd_elf32_m68k_vec sunos_big_vec
-.endif
-SRCS+= cpu-m68k.c m68knetbsd.c m68k4knetbsd.c sunos.c \
- elf32-m68k.c m68k-dis.c m68k-opc.c \
- aout32.c elf32.c elf.c elflink.c dwarf2.c
-.endif
-
-##### mipse[bl] #####
-
-.if (${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
- !defined(BFD_SLIM))
-ARCHES+= mips
-DEFAULT_VEC.mipseb= bfd_elf32_bigmips_vec
-DEFAULT_VEC.mipsel= bfd_elf32_littlemips_vec
-SELECT_VECS+= ${DEFAULT_VEC.mipseb} ${DEFAULT_VEC.mipsel} \
- ecoff_big_vec ecoff_little_vec # mipselnetbsd_vec
-SRCS+= cpu-mips.c elf32-mips.c coff-mips.c \
- mips-dis.c mips-opc.c mips16-opc.c \
- ecoff.c ecofflink.c elf32.c elf.c elflink.c dwarf2.c
-# mipselnetbsd.c aout32.c
-.endif
-
-##### ns32k #####
-
-.if (${MACHINE_ARCH} == "ns32k" || !defined(BFD_SLIM))
-ARCHES+= ns32k
-DEFAULT_VEC.ns32k= pc532netbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.ns32k}
-SRCS+= ns32knetbsd.c aout-ns32k.c cpu-ns32k.c ns32k-dis.c
-.endif
-
-##### powerpc #####
-
-.if (${MACHINE_ARCH} == "powerpc" || !defined(BFD_SLIM))
-ARCHES+= powerpc
-DEFAULT_VEC.powerpc= bfd_elf32_powerpc_vec
-SELECT_VECS+= ${DEFAULT_VEC.powerpc} bfd_elf32_powerpcle_vec \
- rs6000coff_vec
-SRCS+= cpu-powerpc.c elf32-ppc.c ppc-dis.c ppc-opc.c \
- elf32.c elf.c elflink.c dwarf2.c coff-rs6000.c \
- xcofflink.c
-.endif
-
-##### sh3 #####
-
-.if (${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el" || !defined(BFD_SLIM))
-ARCHES+= sh
-.if defined(ELF_PLEASE)
-DEFAULT_VEC.sh3eb= bfd_elf32_shunx_vec
-DEFAULT_VEC.sh3el= bfd_elf32_shunx_vec
-SELECT_VECS+= ${DEFAULT_VEC.sh3eb} ${DEFAULT_VEC.sh3el} \
- bfd_elf32_shlunx_vec shcoff_vec shlcoff_vec
-.else
-DEFAULT_VEC.sh3el= shcoff_vec
-DEFAULT_VEC.sh3eb= shcoff_vec
-SELECT_VECS+= ${DEFAULT_VEC.sh3eb} ${DEFAULT_VEC.sh3el} shlcoff_vec \
- bfd_elf32_shunx_vec bfd_elf32_shlunx_vec
-.endif
-SRCS+= cpu-sh.c sh-dis.c \
- elf32-shunx.c elf32-sh.c elf32.c elf.c elflink.c \
- coff-sh.c cofflink.c coffgen.c dwarf2.c
-.endif
-
-##### sparc #####
-
-.if (${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" || \
- !defined(BFD_SLIM))
-ARCHES+= sparc
-.if (${MACHINE_ARCH} == "sparc") && defined(ELF_PLEASE)
-DEFAULT_VEC.sparc= bfd_elf32_sparc_vec
-SELECT_VECS+= ${DEFAULT_VEC.sparc} ${DEFAULT_VEC.sparc64} \
- sunos_big_vec sparcnetbsd_vec
-.else
-DEFAULT_VEC.sparc= sparcnetbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.sparc} ${DEFAULT_VEC.sparc64} \
- sunos_big_vec bfd_elf32_sparc_vec
-.endif
-SRCS+= cpu-sparc.c sparcnetbsd.c sunos.c elf32-sparc.c \
- sparc-dis.c sparc-opc.c \
- aout32.c elf32.c elf.c elflink.c dwarf2.c
-.if defined(BFD64)
-DEFAULT_VEC.sparc64= bfd_elf64_sparc_vec
-SRCS+= elf64-sparc.c elf64.c
-.endif
-.endif
-
-##### vax #####
-
-.if (${MACHINE_ARCH} == "vax" || !defined(BFD_SLIM))
-ARCHES+= vax
-DEFAULT_VEC.vax= vaxnetbsd_vec
-SELECT_VECS+= ${DEFAULT_VEC.vax} vaxcoff_vec
-SRCS+= cpu-vax.c vaxnetbsd.c vax-dis.c aout32.c coff-vax.c
-.endif
-
-# uniq-ify SRCS and SELECT_VECS
-
-SRCS != (for i in ${SRCS}; do echo $$i; done) | sort | uniq
-SELECT_VECS != (for i in ${SELECT_VECS}; do echo $$i; done) | sort | uniq
-
-.include <bsd.info.mk>
-.include <bsd.lib.mk>
-
-${OBJS} ${SOBJS}: bfd.h elf32-target.h elf64-target.h
Home |
Main Index |
Thread Index |
Old Index