First cut at the (non-contrib) bits needed to build the binutils

distribution for FreeBSD/Sparc64.

Reviewed by:	obrien
This commit is contained in:
Steve Price 2000-04-02 22:36:56 +00:00
parent 526e193e18
commit 5e59c5460c
11 changed files with 3118 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#
# $FreeBSD$
#
.include "${.CURDIR}/../Makefile.inc0"
PROG= as
.if ${TARGET_ARCH} != "sparc64"
NOMAN= 1
BINDIR= /usr/libexec/cross/sparc64-freebsd
.endif
SRCS+= obj-elf.c tc-sparc.c
.include <bsd.prog.mk>

View File

@ -0,0 +1,147 @@
/* $FreeBSD$ */
/* config.h. Generated automatically by configure. */
/* config.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 */
/* Define if lex declares yytext as a char * by default, not a char[]. */
#define YYTEXT_POINTER 1
/* Name of package. */
#define PACKAGE "gas"
/* Version of package. */
#define VERSION "2.9.1"
/* 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 "sparc64-unknown-freebsd"
#define TARGET_CPU "sparc64"
#define TARGET_CANONICAL "sparc64-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 */
/* The configure script defines this for some targets based on the
target name used. It is not always defined. */
/* #undef TARGET_BYTES_BIG_ENDIAN */
/* 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 */
/* Using cgen code? */
/* #undef USING_CGEN */
/* Needed only for sparc configuration. */
#define DEFAULT_ARCH "v9-64"
/* Needed only for PowerPC Solaris. */
/* #undef TARGET_SOLARIS_COMMENT */
/* Needed only for SCO 5. */
/* #undef SCO_ELF */
/* 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

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "obj-elf.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "tc-sparc.h"

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
#include "te-freebsd.h"

View File

@ -0,0 +1,24 @@
#
# $FreeBSD$
#
.if ${TARGET_ARCH} == "sparc64"
HOST= sparc64-unknown-freebsd
CFLAGS+= -DDEFAULT_EMULATION=\"elf64_sparc\"
CFLAGS+= -DTARGET=\"sparc64-unknown-freebsd\"
_sparc_path= \"/usr/lib\"
.else
_sparc_path= \"/usr/cross/sparc-freebsd/usr/lib\"
.endif
EMS+= ld_elf64_sparc_emulation
LDSCRIPTS+= elf64_sparc.x elf64_sparc.xbn elf64_sparc.xn elf64_sparc.xr \
elf64_sparc.xs elf64_sparc.xu
SRCS+= eelf64_sparc.c
CLEANFILES+= eelf64_sparc.c
eelf64_sparc.c: emulparams/elf64_sparc.sh emultempl/elf32.em \
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_sparc_path} \
${HOST} sparc64-unknown-freebsd sparc64-unknown-freebsd \
elf64_sparc "" elf64_sparc sparc64-unknown-freebsd

View File

@ -29,6 +29,9 @@ CFLAGS+= -I${BINUTILSDISTDIR}/include
.endif
SELARCH=
.if ${BINUTIL_ARCH} == "sparc64"
SELARCH=&bfd_sparc_arch
.else
.for _a in ${ARCHS}
.if ${SELARCH} == ""
SELARCH+=&bfd_${_a}_arch
@ -36,6 +39,7 @@ SELARCH+=&bfd_${_a}_arch
SELARCH+=,&bfd_${_a}_arch
.endif
.endfor
.endif
CFLAGS+= -DSELECT_ARCHITECTURES="${SELARCH}"
SELVEC=

View File

@ -0,0 +1,23 @@
#
# $FreeBSD$
#
SRCS+= cpu-sparc.c \
elf32-sparc.c \
elf32-target.h \
elf32.c \
elf64-sparc.c \
elf64-target.h \
elf64.c \
elflink.c
VECS+= bfd_elf64_sparc_vec bfd_elf32_sparc_vec
.if ${TARGET_ARCH} == "sparc64"
CFLAGS+= -DDEFAULT_VECTOR=bfd_elf64_sparc_vec
.endif
CFLAGS+= -DHAVE_bfd_elf64_sparc_vec -DHAVE_bfd_elf32_sparc_vec
CLEANFILES+= elf64-target.h elf32-target.h
elf64-target.h: elfxx-target.h
sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET}
elf32-target.h: elfxx-target.h
sed -e s/NN/32/g ${.ALLSRC} > ${.TARGET}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,93 @@
/* $FreeBSD$ */
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
/* Name of package. */
#define PACKAGE "bfd"
/* Version of package. */
#define VERSION "2.9.1"
/* 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. */
/* #undef TRAD_HEADER */
/* Define only if <sys/procfs.h> is available *and* it defines prstatus_t. */
#define HAVE_SYS_PROCFS_H 1
/* 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 fdopen function. */
#define HAVE_FDOPEN 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,6 @@
#
# $FreeBSD$
#
SRCS+= sparc-dis.c sparc-opc.c
CFLAGS+= -DARCH_sparc