Add bmakefiles for building binutils from the contrib tree.

This finishes up the binutils import.  But I am leaving it disabled
in "src/gnu/usr.bin/Makefile" for now.  It is not used by anything
yet, so I'll take this opportunity to run one more round of tests
before enabling it.
This commit is contained in:
John Polstra 1998-03-01 23:41:17 +00:00
parent 12df71b07c
commit 2e280533a1
46 changed files with 3704 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#
# $Id$
#
# Omitted for now: c++filt.
SUBDIR= libiberty libbfd libopcodes libbinutils \
i386-elf i386-aout \
addr2line ar nm objcopy objdump ranlib \
size strings strip
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
#
# $Id$
#
BINDIR?= /usr/bin

View File

@ -0,0 +1,30 @@
#
# $Id$
#
#
# This is included explicitly at the top of each sub-Makefile. We can't
# use the normal "Makefile.inc" mechanism, because we need some of these
# definitions before the sub-Makefile is processed.
#
VERSION= 2.8.1
# RELTOP is the relative path to this point in the source or object
# tree, from any subdirectory of same. It gets extra "../" prefixes
# added to it as we descend into subdirectories.
RELTOP:= ..
RELSRC= ${RELTOP}/../../../contrib/binutils
SRCDIR= ${.CURDIR}/${RELSRC}
HOST= i386-unknown-freebsdelf
TARGET= i386-unknown-freebsdelf
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -DARCH_i386
# We use "-I-" because without it our yacc-generated parser tries to
# use GNU's bison-generated header files.
CFLAGS+= -I- -I. -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd
CFLAGS+= -I${SRCDIR}/include

View File

@ -0,0 +1,17 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= addr2line
SRCS= addr2line.c
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= ar
SRCS= ar.c not-ranlib.c
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/libiberty
PROG= c++filt
SRCS= cplus-dem.c underscore.c
NOMAN= true
CFLAGS+= -DMAIN
CFLAGS+= -DVERSION=\"${VERSION}\"
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1 @@
int prepends_underscore = 0;

View File

@ -0,0 +1,9 @@
#
# $Id$
#
.include "../Makefile.inc0"
SUBDIR= as
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
#
# $Id$
#
BINDIR?= /usr/libexec/aout

View File

@ -0,0 +1,7 @@
#
# $Id$
#
.include "../Makefile.inc0"
RELTOP:= ../${RELTOP}

View File

@ -0,0 +1,23 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
PROG= as
MAN1= doc/as.1
SRCS= app.c as.c atof-generic.c atof-ieee.c bignum-copy.c \
cond.c ecoff.c expr.c flonum-copy.c flonum-konst.c \
flonum-mult.c frags.c hash.c input-file.c \
input-scrub.c listing.c literal.c macro.c messages.c \
obj-aout.c output-file.c read.c sb.c stabs.c \
subsegs.c symbols.c tc-i386.c write.c
CFLAGS+= -I${SRCDIR}/gas
CFLAGS+= -I${SRCDIR}/gas/config
CFLAGS+= -I${SRCDIR}
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,133 @@
/* config.h. Generated automatically by make. */
#ifndef GAS_VERSION
#define GAS_VERSION "2.8.1"
/* conf. Generated automatically by configure. */
/* conf.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* #undef HAVE_ALLOCA_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Should gas use high-level BFD interfaces? */
#define BFD_ASSEMBLER 1
/* Some assert/preprocessor combinations are incapable of handling
certain kinds of constructs in the argument of assert. For example,
quoted strings (if requoting isn't done right) or newlines. */
/* #undef BROKEN_ASSERT */
/* If we aren't doing cross-assembling, some operations can be optimized,
since byte orders and value sizes don't need to be adjusted. */
/* #undef CROSS_COMPILE */
/* Some gas code wants to know these parameters. */
#define TARGET_ALIAS "i386-unknown-freebsd"
#define TARGET_CPU "i386"
#define TARGET_CANONICAL "i386-unknown-freebsd"
#define TARGET_OS "freebsd"
#define TARGET_VENDOR "unknown"
/* Sometimes the system header files don't declare strstr. */
/* #undef NEED_DECLARATION_STRSTR */
/* Sometimes the system header files don't declare malloc and realloc. */
/* #undef NEED_DECLARATION_MALLOC */
/* Sometimes the system header files don't declare free. */
/* #undef NEED_DECLARATION_FREE */
/* Sometimes the system header files don't declare sbrk. */
/* #undef NEED_DECLARATION_SBRK */
/* Sometimes errno.h doesn't declare errno itself. */
/* #undef NEED_DECLARATION_ERRNO */
/* #undef MANY_SEGMENTS */
/* Needed only for sparc configuration. */
/* #undef SPARC_V9 */
/* #undef SPARC_ARCH64 */
/* Defined if using CGEN. */
/* #undef USING_CGEN */
/* Needed only for some configurations that can produce multiple output
formats. */
#define DEFAULT_EMULATION ""
#define EMULATIONS
/* #undef USE_EMULATIONS */
/* #undef OBJ_MAYBE_AOUT */
/* #undef OBJ_MAYBE_BOUT */
/* #undef OBJ_MAYBE_COFF */
/* #undef OBJ_MAYBE_ECOFF */
/* #undef OBJ_MAYBE_ELF */
/* #undef OBJ_MAYBE_GENERIC */
/* #undef OBJ_MAYBE_HP300 */
/* #undef OBJ_MAYBE_IEEE */
/* #undef OBJ_MAYBE_SOM */
/* #undef OBJ_MAYBE_VMS */
/* Used for some of the COFF configurations, when the COFF code needs
to select something based on the CPU type before it knows it... */
/* #undef I386COFF */
/* #undef M68KCOFF */
/* #undef M88KCOFF */
/* Define if you have the remove function. */
/* #undef HAVE_REMOVE */
/* Define if you have the sbrk function. */
#define HAVE_SBRK 1
/* Define if you have the unlink function. */
#define HAVE_UNLINK 1
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <varargs.h> header file. */
#define HAVE_VARARGS_H 1
#endif /* GAS_VERSION */

View File

@ -0,0 +1 @@
#include "itbl-i386.h"

View File

@ -0,0 +1 @@
#include "obj-aout.h"

View File

@ -0,0 +1 @@
#include "tc-i386.h"

View File

@ -0,0 +1 @@
#include "te-freebsd.h"

View File

@ -0,0 +1,9 @@
#
# $Id$
#
.include "../Makefile.inc0"
SUBDIR= as ld
.include <bsd.subdir.mk>

View File

@ -0,0 +1,5 @@
#
# $Id$
#
BINDIR?= /usr/libexec/elf

View File

@ -0,0 +1,7 @@
#
# $Id$
#
.include "../Makefile.inc0"
RELTOP:= ../${RELTOP}

View File

@ -0,0 +1,23 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
PROG= as
MAN1= doc/as.1
SRCS= app.c as.c atof-generic.c atof-ieee.c bignum-copy.c \
cond.c ecoff.c expr.c flonum-copy.c flonum-konst.c \
flonum-mult.c frags.c hash.c input-file.c \
input-scrub.c listing.c literal.c macro.c messages.c \
obj-elf.c output-file.c read.c sb.c stabs.c \
subsegs.c symbols.c tc-i386.c write.c
CFLAGS+= -I${SRCDIR}/gas
CFLAGS+= -I${SRCDIR}/gas/config
CFLAGS+= -I${SRCDIR}
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,133 @@
/* config.h. Generated automatically by make. */
#ifndef GAS_VERSION
#define GAS_VERSION "2.8.1"
/* conf. Generated automatically by configure. */
/* conf.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* #undef HAVE_ALLOCA_H */
/* Define as __inline if that's what the C compiler calls it. */
/* #undef inline */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Should gas use high-level BFD interfaces? */
#define BFD_ASSEMBLER 1
/* Some assert/preprocessor combinations are incapable of handling
certain kinds of constructs in the argument of assert. For example,
quoted strings (if requoting isn't done right) or newlines. */
/* #undef BROKEN_ASSERT */
/* If we aren't doing cross-assembling, some operations can be optimized,
since byte orders and value sizes don't need to be adjusted. */
/* #undef CROSS_COMPILE */
/* Some gas code wants to know these parameters. */
#define TARGET_ALIAS "i386-unknown-freebsdelf"
#define TARGET_CPU "i386"
#define TARGET_CANONICAL "i386-unknown-freebsdelf"
#define TARGET_OS "freebsdelf"
#define TARGET_VENDOR "unknown"
/* Sometimes the system header files don't declare strstr. */
/* #undef NEED_DECLARATION_STRSTR */
/* Sometimes the system header files don't declare malloc and realloc. */
/* #undef NEED_DECLARATION_MALLOC */
/* Sometimes the system header files don't declare free. */
/* #undef NEED_DECLARATION_FREE */
/* Sometimes the system header files don't declare sbrk. */
/* #undef NEED_DECLARATION_SBRK */
/* Sometimes errno.h doesn't declare errno itself. */
/* #undef NEED_DECLARATION_ERRNO */
/* #undef MANY_SEGMENTS */
/* Needed only for sparc configuration. */
/* #undef SPARC_V9 */
/* #undef SPARC_ARCH64 */
/* Defined if using CGEN. */
/* #undef USING_CGEN */
/* Needed only for some configurations that can produce multiple output
formats. */
#define DEFAULT_EMULATION ""
#define EMULATIONS
/* #undef USE_EMULATIONS */
/* #undef OBJ_MAYBE_AOUT */
/* #undef OBJ_MAYBE_BOUT */
/* #undef OBJ_MAYBE_COFF */
/* #undef OBJ_MAYBE_ECOFF */
/* #undef OBJ_MAYBE_ELF */
/* #undef OBJ_MAYBE_GENERIC */
/* #undef OBJ_MAYBE_HP300 */
/* #undef OBJ_MAYBE_IEEE */
/* #undef OBJ_MAYBE_SOM */
/* #undef OBJ_MAYBE_VMS */
/* Used for some of the COFF configurations, when the COFF code needs
to select something based on the CPU type before it knows it... */
/* #undef I386COFF */
/* #undef M68KCOFF */
/* #undef M88KCOFF */
/* Define if you have the remove function. */
/* #undef HAVE_REMOVE */
/* Define if you have the sbrk function. */
#define HAVE_SBRK 1
/* Define if you have the unlink function. */
#define HAVE_UNLINK 1
/* Define if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1
/* Define if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define if you have the <varargs.h> header file. */
#define HAVE_VARARGS_H 1
#endif /* GAS_VERSION */

View File

@ -0,0 +1 @@
#include "itbl-i386.h"

View File

@ -0,0 +1 @@
#include "obj-elf.h"

View File

@ -0,0 +1 @@
#include "tc-i386.h"

View File

@ -0,0 +1 @@
#include "te-freebsd.h"

View File

@ -0,0 +1,51 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/ld
EMULATION= elf_i386
LDSCRIPTS= elf_i386.x elf_i386.xbn elf_i386.xn elf_i386.xr \
elf_i386.xs elf_i386.xu i386freebsd.x i386freebsd.xbn \
i386freebsd.xn i386freebsd.xr i386freebsd.xu
PROG= ld
BINDIR= /usr/libexec/elf
SCRIPTDIR= /usr/libdata/ldscripts
SRCS= ldgram.c eelf_i386.c ei386freebsd.c ldcref.c \
ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldlex.l ldmain.c ldmisc.c ldver.c ldwrite.c \
lexsup.c mri.c
CFLAGS+= -DDEFAULT_EMULATION=\"${EMULATION}\"
CFLAGS+= -DSCRIPTDIR=\"${DESTDIR}/usr/libdata\"
CFLAGS+= -DTARGET=\"${TARGET}\"
CFLAGS+= -I${SRCDIR}/ld
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
CLEANFILES+= eelf_i386.c ei386freebsd.c ldgram.c ldgram.h ldlex.c
CLEANDIRS+= ldscripts
beforedepend: eelf_i386.c ei386freebsd.c ldgram.c ldgram.h ldlex.c
eelf_i386.c: emulparams/elf_i386.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
${HOST} ${TARGET} ${TARGET} ${EMULATION} "" \
${EMULATION} ${TARGET}
ei386freebsd.c: emulparams/elf_i386.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
${HOST} ${TARGET} ${TARGET} ${EMULATION} "" \
i386freebsd i386-unknown-freebsd
ldgram.c ldgram.h: ldgram.y
${YACC} ${YFLAGS} -o ${.TARGET:S/.h$/.c/} ${.ALLSRC}
afterinstall:
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
.include <bsd.prog.mk>

View File

@ -0,0 +1,44 @@
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
/* Whether strstr must be declared even if <string.h> is included. */
/* #undef NEED_DECLARATION_STRSTR */
/* Whether free must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_FREE */
/* Whether sbrk must be declared even if <unistd.h> is included. */
/* #undef NEED_DECLARATION_SBRK */
/* Whether getenv must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_GETENV */
/* Do we need to use the b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Define if you have the sbrk function. */
#define HAVE_SBRK 1
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

View File

@ -0,0 +1,6 @@
/* This file is automatically generated. DO NOT EDIT! */
extern ld_emulation_xfer_type ld_elf_i386_emulation;
#define EMULATION_LIST \
&ld_elf_i386_emulation, \
0

View File

@ -0,0 +1,42 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/bfd
LIB= bfd
SRCS= aout32.c archive.c archures.c bfd.c binary.c \
cache.c coff-i386.c coffgen.c cofflink.c corefile.c \
cpu-i386.c elf.c elf32-i386.c elf32.c elflink.c \
format.c hash.c i386bsd.c i386freebsd.c ihex.c \
init.c libbfd.c linker.c opncls.c reloc.c section.c \
srec.c stab-syms.c stabs.c syms.c targets.c tekhex.c
CFLAGS+= -DDEFAULT_VECTOR=bfd_elf32_i386_vec
CFLAGS+= -DSELECT_VECS="&bfd_elf32_i386_vec,&i386freebsd_vec,&i386bsd_vec,&i386coff_vec"
CFLAGS+= -DSELECT_ARCHITECTURES="&bfd_i386_arch"
CFLAGS+= -DHAVE_bfd_elf32_i386_vec
CFLAGS+= -DHAVE_i386freebsd_vec
CFLAGS+= -DHAVE_i386bsd_vec
CFLAGS+= -DHAVE_i386coff_vec
CFLAGS+= -I${SRCDIR}/bfd
NOPROFILE= true
NOPIC= true
CLEANFILES+= elf32-target.h targmatch.h
beforedepend: elf32-target.h targmatch.h
targets.o: targmatch.h
elf32-i386.o: elf32-target.h
elf32-target.h: elfxx-target.h
sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}
targmatch.h: targmatch.sed config.bfd
sed -f ${.ALLSRC:M*.sed} ${.ALLSRC:M*.bfd} > ${.TARGET}
install:
.include <bsd.lib.mk>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,83 @@
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
/* Whether strstr must be declared even if <string.h> is included. */
/* #undef NEED_DECLARATION_STRSTR */
/* Whether malloc must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_MALLOC */
/* Whether realloc must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_REALLOC */
/* Whether free must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_FREE */
/* Whether getenv must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_GETENV */
/* Define if you have a working `mmap' system call. */
#define HAVE_MMAP 1
/* Define if you need to in order for stat and other things to work. */
/* #undef _POSIX_SOURCE */
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Do we need to use the b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Name of host specific header file to include in trad-core.c. */
#define TRAD_HEADER "hosts/i386bsd.h"
/* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
/* #undef HAVE_SYS_PROCFS_H */
/* Do we really want to use mmap if it's available? */
/* #undef USE_MMAP */
/* Define if you have the fcntl function. */
#define HAVE_FCNTL 1
/* Define if you have the getpagesize function. */
#define HAVE_GETPAGESIZE 1
/* Define if you have the madvise function. */
#define HAVE_MADVISE 1
/* Define if you have the mprotect function. */
#define HAVE_MPROTECT 1
/* Define if you have the setitimer function. */
#define HAVE_SETITIMER 1
/* Define if you have the sysconf function. */
#define HAVE_SYSCONF 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define if you have the <time.h> header file. */
#define HAVE_TIME_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

View File

@ -0,0 +1,32 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
LIB= binutils
SRCS= arlex.l arparse.y arsup.c bucomm.c debug.c filemode.c \
ieee.c rdcoff.c rddbg.c stabs.c wrstabs.c version.c
CFLAGS+= -DTARGET=\"${TARGET}\"
CFLAGS+= -DVERSION=\"${VERSION}\"
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
NOPROFILE= true
NOPIC= true
CLEANFILES+= arlex.c arparse.c arparse.h
beforedepend: arlex.c arparse.c arparse.h
arlex.o: arparse.h
arparse.c arparse.h: arparse.y
${YACC} -d -o arparse.c ${.IMPSRC}
# This rule is an attempt to cause "make -j" to work.
arparse.h: arparse.c
install:
.include <bsd.lib.mk>

View File

@ -0,0 +1,87 @@
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
/* Whether strstr must be declared even if <string.h> is included. */
/* #undef NEED_DECLARATION_STRSTR */
/* Whether fprintf must be declared even if <stdio.h> is included. */
/* #undef NEED_DECLARATION_FPRINTF */
/* Whether sbrk must be declared even if <unistd.h> is included. */
/* #undef NEED_DECLARATION_SBRK */
/* Whether getenv must be declared even if <stdlib.h> is included. */
/* #undef NEED_DECLARATION_GETENV */
/* Define if using alloca.c. */
/* #undef C_ALLOCA */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
/* #undef CRAY_STACKSEG_END */
/* Define if you have alloca, as a function or macro. */
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* #undef HAVE_ALLOCA_H */
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
/* Define if you have <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef pid_t */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define vfork as fork if vfork does not work. */
/* #undef vfork */
/* Is the type time_t defined in <time.h>? */
#define HAVE_TIME_T_IN_TIME_H 1
/* Is the type time_t defined in <sys/types.h>? */
#define HAVE_TIME_T_IN_TYPES_H 1
/* Does <utime.h> define struct utimbuf? */
#define HAVE_GOOD_UTIME_H 1
/* Do we need to use the b modifier when opening binary files? */
/* #undef USE_BINARY_FOPEN */
/* Define if you have the sbrk function. */
#define HAVE_SBRK 1
/* Define if you have the utimes function. */
#define HAVE_UTIMES 1
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

View File

@ -0,0 +1,20 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/libiberty
LIB= 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
NOPROFILE= true
NOPIC= true
install:
.include <bsd.lib.mk>

View File

@ -0,0 +1 @@
#include <stdlib.h>

View File

@ -0,0 +1,10 @@
/* !Automatically generated from ../../binutils-2.8.1/libiberty/functions.def - DO NOT EDIT! */
#ifndef NEED_basename
#define NEED_basename
#endif
#ifndef NEED_on_exit
#define NEED_on_exit
#endif
#ifndef NEED_strsignal
#define NEED_strsignal
#endif

View File

@ -0,0 +1,17 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/opcodes
LIB= opcodes
SRCS= i386-dis.c dis-buf.c disassemble.c
CFLAGS+= -I${SRCDIR}/opcodes
NOPROFILE= true
NOPIC= true
install:
.include <bsd.lib.mk>

View File

@ -0,0 +1,11 @@
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
/* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= nm
SRCS= nm.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= objcopy
SRCS= objcopy.c not-strip.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= objdump
SRCS= objdump.c prdbg.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libopcodes -lopcodes
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,17 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= ranlib
SRCS= ar.o is-ranlib.o
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= size
SRCS= size.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= strings
SRCS= strings.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

View File

@ -0,0 +1,16 @@
#
# $Id$
#
.include "../Makefile.inc0"
.PATH: ${SRCDIR}/binutils
PROG= strip
SRCS= objcopy.c is-strip.c
CFLAGS+= -I${SRCDIR}/binutils
LDADD+= -L${RELTOP}/libbinutils -lbinutils
LDADD+= -L${RELTOP}/libbfd -lbfd
LDADD+= -L${RELTOP}/libiberty -liberty
.include <bsd.prog.mk>

49
gnu/usr.bin/binutils/update.sh Executable file
View File

@ -0,0 +1,49 @@
#! /bin/sh
#
# This script installs the main files generated by the binutils
# "configure" scripts and makefiles. It can be used for upgrading to
# a new version of binutils.
#
# Don't forget to change the VERSION definition in the top level
# "Makefile.inc0".
gnudir=$(pwd)
contribdir="${gnudir}/../../../contrib/binutils"
rm -rf build
mkdir -p build/i386-aout
(cd build/i386-aout
${contribdir}/configure i386-unknown-freebsd || exit
(cd gas
echo "Updating i386-aout/as"
make config.h || exit
cp config.h ${gnudir}/i386-aout/as/config.h || exit
)
)
mkdir -p build/i386-elf
(cd build/i386-elf
${contribdir}/configure i386-unknown-freebsdelf || exit
(cd gas
echo "Updating i386-elf/as"
make config.h || exit
cp config.h ${gnudir}/i386-elf/as/config.h || exit
)
(cd ld
echo "Updating i386-elf/ld"
make config.h ldemul-list.h || exit
cp config.h ldemul-list.h ${gnudir}/i386-elf/ld || exit
)
(cd bfd
echo "Updating libbfd"
make bfd.h config.h || exit
cp bfd.h config.h ${gnudir}/libbfd || exit
)
(cd binutils
echo "Updating libbinutils"
make config.h || exit
cp config.h ${gnudir}/libbinutils/config.h || exit
)
)
rm -rf build