Allow to compile and at least startup on sparc64.
This commit is contained in:
parent
b6009897cf
commit
d0166e6800
@ -4,12 +4,20 @@
|
||||
|
||||
.PATH: ${SRCDIR}/binutils
|
||||
|
||||
.if ${TARGET_ARCH} == "sparc64"
|
||||
GDB_CPU= sparc
|
||||
.elif ${TARGET_ARCH} == "x86-64"
|
||||
GDB_CPU= i386
|
||||
.else
|
||||
GDB_CPU= ${TARGET_ARCH}
|
||||
.endif
|
||||
|
||||
NOSHARED?=yes
|
||||
PROG= gdb
|
||||
XSRCS= annotate.c ax-general.c ax-gdb.c bcache.c blockframe.c \
|
||||
breakpoint.c buildsym.c c-exp.y c-lang.c c-typeprint.c \
|
||||
c-valprint.c ch-exp.c ch-lang.c ch-typeprint.c ch-valprint.c \
|
||||
coffread.c complaints.c copying.c core-regset.c \
|
||||
coffread.c complaints.c copying.c \
|
||||
corefile.c corelow.c cp-valprint.c dcache.c dbxread.c \
|
||||
demangle.c dwarfread.c dwarf2read.c elfread.c environ.c eval.c \
|
||||
exec.c expprint.c f-exp.y f-lang.c f-typeprint.c f-valprint.c \
|
||||
@ -40,7 +48,7 @@ WARNS= 0
|
||||
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
|
||||
CFLAGS+= -DCROSS_COMPILE=1
|
||||
.endif
|
||||
CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${TARGET_ARCH}_arch
|
||||
CFLAGS+= -DDEFAULT_BFD_ARCH=bfd_${GDB_CPU}_arch
|
||||
CFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
|
||||
CFLAGS+= -I${SRCDIR}/binutils
|
||||
CFLAGS+= -I${SRCDIR}/bfd
|
||||
@ -117,13 +125,13 @@ init.c: ${XSRCS}
|
||||
.PRECIOUS: init.c
|
||||
|
||||
nm.h:
|
||||
echo '#include "${TARGET_ARCH}/nm-fbsd.h"' >${.TARGET}
|
||||
echo '#include "${GDB_CPU}/nm-fbsd.h"' >${.TARGET}
|
||||
echo '#include "fbsd-kgdb.h"' >>${.TARGET}
|
||||
|
||||
.for H in tm-fbsd xm-${TARGET_ARCH}
|
||||
.for H in tm-fbsd xm-${GDB_CPU}
|
||||
${H:C/-.*$//}.h:
|
||||
ln -sf \
|
||||
${.CURDIR}/../../../../contrib/gdb/gdb/config/${TARGET_ARCH}/${H}.h \
|
||||
${.CURDIR}/../../../../contrib/gdb/gdb/config/${GDB_CPU}/${H}.h \
|
||||
${.TARGET}
|
||||
.endfor
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $FreeBSD$
|
||||
|
||||
XSRCS+= alphabsd-nat.c alphafbsd-tdep.c alpha-tdep.c
|
||||
XSRCS+= alphabsd-nat.c alphafbsd-tdep.c alpha-tdep.c \
|
||||
core-regset.c
|
||||
CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_alpha_vec
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
XSRCS+= i386fbsd-nat.c i386bsd-tdep.c i386bsd-nat.c i386-nat.c i386-tdep.c \
|
||||
i387-nat.c i387-tdep.c \
|
||||
core-aout.c
|
||||
core-regset.c core-aout.c
|
||||
|
||||
CFLAGS+= -Dprint_insn_i386=print_insn_i386_att
|
||||
CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf32_i386_vec
|
||||
|
4
gnu/usr.bin/binutils/gdb/Makefile.sparc64
Normal file
4
gnu/usr.bin/binutils/gdb/Makefile.sparc64
Normal file
@ -0,0 +1,4 @@
|
||||
# $FreeBSD$
|
||||
|
||||
XSRCS+= sparc-nat.c sparc-tdep.c
|
||||
CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_sparc_vec
|
@ -408,6 +408,7 @@ freebsd_uthread_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
|
||||
return rtnval;
|
||||
}
|
||||
|
||||
/* XXX: this needs to be selected by target, not [build] host */
|
||||
#ifdef __i386__
|
||||
|
||||
static char sigmap[MAX_NUM_REGS] = /* map reg to sigcontext */
|
||||
@ -488,6 +489,18 @@ static char jmpmap[NUM_REGS] = {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __sparc64__
|
||||
|
||||
static char sigmap[125] = /* map reg to sigcontext */
|
||||
{
|
||||
-1
|
||||
};
|
||||
static char jmpmap[125] = {
|
||||
-1
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
freebsd_uthread_fetch_registers (int regno)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user