summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-06-29 03:16:40 +0000
committerobrien <obrien@FreeBSD.org>2002-06-29 03:16:40 +0000
commitd0166e68000221c58f5f26c94a1562e1096d89ee (patch)
tree00812cba25c3b3a7f901dd462161065b78cd133f /gnu
parentb6009897cf0e1d7540d078548f19215d4ce3f3cb (diff)
downloadFreeBSD-src-d0166e68000221c58f5f26c94a1562e1096d89ee.zip
FreeBSD-src-d0166e68000221c58f5f26c94a1562e1096d89ee.tar.gz
Allow to compile and at least startup on sparc64.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile18
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.alpha3
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.i3862
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.sparc644
-rw-r--r--gnu/usr.bin/binutils/gdb/freebsd-uthread.c13
5 files changed, 33 insertions, 7 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile
index f6c7865..f36b782 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile
+++ b/gnu/usr.bin/binutils/gdb/Makefile
@@ -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
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.alpha b/gnu/usr.bin/binutils/gdb/Makefile.alpha
index 2f1a2ab..7c6c65b 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.alpha
+++ b/gnu/usr.bin/binutils/gdb/Makefile.alpha
@@ -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
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.i386 b/gnu/usr.bin/binutils/gdb/Makefile.i386
index ac24514..84b515c 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.i386
+++ b/gnu/usr.bin/binutils/gdb/Makefile.i386
@@ -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
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.sparc64 b/gnu/usr.bin/binutils/gdb/Makefile.sparc64
new file mode 100644
index 0000000..5eb0f2e
--- /dev/null
+++ b/gnu/usr.bin/binutils/gdb/Makefile.sparc64
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+XSRCS+= sparc-nat.c sparc-tdep.c
+CFLAGS+= -DDEFAULT_BFD_VEC=bfd_elf64_sparc_vec
diff --git a/gnu/usr.bin/binutils/gdb/freebsd-uthread.c b/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
index 689574a..f5f4111 100644
--- a/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
+++ b/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
@@ -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)
{
OpenPOWER on IntegriCloud