Revamp the libbfd build process. Massive cleanup, enable 64 bit support
on SPARC, and use includes (or dynamically built ones) from dist.
This commit is contained in:
parent
aefeb9110b
commit
4a51dc3df9
@ -1,119 +1,51 @@
|
||||
# $NetBSD: Makefile,v 1.15 1998/08/21 21:12:19 tv Exp $
|
||||
# $NetBSD: Makefile,v 1.16 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
LIB= bfd
|
||||
LIB= bfd
|
||||
|
||||
NOLINT= nolint (XXX should be linted)
|
||||
NOLINT= nolint (GNU source)
|
||||
NOMAN=
|
||||
NOPROFILE=
|
||||
|
||||
TOP= $(.CURDIR)/../..
|
||||
dist= $(TOP)/dist
|
||||
srcdir= $(dist)/bfd
|
||||
SRCS= archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
|
||||
format.c init.c libbfd.c opncls.c reloc.c section.c syms.c \
|
||||
targets.c hash.c linker.c elf.c srec.c binary.c tekhex.c \
|
||||
ihex.c stabs.c stab-syms.c netbsd-core.c \
|
||||
dis-buf.c disassemble.c \
|
||||
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 spaces.c strerror.c \
|
||||
strsignal.c xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c \
|
||||
insque.c vasprintf.c ${BFD_ARCH_SRCS}
|
||||
CPPFLAGS+= -I. -I${.CURDIR} \
|
||||
-I${DIST}/bfd -I${DIST}/opcodes -I${DIST}/include \
|
||||
${BFD_ARCH_DEFS}
|
||||
|
||||
INCSDIR=/usr/include/bfd
|
||||
INCS= ansidecl.h bfd.h libiberty.h
|
||||
DIST= ${.CURDIR}/../../dist
|
||||
|
||||
# COPTS+=-g #XXX
|
||||
CPPFLAGS+= -I.
|
||||
CPPFLAGS+= -I$(.CURDIR)
|
||||
CPPFLAGS+= -I$(dist)/bfd
|
||||
CPPFLAGS+= -I$(dist)/opcodes
|
||||
# ommitted -I$(dist)/libiberty on purpose
|
||||
CPPFLAGS+= -I$(dist)/include
|
||||
INCSDIR= /usr/include/machine/bfd
|
||||
INCS= ansidecl.h bfd.h libiberty.h
|
||||
|
||||
.PATH: $(dist)/bfd
|
||||
.PATH: $(dist)/opcodes
|
||||
.PATH: $(dist)/libiberty
|
||||
DPSRCS+= bfd.h elf32-target.h elf64-target.h targmatch.h
|
||||
CLEANFILES+= bfd.h elf32-target.h elf64-target.h targmatch.h
|
||||
|
||||
.PATH: ${DIST}/bfd ${DIST}/opcodes ${DIST}/libiberty ${DIST}/include
|
||||
|
||||
# XXX temporary change mips -> mipsel
|
||||
.if exists(_${MACHINE_ARCH:S/^mips$/mipsel/}.mk)
|
||||
.include "_${MACHINE_ARCH:S/^mips$/mipsel/}.mk"
|
||||
.endif
|
||||
|
||||
BFD_WORDSIZE?= 32
|
||||
BFD_64BIT_LONG?=0
|
||||
bfd.h: bfd-in2.h bfd-h.sed
|
||||
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.h} >$@
|
||||
|
||||
DPSRCS+= bfd.h
|
||||
CLEANFILES+= bfd.h
|
||||
bfd.h: bfd-in2.h
|
||||
@sed -e 's,@VERSION@,2.8.1,' \
|
||||
-e 's,@wordsize@,${BFD_WORDSIZE},' \
|
||||
-e 's,@BFD_HOST_64BIT_LONG@,${BFD_64BIT_LONG},' \
|
||||
-e 's,@BFD_HOST_64_BIT_DEFINED@,0,' \
|
||||
< $> > $@
|
||||
targmatch.h: config.bfd targmatch.sed
|
||||
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} >$@
|
||||
|
||||
# From $(dist)/bfd: BFD_LIBS, BFD_BACKENDS, BFD_MACHINES, ...
|
||||
# Have to ommit libbfd.c to avoid .c.so rule problem.
|
||||
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 \
|
||||
elf.c srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
|
||||
$(BFD_BACKENDS) $(BFD_MACHINES) netbsd-core.c
|
||||
elf32-target.h: elfxx-target.h
|
||||
sed -e s/NN/32/g < $> > $@
|
||||
|
||||
# From $(dist)/opcodes: BFD_MACHINES, dis*
|
||||
OPCODE_SRCS= $(OPCODE_MACHINES) dis-buf.c disassemble.c
|
||||
elf64-target.h: elfxx-target.h
|
||||
sed -e s/NN/64/g < $> > $@
|
||||
|
||||
# From $(dist)/libiberty: REQUIRED_OFILES, HOST_OFILES
|
||||
IBERTY_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 spaces.c strerror.c strsignal.c \
|
||||
xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c \
|
||||
insque.c vasprintf.c
|
||||
|
||||
SRCS = $(BFD_SRCS) $(OPCODE_SRCS) $(IBERTY_SRCS)
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
CC_o= $(CC) $(CFLAGS) $(CPPFLAGS)
|
||||
CC_so= $(CC) $(CFLAGS) $(CPPFLAGS) $(CPICFLAGS)
|
||||
|
||||
beforedepend ${LIB}: elf32-target.h elf64-target.h
|
||||
|
||||
# Add $(ARCH_DEFS) when compiling these...
|
||||
archures.o: $(dist)/bfd/archures.c
|
||||
$(CC_o) $(ARCH_DEFS) -c $(.IMPSRC)
|
||||
archures.so: $(dist)/bfd/archures.c
|
||||
$(CC_so) $(ARCH_DEFS) -c $(.IMPSRC) -o $@
|
||||
|
||||
# Add $(ARCH_DEFS) when compiling these...
|
||||
disassemble.o: $(dist)/opcodes/disassemble.c
|
||||
$(CC_o) $(ARCH_DEFS) -c $(.IMPSRC)
|
||||
disassemble.so: $(dist)/opcodes/disassemble.c
|
||||
$(CC_so) $(ARCH_DEFS) -c $(.IMPSRC) -o $@
|
||||
|
||||
# Add $(TDEFAULTS) when compiling these...
|
||||
targets.o: $(dist)/bfd/targets.c
|
||||
$(CC_o) $(TDEFAULTS) -c $(.IMPSRC)
|
||||
targets.so: $(dist)/bfd/targets.c
|
||||
$(CC_so) $(TDEFAULTS) -c $(.IMPSRC) -o $@
|
||||
|
||||
# Avoid the unwanted .c.a default rule
|
||||
.NOPATH: libbfd.a
|
||||
|
||||
# Icky generated header files...
|
||||
CLEANFILES+= elf32-target.h elf64-target.h
|
||||
elf32-target.h : $(dist)/bfd/elfxx-target.h
|
||||
-rm -f $@
|
||||
sed -e s/NN/32/g < $(dist)/bfd/elfxx-target.h > $@
|
||||
elf64-target.h : $(dist)/bfd/elfxx-target.h
|
||||
-rm -f $@
|
||||
sed -e s/NN/64/g < $(dist)/bfd/elfxx-target.h > $@
|
||||
|
||||
# Some dependencies, by hand.
|
||||
argv.o : alloca-conf.h
|
||||
${OBJS} : ansidecl.h bfd.h config.h libiberty.h
|
||||
targets.o : targmatch.h
|
||||
|
||||
# Make sure we build elf32-target.h when needed.
|
||||
elf32-gen.o : elf32-target.h
|
||||
elf32-i386.o : elf32-target.h
|
||||
elf32-m68k.o : elf32-target.h
|
||||
elf32-mips.o : elf32-target.h
|
||||
elf32-ppc.o : elf32-target.h
|
||||
elf32-sparc.o : elf32-target.h
|
||||
|
||||
# Make sure we build elf64-target.h when needed.
|
||||
elf64-alpha.o : elf64-target.h
|
||||
elf64-gen.o : elf64-target.h
|
||||
elf64-mips.o : elf64-target.h
|
||||
elf64-sparc.o : elf64-target.h
|
||||
${OBJS}: bfd.h elf32-target.h elf64-target.h
|
||||
targets.o targets.so targets.po: targmatch.h
|
||||
|
@ -1,20 +1,14 @@
|
||||
# $NetBSD: _alpha.mk,v 1.3 1998/08/21 21:11:02 tv Exp $
|
||||
# $NetBSD: _alpha.mk,v 1.4 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-alpha.c
|
||||
BFD_BACKENDS = elf64-alpha.c elf64.c elf.c elflink.c \
|
||||
coff-alpha.c ecoff.c ecofflink.c
|
||||
BFD_ARCH_SRCS= cpu-alpha.c \
|
||||
elf64-alpha.c elf64.c elf.c elflink.c \
|
||||
coff-alpha.c ecoff.c ecofflink.c \
|
||||
alpha-dis.c alpha-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_alpha \
|
||||
-DSELECT_ARCHITECTURES='&bfd_alpha_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=bfd_elf64_alpha_vec \
|
||||
-DSELECT_VECS=' &bfd_elf64_alpha_vec, &ecoffalpha_little_vec ' \
|
||||
-DHAVE_bfd_elf64_alpha_vec \
|
||||
-DHAVE_ecoffalpha_little_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = alpha-dis.c alpha-opc.c
|
||||
|
||||
BFD_WORDSIZE= 64
|
||||
BFD_64BIT_LONG= 1
|
||||
BFD_ARCH_DEFS= -DARCH_alpha \
|
||||
-DSELECT_ARCHITECTURES='&bfd_alpha_arch' \
|
||||
-DDEFAULT_VECTOR=bfd_elf64_alpha_vec \
|
||||
-DSELECT_VECS='&bfd_elf64_alpha_vec, &ecoffalpha_little_vec' \
|
||||
-DHAVE_bfd_elf64_alpha_vec \
|
||||
-DHAVE_ecoffalpha_little_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,15 +1,12 @@
|
||||
# $NetBSD: _arm32.mk,v 1.2 1998/05/19 19:59:58 tv Exp $
|
||||
# $NetBSD: _arm32.mk,v 1.3 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-arm.c
|
||||
BFD_BACKENDS = armnetbsd.c aoutarm32.c
|
||||
BFD_ARCH_SRCS= cpu-arm.c \
|
||||
armnetbsd.c aoutarm32.c \
|
||||
arm-dis.c
|
||||
|
||||
ARCH_DEFS = -DARCH_arm \
|
||||
-DSELECT_ARCHITECTURES='&bfd_arm_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=armnetbsd_vec \
|
||||
-DSELECT_VECS=' &armnetbsd_vec ' \
|
||||
-DHAVE_armnetbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = arm-dis.c
|
||||
BFD_ARCH_DEFS= -DARCH_arm \
|
||||
-DSELECT_ARCHITECTURES='&bfd_arm_arch' \
|
||||
-DDEFAULT_VECTOR=armnetbsd_vec \
|
||||
-DSELECT_VECS='&armnetbsd_vec' \
|
||||
-DHAVE_armnetbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,17 +1,14 @@
|
||||
# $NetBSD: _i386.mk,v 1.3 1998/07/18 01:00:17 thorpej Exp $
|
||||
# $NetBSD: _i386.mk,v 1.4 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-i386.c
|
||||
BFD_BACKENDS = i386netbsd.c aout32.c \
|
||||
elf32-i386.c elf32.c elf.c elflink.c
|
||||
BFD_ARCH_SRCS= cpu-i386.c \
|
||||
i386netbsd.c aout32.c \
|
||||
elf32-i386.c elf32.c elf.c elflink.c \
|
||||
i386-dis.c
|
||||
|
||||
ARCH_DEFS = -DARCH_i386 \
|
||||
-DSELECT_ARCHITECTURES='&bfd_i386_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=i386netbsd_vec \
|
||||
-DSELECT_VECS=' &i386netbsd_vec, &bfd_elf32_i386_vec ' \
|
||||
-DHAVE_i386netbsd_vec \
|
||||
-DHAVE_bfd_elf32_i386_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = i386-dis.c
|
||||
BFD_ARCH_DEFS= -DARCH_i386 \
|
||||
-DSELECT_ARCHITECTURES='&bfd_i386_arch' \
|
||||
-DDEFAULT_VECTOR=i386netbsd_vec \
|
||||
-DSELECT_VECS='&i386netbsd_vec, &bfd_elf32_i386_vec' \
|
||||
-DHAVE_i386netbsd_vec \
|
||||
-DHAVE_bfd_elf32_i386_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,19 +1,16 @@
|
||||
# $NetBSD: _m68k.mk,v 1.3 1998/07/12 18:53:31 thorpej Exp $
|
||||
# $NetBSD: _m68k.mk,v 1.4 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-m68k.c
|
||||
BFD_BACKENDS = m68knetbsd.c m68k4knetbsd.c sunos.c aout32.c \
|
||||
elf32-m68k.c elf32.c elf.c elflink.c
|
||||
BFD_ARCH_SRCS= cpu-m68k.c \
|
||||
m68knetbsd.c m68k4knetbsd.c sunos.c aout32.c \
|
||||
elf32-m68k.c elf32.c elf.c elflink.c \
|
||||
m68k-dis.c m68k-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_m68k \
|
||||
-DSELECT_ARCHITECTURES='&bfd_m68k_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=m68knetbsd_vec \
|
||||
-DSELECT_VECS=' &m68knetbsd_vec, &m68k4knetbsd_vec, &bfd_elf32_m68k_vec, &sunos_big_vec ' \
|
||||
-DHAVE_m68knetbsd_vec \
|
||||
-DHAVE_m68k4knetbsd_vec \
|
||||
-DHAVE_bfd_elf32_m68k_vec \
|
||||
-DHAVE_sunos_big_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = m68k-dis.c m68k-opc.c
|
||||
BFD_ARCH_DEFS= -DARCH_m68k \
|
||||
-DSELECT_ARCHITECTURES='&bfd_m68k_arch'
|
||||
-DDEFAULT_VECTOR=m68knetbsd_vec \
|
||||
-DSELECT_VECS='&m68knetbsd_vec, &m68k4knetbsd_vec, &bfd_elf32_m68k_vec, &sunos_big_vec' \
|
||||
-DHAVE_m68knetbsd_vec \
|
||||
-DHAVE_m68k4knetbsd_vec \
|
||||
-DHAVE_bfd_elf32_m68k_vec \
|
||||
-DHAVE_sunos_big_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,31 +1,21 @@
|
||||
# $NetBSD: _mipseb.mk,v 1.1 1998/07/27 01:03:48 tv Exp $
|
||||
# $NetBSD: _mipseb.mk,v 1.2 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-mips.c
|
||||
BFD_BACKENDS = elf32-mips.c elf32.c elf.c elflink.c ecofflink.c \
|
||||
coff-mips.c ecoff.c
|
||||
BFD_ARCH_SRCS= cpu-mips.c \
|
||||
elf32-mips.c elf32.c elf.c elflink.c ecofflink.c \
|
||||
coff-mips.c ecoff.c \
|
||||
mips-dis.c mips-opc.c mips16-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_mips \
|
||||
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=bfd_elf32_bigmips_vec \
|
||||
-DSELECT_VECS=' &bfd_elf32_littlemips_vec, &bfd_elf32_bigmips_vec, &ecoff_little_vec, &ecoff_big_vec ' \
|
||||
-DHAVE_bfd_elf32_littlemips_vec \
|
||||
-DHAVE_bfd_elf32_bigmips_vec \
|
||||
-DHAVE_ecoff_little_vec \
|
||||
-DHAVE_ecoff_big_vec \
|
||||
-DNETBSD_CORE
|
||||
BFD_ARCH_DEFS= -DARCH_mips \
|
||||
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
|
||||
-DDEFAULT_VECTOR=bfd_elf32_bigmips_vec \
|
||||
-DSELECT_VECS='&bfd_elf32_littlemips_vec, &bfd_elf32_bigmips_vec, &ecoff_little_vec, &ecoff_big_vec' \
|
||||
-DHAVE_bfd_elf32_littlemips_vec \
|
||||
-DHAVE_bfd_elf32_bigmips_vec \
|
||||
-DHAVE_ecoff_little_vec \
|
||||
-DHAVE_ecoff_big_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
# XXX cannot support 64-bit BFD targets with gdb 4.16.
|
||||
# They assume that BFD_ARCH_SIZE is 64, but that causes bfd_vma_addr
|
||||
# to be a 64-bit int. GDB uses bfd_vma_addr for CORE_ADDR, but also
|
||||
# casts CORE_ADDRS to ints, which loses on 32-bit mips hosts.
|
||||
# TDEFAULTS += \
|
||||
# -DHAVE_bfd_elf64_bigmips_vec \
|
||||
# -DHAVE_bfd_elf64_littlemips_vec \
|
||||
# _DSELECT VECS = &bfd_elf64_bigmips_vec, &bfd_elf64_littlemips_vec,
|
||||
#
|
||||
# BFD_BACKENDS += \
|
||||
# elf64-mips.c elf64.c
|
||||
|
||||
OPCODE_MACHINES = mips-dis.c mips-opc.c mips16-opc.c
|
||||
|
@ -1,31 +1,21 @@
|
||||
# $NetBSD: _mipsel.mk,v 1.1 1998/07/27 01:03:48 tv Exp $
|
||||
# $NetBSD: _mipsel.mk,v 1.2 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-mips.c
|
||||
BFD_BACKENDS = elf32-mips.c elf32.c elf.c elflink.c ecofflink.c \
|
||||
coff-mips.c ecoff.c
|
||||
BFD_ARCH_SRCS= cpu-mips.c \
|
||||
elf32-mips.c elf32.c elf.c elflink.c ecofflink.c \
|
||||
coff-mips.c ecoff.c \
|
||||
mips-dis.c mips-opc.c mips16-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_mips \
|
||||
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=bfd_elf32_littlemips_vec \
|
||||
-DSELECT_VECS=' &bfd_elf32_littlemips_vec, &bfd_elf32_bigmips_vec, &ecoff_little_vec, &ecoff_big_vec ' \
|
||||
-DHAVE_bfd_elf32_littlemips_vec \
|
||||
-DHAVE_bfd_elf32_bigmips_vec \
|
||||
-DHAVE_ecoff_little_vec \
|
||||
-DHAVE_ecoff_big_vec \
|
||||
-DNETBSD_CORE
|
||||
BFD_ARCH_DEFS= -DARCH_mips \
|
||||
-DSELECT_ARCHITECTURES='&bfd_mips_arch'
|
||||
-DDEFAULT_VECTOR=bfd_elf32_littlemips_vec \
|
||||
-DSELECT_VECS='&bfd_elf32_littlemips_vec, &bfd_elf32_bigmips_vec, &ecoff_little_vec, &ecoff_big_vec' \
|
||||
-DHAVE_bfd_elf32_littlemips_vec \
|
||||
-DHAVE_bfd_elf32_bigmips_vec \
|
||||
-DHAVE_ecoff_little_vec \
|
||||
-DHAVE_ecoff_big_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
# XXX cannot support 64-bit BFD targets with gdb 4.16.
|
||||
# They assume that BFD_ARCH_SIZE is 64, but that causes bfd_vma_addr
|
||||
# to be a 64-bit int. GDB uses bfd_vma_addr for CORE_ADDR, but also
|
||||
# casts CORE_ADDRS to ints, which loses on 32-bit mips hosts.
|
||||
# TDEFAULTS += \
|
||||
# -DHAVE_bfd_elf64_bigmips_vec \
|
||||
# -DHAVE_bfd_elf64_littlemips_vec \
|
||||
# _DSELECT VECS = &bfd_elf64_bigmips_vec, &bfd_elf64_littlemips_vec,
|
||||
#
|
||||
# BFD_BACKENDS += \
|
||||
# elf64-mips.c elf64.c
|
||||
|
||||
OPCODE_MACHINES = mips-dis.c mips-opc.c mips16-opc.c
|
||||
|
@ -1,15 +1,12 @@
|
||||
# $NetBSD: _ns32k.mk,v 1.3 1997/10/29 03:45:40 phil Exp $
|
||||
# $NetBSD: _ns32k.mk,v 1.4 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_BACKENDS = ns32knetbsd.c aout-ns32k.c
|
||||
BFD_MACHINES = cpu-ns32k.c
|
||||
BFD_ARCH_SRCS= ns32knetbsd.c aout-ns32k.c \
|
||||
cpu-ns32k.c \
|
||||
ns32k-dis.c
|
||||
|
||||
ARCH_DEFS = -DARCH_ns32k \
|
||||
-DSELECT_ARCHITECTURES='&bfd_ns32k_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=pc532netbsd_vec \
|
||||
-DSELECT_VECS=' &pc532netbsd_vec ' \
|
||||
-DHAVE_pc532netbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = ns32k-dis.c
|
||||
BFD_ARCH_DEFS= -DARCH_ns32k \
|
||||
-DSELECT_ARCHITECTURES='&bfd_ns32k_arch' \
|
||||
-DDEFAULT_VECTOR=pc532netbsd_vec \
|
||||
-DSELECT_VECS='&pc532netbsd_vec' \
|
||||
-DHAVE_pc532netbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,16 +1,13 @@
|
||||
# $NetBSD: _powerpc.mk,v 1.2 1997/10/17 20:07:33 gwr Exp $
|
||||
# $NetBSD: _powerpc.mk,v 1.3 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-powerpc.c
|
||||
BFD_BACKENDS = elf32-ppc.c elf32.c elf.c elflink.c
|
||||
BFD_ARCH_SRCS= cpu-powerpc.c \
|
||||
elf32-ppc.c elf32.c elf.c elflink.c \
|
||||
ppc-dis.c ppc-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_powerpc \
|
||||
-DSELECT_ARCHITECTURES='&bfd_powerpc_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=bfd_elf32_powerpc_vec \
|
||||
-DSELECT_VECS=' &bfd_elf32_powerpc_vec, &bfd_elf32_powerpcle_vec ' \
|
||||
-DHAVE_bfd_elf32_powerpc_vec \
|
||||
-DHAVE_bfd_elf32_powerpcle_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = ppc-dis.c ppc-opc.c
|
||||
BFD_ARCH_DEFS= -DARCH_powerpc \
|
||||
-DSELECT_ARCHITECTURES='&bfd_powerpc_arch' \
|
||||
-DDEFAULT_VECTOR=bfd_elf32_powerpc_vec \
|
||||
-DSELECT_VECS='&bfd_elf32_powerpc_vec, &bfd_elf32_powerpcle_vec' \
|
||||
-DHAVE_bfd_elf32_powerpc_vec \
|
||||
-DHAVE_bfd_elf32_powerpcle_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,19 +1,17 @@
|
||||
# $NetBSD: _sparc.mk,v 1.3 1998/07/01 02:12:11 tv Exp $
|
||||
# $NetBSD: _sparc.mk,v 1.4 1998/08/22 19:02:10 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-sparc.c
|
||||
BFD_BACKENDS = sparcnetbsd.c sunos.c aout32.c \
|
||||
elf32-sparc.c elf32.c \
|
||||
elf.c elflink.c
|
||||
BFD_ARCH_SRCS= cpu-sparc.c \
|
||||
sparcnetbsd.c sunos.c aout32.c \
|
||||
elf32-sparc.c elf64-sparc.c elf32.c elf64.c \
|
||||
elf.c elflink.c \
|
||||
sparc-dis.c sparc-opc.c
|
||||
|
||||
ARCH_DEFS = -DARCH_sparc \
|
||||
-DSELECT_ARCHITECTURES='&bfd_sparc_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=sparcnetbsd_vec \
|
||||
-DSELECT_VECS=' &sparcnetbsd_vec, &sunos_big_vec, &bfd_elf32_sparc_vec ' \
|
||||
-DHAVE_sparcnetbsd_vec \
|
||||
-DHAVE_sunos_big_vec \
|
||||
-DHAVE_bfd_elf32_sparc_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = sparc-dis.c sparc-opc.c
|
||||
BFD_ARCH_DEFS= -DARCH_sparc \
|
||||
-DSELECT_ARCHITECTURES='&bfd_sparc_arch' \
|
||||
-DDEFAULT_VECTOR=sparcnetbsd_vec \
|
||||
-DSELECT_VECS='&sparcnetbsd_vec, &sunos_big_vec, &bfd_elf32_sparc_vec, &bfd_elf64_sparc_vec' \
|
||||
-DHAVE_sparcnetbsd_vec \
|
||||
-DHAVE_sunos_big_vec \
|
||||
-DHAVE_bfd_elf32_sparc_vec \
|
||||
-DHAVE_bfd_elf64_sparc_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,15 +1,11 @@
|
||||
# $NetBSD: _vax.mk,v 1.3 1997/10/20 12:44:24 ragge Exp $
|
||||
# $NetBSD: _vax.mk,v 1.4 1998/08/22 19:02:11 tv Exp $
|
||||
|
||||
BFD_MACHINES = cpu-vax.c
|
||||
BFD_BACKENDS = vaxnetbsd.c aout32.c
|
||||
BFD_ARCH_SRCS= cpu-vax.c \
|
||||
vaxnetbsd.c aout32.c
|
||||
|
||||
ARCH_DEFS = -DARCH_vax \
|
||||
-DSELECT_ARCHITECTURES='&bfd_vax_arch'
|
||||
|
||||
TDEFAULTS = \
|
||||
-DDEFAULT_VECTOR=vaxnetbsd_vec \
|
||||
-DSELECT_VECS=' &vaxnetbsd_vec ' \
|
||||
-DHAVE_vaxnetbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
||||
OPCODE_MACHINES = # XXX not yet
|
||||
BFD_ARCH_DEFS= -DARCH_vax \
|
||||
-DSELECT_ARCHITECTURES='&bfd_vax_arch' \
|
||||
-DDEFAULT_VECTOR=vaxnetbsd_vec \
|
||||
-DSELECT_VECS='&vaxnetbsd_vec' \
|
||||
-DHAVE_vaxnetbsd_vec \
|
||||
-DNETBSD_CORE
|
||||
|
@ -1,149 +0,0 @@
|
||||
/* $NetBSD: ansidecl.h,v 1.1.1.1 1997/09/26 02:38:49 gwr Exp $ */
|
||||
|
||||
/* ANSI and traditional C compatability macros
|
||||
Copyright 1991, 1992, 1996 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* ANSI and traditional C compatibility macros
|
||||
|
||||
ANSI C is assumed if __STDC__ is #defined.
|
||||
|
||||
Macro ANSI C definition Traditional C definition
|
||||
----- ---- - ---------- ----------- - ----------
|
||||
PTR `void *' `char *'
|
||||
LONG_DOUBLE `long double' `double'
|
||||
VOLATILE `volatile' `'
|
||||
SIGNED `signed' `'
|
||||
PTRCONST `void *const' `char *'
|
||||
ANSI_PROTOTYPES 1 not defined
|
||||
|
||||
CONST is also defined, but is obsolete. Just use const.
|
||||
|
||||
obsolete -- DEFUN (name, arglist, args)
|
||||
|
||||
Defines function NAME.
|
||||
|
||||
ARGLIST lists the arguments, separated by commas and enclosed in
|
||||
parentheses. ARGLIST becomes the argument list in traditional C.
|
||||
|
||||
ARGS list the arguments with their types. It becomes a prototype in
|
||||
ANSI C, and the type declarations in traditional C. Arguments should
|
||||
be separated with `AND'. For functions with a variable number of
|
||||
arguments, the last thing listed should be `DOTS'.
|
||||
|
||||
obsolete -- DEFUN_VOID (name)
|
||||
|
||||
Defines a function NAME, which takes no arguments.
|
||||
|
||||
obsolete -- EXFUN (name, (prototype)) -- obsolete.
|
||||
|
||||
Replaced by PARAMS. Do not use; will disappear someday soon.
|
||||
Was used in external function declarations.
|
||||
In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
|
||||
parentheses). In traditional C it is `NAME()'.
|
||||
For a function that takes no arguments, PROTOTYPE should be `(void)'.
|
||||
|
||||
obsolete -- PROTO (type, name, (prototype) -- obsolete.
|
||||
|
||||
This one has also been replaced by PARAMS. Do not use.
|
||||
|
||||
PARAMS ((args))
|
||||
|
||||
We could use the EXFUN macro to handle prototype declarations, but
|
||||
the name is misleading and the result is ugly. So we just define a
|
||||
simple macro to handle the parameter lists, as in:
|
||||
|
||||
static int foo PARAMS ((int, char));
|
||||
|
||||
This produces: `static int foo();' or `static int foo (int, char);'
|
||||
|
||||
EXFUN would have done it like this:
|
||||
|
||||
static int EXFUN (foo, (int, char));
|
||||
|
||||
but the function is not external...and it's hard to visually parse
|
||||
the function name out of the mess. EXFUN should be considered
|
||||
obsolete; new code should be written to use PARAMS.
|
||||
|
||||
DOTS is also obsolete.
|
||||
|
||||
Examples:
|
||||
|
||||
extern int printf PARAMS ((const char *format, ...));
|
||||
*/
|
||||
|
||||
#ifndef _ANSIDECL_H
|
||||
#define _ANSIDECL_H 1
|
||||
|
||||
/* Every source file includes this file,
|
||||
so they will all get the switch for lint. */
|
||||
/* LINTLIBRARY */
|
||||
|
||||
#ifdef __STDC__
|
||||
|
||||
#define PTR void *
|
||||
#define PTRCONST void *CONST
|
||||
#define LONG_DOUBLE long double
|
||||
|
||||
#define AND ,
|
||||
#define NOARGS void
|
||||
#define VOLATILE volatile
|
||||
#define SIGNED signed
|
||||
|
||||
#define PARAMS(paramlist) paramlist
|
||||
#define ANSI_PROTOTYPES 1
|
||||
|
||||
#define VPARAMS(ARGS) ARGS
|
||||
#define VA_START(va_list,var) va_start(va_list,var)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#define CONST const
|
||||
#define DOTS , ...
|
||||
#define PROTO(type, name, arglist) type name arglist
|
||||
#define EXFUN(name, proto) name proto
|
||||
#define DEFUN(name, arglist, args) name(args)
|
||||
#define DEFUN_VOID(name) name(void)
|
||||
|
||||
#else /* __STDC__ */
|
||||
|
||||
#define PTR char *
|
||||
#define PTRCONST PTR
|
||||
#define LONG_DOUBLE double
|
||||
|
||||
#define AND ;
|
||||
#define NOARGS
|
||||
#ifndef const /* some systems define it in header files for non-ansi mode */
|
||||
#define const
|
||||
#endif
|
||||
#define VOLATILE
|
||||
#define SIGNED
|
||||
|
||||
#define PARAMS(paramlist) ()
|
||||
|
||||
#define VPARAMS(ARGS) (va_alist) va_dcl
|
||||
#define VA_START(va_list,var) va_start(va_list)
|
||||
|
||||
/* These are obsolete. Do not use. */
|
||||
#define CONST
|
||||
#define DOTS
|
||||
#define PROTO(type, name, arglist) type name ()
|
||||
#define EXFUN(name, proto) name()
|
||||
#define DEFUN(name, arglist, args) name arglist args;
|
||||
#define DEFUN_VOID(name) name()
|
||||
|
||||
#endif /* __STDC__ */
|
||||
#endif /* ansidecl.h */
|
26
gnu/lib/bfd/bfd-h.sed
Normal file
26
gnu/lib/bfd/bfd-h.sed
Normal file
@ -0,0 +1,26 @@
|
||||
# $NetBSD: bfd-h.sed,v 1.1 1998/08/22 19:02:11 tv Exp $
|
||||
# Preparse bfd.h such that it can be used on multiple machines.
|
||||
|
||||
s/@VERSION@/2.8.1/
|
||||
/@wordsize@/{
|
||||
i\
|
||||
#if defined(__alpha__) || defined(__sparc__)\
|
||||
#include <sys/types.h>\
|
||||
#define BFD_ARCH_SIZE 64\
|
||||
#else\
|
||||
#define BFD_ARCH_SIZE 32\
|
||||
#endif
|
||||
d
|
||||
}
|
||||
/@BFD_HOST_64BIT_LONG@/ {
|
||||
i\
|
||||
#if defined(__alpha__)\
|
||||
#define BFD_HOST_64BIT_LONG 1\
|
||||
#else\
|
||||
#define BFD_HOST_64BIT_LONG 1\
|
||||
#endif
|
||||
d
|
||||
}
|
||||
s/@BFD_HOST_64_BIT_DEFINED@/1/
|
||||
s/@BFD_HOST_64_BIT@/int64_t/
|
||||
s/@BFD_HOST_U_64_BIT@/u_int64_t/
|
2703
gnu/lib/bfd/bfd.h
2703
gnu/lib/bfd/bfd.h
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
/* $NetBSD: lib_bfd.c,v 1.1 1998/05/22 03:26:28 tv Exp $ */
|
||||
/* Get around annoying .c.a/.c.so problems with "libbfd.c". */
|
||||
|
||||
#include "libbfd.c"
|
@ -1,142 +0,0 @@
|
||||
/* $NetBSD: libiberty.h,v 1.1.1.1 1997/09/26 02:38:49 gwr Exp $ */
|
||||
|
||||
/* Function declarations for libiberty.
|
||||
Written by Cygnus Support, 1994.
|
||||
|
||||
The libiberty library provides a number of functions which are
|
||||
missing on some operating systems. We do not declare those here,
|
||||
to avoid conflicts with the system header files on operating
|
||||
systems that do support those functions. In this file we only
|
||||
declare those functions which are specific to libiberty. */
|
||||
|
||||
#ifndef LIBIBERTY_H
|
||||
#define LIBIBERTY_H
|
||||
|
||||
#include "ansidecl.h"
|
||||
|
||||
/* Build an argument vector from a string. Allocates memory using
|
||||
malloc. Use freeargv to free the vector. */
|
||||
|
||||
extern char **buildargv PARAMS ((char *));
|
||||
|
||||
/* Free a vector returned by buildargv. */
|
||||
|
||||
extern void freeargv PARAMS ((char **));
|
||||
|
||||
/* Return the last component of a path name. Note that we can't use a
|
||||
prototype here because the parameter is declared inconsistently
|
||||
across different systems, sometimes as "char *" and sometimes as
|
||||
"const char *" */
|
||||
|
||||
extern char *basename PARAMS ((const char *));
|
||||
|
||||
/* Concatenate an arbitrary number of strings, up to (char *) NULL.
|
||||
Allocates memory using xmalloc. */
|
||||
|
||||
extern char *concat PARAMS ((const char *, ...));
|
||||
|
||||
/* Check whether two file descriptors refer to the same file. */
|
||||
|
||||
extern int fdmatch PARAMS ((int fd1, int fd2));
|
||||
|
||||
/* Get the amount of time the process has run, in microseconds. */
|
||||
|
||||
extern long get_run_time PARAMS ((void));
|
||||
|
||||
/* Choose a temporary directory to use for scratch files. */
|
||||
|
||||
extern char *choose_temp_base PARAMS ((void));
|
||||
|
||||
/* Allocate memory filled with spaces. Allocates using malloc. */
|
||||
|
||||
extern const char *spaces PARAMS ((int count));
|
||||
|
||||
/* Return the maximum error number for which strerror will return a
|
||||
string. */
|
||||
|
||||
extern int errno_max PARAMS ((void));
|
||||
|
||||
/* Return the name of an errno value (e.g., strerrno (EINVAL) returns
|
||||
"EINVAL"). */
|
||||
|
||||
extern const char *strerrno PARAMS ((int));
|
||||
|
||||
/* Given the name of an errno value, return the value. */
|
||||
|
||||
extern int strtoerrno PARAMS ((const char *));
|
||||
|
||||
/* ANSI's strerror(), but more robust. */
|
||||
|
||||
extern char *xstrerror PARAMS ((int));
|
||||
|
||||
/* Return the maximum signal number for which strsignal will return a
|
||||
string. */
|
||||
|
||||
extern int signo_max PARAMS ((void));
|
||||
|
||||
/* Return a signal message string for a signal number
|
||||
(e.g., strsignal (SIGHUP) returns something like "Hangup"). */
|
||||
/* This is commented out as it can conflict with one in system headers.
|
||||
We still document its existence though. */
|
||||
|
||||
/*extern const char *strsignal PARAMS ((int));*/
|
||||
|
||||
/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns
|
||||
"SIGHUP"). */
|
||||
|
||||
extern const char *strsigno PARAMS ((int));
|
||||
|
||||
/* Given the name of a signal, return its number. */
|
||||
|
||||
extern int strtosigno PARAMS ((const char *));
|
||||
|
||||
/* Register a function to be run by xexit. Returns 0 on success. */
|
||||
|
||||
extern int xatexit PARAMS ((void (*fn) (void)));
|
||||
|
||||
/* Exit, calling all the functions registered with xatexit. */
|
||||
|
||||
#ifndef __GNUC__
|
||||
extern void xexit PARAMS ((int status));
|
||||
#else
|
||||
typedef void libiberty_voidfn PARAMS ((int status));
|
||||
__volatile__ libiberty_voidfn xexit;
|
||||
#endif
|
||||
|
||||
/* Set the program name used by xmalloc. */
|
||||
|
||||
extern void xmalloc_set_program_name PARAMS ((const char *));
|
||||
|
||||
/* Allocate memory without fail. If malloc fails, this will print a
|
||||
message to stderr (using the name set by xmalloc_set_program_name,
|
||||
if any) and then call xexit. */
|
||||
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
/* Get a definition for size_t. */
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
extern PTR xmalloc PARAMS ((size_t));
|
||||
|
||||
/* Reallocate memory without fail. This works like xmalloc.
|
||||
|
||||
FIXME: We do not declare the parameter types for the same reason as
|
||||
xmalloc. */
|
||||
|
||||
extern PTR xrealloc PARAMS ((PTR, size_t));
|
||||
|
||||
/* Copy a string into a memory buffer without fail. */
|
||||
|
||||
extern char *xstrdup PARAMS ((const char *));
|
||||
|
||||
/* hex character manipulation routines */
|
||||
|
||||
#define _hex_array_size 256
|
||||
#define _hex_bad 99
|
||||
extern char _hex_value[_hex_array_size];
|
||||
extern void hex_init PARAMS ((void));
|
||||
#define hex_p(c) (hex_value (c) != _hex_bad)
|
||||
/* If you change this, note well: Some code relies on side effects in
|
||||
the argument being performed exactly once. */
|
||||
#define hex_value(c) (_hex_value[(unsigned char) (c)])
|
||||
|
||||
#endif /* ! defined (LIBIBERTY_H) */
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user