diff options
| author | thorpej <thorpej@NetBSD.org> | 1999-03-17 00:46:35 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 1999-03-17 00:46:35 +0000 |
| commit | 6d2943920a9e68393e57643feb8343689d44e42e (patch) | |
| tree | cea65e300092ec570f8ff5f4b8a39e456ab2819c /gnu/lib/libbfd | |
| parent | 84c33581dfe96b119bf1d6ee123e9cdfadfee25c (diff) | |
Make it a tad bit easier to bootstrap an a.out system to ELF. Introduce
a BOOTSTRAP_ELF Makefile variable that, when set (e.g. in the environment),
builds a targeted-to-ELF toolchain without requiring OBJECT_FMT to be set
to "ELF" (which affects how e.g. libraries are built).
This basically means you don't need fake crtbegin.o and crtend.o files to
be present in /usr/lib while bootstrapping the toolchain.
Diffstat (limited to 'gnu/lib/libbfd')
| -rw-r--r-- | gnu/lib/libbfd/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gnu/lib/libbfd/Makefile b/gnu/lib/libbfd/Makefile index 666ac1d6c25..53be735f2aa 100644 --- a/gnu/lib/libbfd/Makefile +++ b/gnu/lib/libbfd/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 1999/03/07 10:43:59 ragge Exp $ +# $NetBSD: Makefile,v 1.9 1999/03/17 00:46:35 thorpej Exp $ LIB= bfd @@ -7,9 +7,13 @@ MKMAN= no MKPROFILE= no MKLINKLIB= no -# for MKPIC, BFD_SLIM, BFD_UNIFIED +# for MKPIC, BFD_SLIM, BFD_UNIFIED, OBJECT_FMT .include <bsd.own.mk> +.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= @@ -89,9 +93,15 @@ SRCS+= cpu-arm.c aout-arm32.c armnetbsd.c arm-dis.c .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 @@ -148,9 +158,15 @@ SRCS+= cpu-powerpc.c elf32-ppc.c ppc-dis.c ppc-opc.c \ .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 |
