summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile15
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.alpha13
-rw-r--r--gnu/usr.bin/binutils/gdb/Makefile.i3868
-rw-r--r--gnu/usr.bin/binutils/gdb/alpha/nm.h3
-rw-r--r--gnu/usr.bin/binutils/gdb/alpha/tm.h3
-rw-r--r--gnu/usr.bin/binutils/gdb/config.h4
6 files changed, 27 insertions, 19 deletions
diff --git a/gnu/usr.bin/binutils/gdb/Makefile b/gnu/usr.bin/binutils/gdb/Makefile
index e16af42..1ae5124 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile
+++ b/gnu/usr.bin/binutils/gdb/Makefile
@@ -4,10 +4,6 @@
.PATH: ${SRCDIR}/binutils
-.if ${MACHINE_ARCH} == "i386"
-CFLAGS+= -Dprint_insn_i386=print_insn_i386_att
-.endif
-
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 \
@@ -29,13 +25,14 @@ XSRCS= annotate.c ax-general.c ax-gdb.c bcache.c blockframe.c \
SRCS= init.c ${XSRCS}
SRCS+= wait.h
-.if exists(${.CURDIR}/Makefile.${MACHINE_ARCH})
-.include "${.CURDIR}/Makefile.${MACHINE_ARCH}"
+.if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
+.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
.endif
-WARNS= 0
-#CFLAGS+= -I${.CURDIR}/${RELTOP}/libbinutils
-CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH}
+.if ${TARGET_ARCH} != ${MACHINE_ARCH}
+CFLAGS+= -DCROSS_COMPILE=1
+.endif
+CFLAGS+= -I${.CURDIR}/${TARGET_ARCH}
CFLAGS+= -I${SRCDIR}/binutils
CFLAGS+= -I${SRCDIR}/bfd
CFLAGS+= -I${GDBDIR}/gdb
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.alpha b/gnu/usr.bin/binutils/gdb/Makefile.alpha
index 0ae3389..73f77af 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.alpha
+++ b/gnu/usr.bin/binutils/gdb/Makefile.alpha
@@ -1,13 +1,16 @@
-#
# $FreeBSD$
-#
-XSRCS+= freebsd-nat.c alpha-tdep.c kvm-fbsd.c
+.PATH: ${.CURDIR}/alpha
+
+.if ${TARGET_ARCH} == ${MACHINE_ARCH}
+XSRCS+= freebsd-nat.c
+.else
+XSRCS+= freebsd-nat-stubs.c
+.endif
+XSRCS+= alpha-tdep.c kvm-fbsd.c
LDADD+= -lkvm
findvar%UAfix.c: findvar.c
sed -e \
's,char registers[REGISTER_BYTES + /* SLOP */ 256];,char registers[REGISTER_BYTES + /* SLOP */ 256] __attribute__ ((aligned (8)));,g' \
${.ALLSRC} >${.TARGET}
-
-.PATH: ${.CURDIR}/alpha
diff --git a/gnu/usr.bin/binutils/gdb/Makefile.i386 b/gnu/usr.bin/binutils/gdb/Makefile.i386
index f2d4960..d78cf9b 100644
--- a/gnu/usr.bin/binutils/gdb/Makefile.i386
+++ b/gnu/usr.bin/binutils/gdb/Makefile.i386
@@ -1,8 +1,10 @@
# $FreeBSD$
-XSRCS+= freebsd-nat.c i386-tdep.c i387-tdep.c kvm-fbsd.c
+.PATH: ${.CURDIR}/i386
+
+XSRCS+= freebsd-nat.c i386-tdep.c i387-tdep.c kvm-fbsd.c
+
+CFLAGS+= -Dprint_insn_i386=print_insn_i386_att
findvar%UAfix.c: findvar.c
ln -sf ${.ALLSRC} ${.TARGET}
-
-.PATH: ${.CURDIR}/i386
diff --git a/gnu/usr.bin/binutils/gdb/alpha/nm.h b/gnu/usr.bin/binutils/gdb/alpha/nm.h
index f06d10c..1b63ef2 100644
--- a/gnu/usr.bin/binutils/gdb/alpha/nm.h
+++ b/gnu/usr.bin/binutils/gdb/alpha/nm.h
@@ -57,11 +57,10 @@ extern CORE_ADDR alpha_u_regs_offset();
/* Support for shared libraries. */
#include "solib.h"
+#include "elf/common.h"
-#ifdef __ELF__
#define SVR4_SHARED_LIBS
#define TARGET_ELF64
-#endif
/* This is a lie. It's actually in stdio.h. */
diff --git a/gnu/usr.bin/binutils/gdb/alpha/tm.h b/gnu/usr.bin/binutils/gdb/alpha/tm.h
index 596a0ef02..4836b1d 100644
--- a/gnu/usr.bin/binutils/gdb/alpha/tm.h
+++ b/gnu/usr.bin/binutils/gdb/alpha/tm.h
@@ -27,6 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define S0_REGNUM (T7_REGNUM+1)
#endif
+#ifndef VM_MIN_ADDRESS
+#define VM_MIN_ADDRESS (0)
+#endif
/* Number of traps that happen between exec'ing the shell to run an
inferior, and when we finally get to the inferior code. This is 2
diff --git a/gnu/usr.bin/binutils/gdb/config.h b/gnu/usr.bin/binutils/gdb/config.h
index f24a6ac..24d4fd6 100644
--- a/gnu/usr.bin/binutils/gdb/config.h
+++ b/gnu/usr.bin/binutils/gdb/config.h
@@ -1,3 +1,5 @@
+/* $FreeBSD$ */
+
/* config.h. Generated automatically by configure. */
/* config.in. Generated automatically from configure.in by autoheader. */
@@ -319,7 +321,9 @@
/* #undef HAVE_PRRUN_T */
/* Define if <sys/procfs.h> has gregset_t. */
+#ifndef CROSS_COMPILE
#define HAVE_GREGSET_T 1
+#endif
/* Define if <sys/procfs.h> has fpregset_t. */
#define HAVE_FPREGSET_T 1
OpenPOWER on IntegriCloud