pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/gdb5: import gdb-5.3nb7



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Sep 29 15:15:10 2017 +0200
Changeset:	bbba8cab0b90265e0aa207dd5e3457ddd50cc823

Added Files:
	gdb5/DESCR
	gdb5/Makefile
	gdb5/PLIST.Linux
	gdb5/PLIST.common
	gdb5/distinfo
	gdb5/patches/patch-aa
	gdb5/patches/patch-ab
	gdb5/patches/patch-ac
	gdb5/patches/patch-ad
	gdb5/patches/patch-ae
	gdb5/patches/patch-af
	gdb5/patches/patch-ag
	gdb5/patches/patch-ah
	gdb5/patches/patch-ai
	gdb5/patches/patch-aj
	gdb5/patches/patch-ak
	gdb5/patches/patch-al
	gdb5/patches/patch-am
	gdb5/patches/patch-an
	gdb5/patches/patch-ao
	gdb5/patches/patch-ap
	gdb5/patches/patch-aq
	gdb5/patches/patch-as
	gdb5/patches/patch-bfd_po_Make-in
	gdb5/patches/patch-gdb_Makefile.in
	gdb5/patches/patch-gdb_doc_Makefile.in
	gdb5/patches/patch-gdb_gdbserver_Makefile.in
	gdb5/patches/patch-gdb_gdbserver_configure.in
	gdb5/patches/patch-mmalloc_Makefile.in
	gdb5/patches/patch-ob
	gdb5/patches/patch-opcodes_po_Make-in

Log Message:
wip/gdb5: import gdb-5.3nb7

   The purpose of a debugger such as GDB is to allow you to see what
is going on "inside" another program while it executes--or what
another program was doing at the moment it crashed.

   GDB can do four main kinds of things (plus other things in support
of these) to help you catch bugs in the act:

   * Start your program, specifying anything that might affect its
     behavior.

   * Make your program stop on specified conditions.

   * Examine what has happened, when your program has stopped.

   * Change things in your program, so you can experiment with
     correcting the effects of one bug and go on to learn about
     another.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bbba8cab0b90265e0aa207dd5e3457ddd50cc823

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gdb5/DESCR                                    |  17 +
 gdb5/Makefile                                 |  47 ++
 gdb5/PLIST.Linux                              |   3 +
 gdb5/PLIST.common                             |  30 ++
 gdb5/distinfo                                 |  32 ++
 gdb5/patches/patch-aa                         |  35 ++
 gdb5/patches/patch-ab                         |  15 +
 gdb5/patches/patch-ac                         | 629 ++++++++++++++++++++++++++
 gdb5/patches/patch-ad                         |  27 ++
 gdb5/patches/patch-ae                         |  15 +
 gdb5/patches/patch-af                         | 318 +++++++++++++
 gdb5/patches/patch-ag                         |  12 +
 gdb5/patches/patch-ah                         |  21 +
 gdb5/patches/patch-ai                         |  13 +
 gdb5/patches/patch-aj                         |  12 +
 gdb5/patches/patch-ak                         |  12 +
 gdb5/patches/patch-al                         |  13 +
 gdb5/patches/patch-am                         |  52 +++
 gdb5/patches/patch-an                         |  13 +
 gdb5/patches/patch-ao                         |  13 +
 gdb5/patches/patch-ap                         |  75 +++
 gdb5/patches/patch-aq                         |  15 +
 gdb5/patches/patch-as                         |  28 ++
 gdb5/patches/patch-bfd_po_Make-in             |  25 +
 gdb5/patches/patch-gdb_Makefile.in            |  23 +
 gdb5/patches/patch-gdb_doc_Makefile.in        |  35 ++
 gdb5/patches/patch-gdb_gdbserver_Makefile.in  |  15 +
 gdb5/patches/patch-gdb_gdbserver_configure.in |  16 +
 gdb5/patches/patch-mmalloc_Makefile.in        |  19 +
 gdb5/patches/patch-ob                         |  25 +
 gdb5/patches/patch-opcodes_po_Make-in         |  25 +
 31 files changed, 1630 insertions(+)

diffs:
diff --git a/gdb5/DESCR b/gdb5/DESCR
new file mode 100644
index 0000000000..c7c2207693
--- /dev/null
+++ b/gdb5/DESCR
@@ -0,0 +1,17 @@
+   The purpose of a debugger such as GDB is to allow you to see what
+is going on "inside" another program while it executes--or what
+another program was doing at the moment it crashed.
+
+   GDB can do four main kinds of things (plus other things in support
+of these) to help you catch bugs in the act:
+
+   * Start your program, specifying anything that might affect its
+     behavior.
+
+   * Make your program stop on specified conditions.
+
+   * Examine what has happened, when your program has stopped.
+
+   * Change things in your program, so you can experiment with
+     correcting the effects of one bug and go on to learn about
+     another.
diff --git a/gdb5/Makefile b/gdb5/Makefile
new file mode 100644
index 0000000000..1f7da89ba4
--- /dev/null
+++ b/gdb5/Makefile
@@ -0,0 +1,47 @@
+# $NetBSD: Makefile,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+#
+
+DISTNAME=	gdb-5.3
+PKGREVISION=	7
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GNU:=gdb/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://www.gnu.org/software/gdb/gdb.html
+COMMENT=	Symbolic debugger for multiple language frontends
+
+# This (ancient) version of gdb does not understand or has never heard of
+#   - mach-o (hence macos)
+#   - dragonfly
+#   - amd64 (probably on all OSes but certainly on netbsd)
+# and is not worth fixing.
+NOT_FOR_PLATFORM=	Darwin-*-* DragonFly-*-* NetBSD-*-x86_64
+
+BROKEN_GETTEXT_DETECTION=	yes
+GNU_CONFIGURE=		YES
+USE_PKGLOCALEDIR=	YES
+USE_LIBTOOL=		YES
+USE_TOOLS+=		gmake msgfmt
+REPLACE_LOCALEDIR_PATTERNS+=	Make-in
+INSTALL_TARGET=		install install-info
+TEST_TARGET=		check
+INFO_FILES=		yes
+CONFIGURE_ENV+=		CONFIG_LDFLAGS=${LDFLAGS:M*:Q}
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+# Work around a bug in gdb's configure
+CONFIGURE_ENV+=		ac_cv_header_curses_h=yes
+.elif ${OPSYS} == "Linux"
+USE_TOOLS+=		aclocal autoheader autoconf
+
+pre-configure:
+	${RUN} cd ${WRKSRC}/gdb/gdbserver &&				\
+	aclocal && autoheader && autoconf
+
+.endif
+
+.include "../../mk/termcap.buildlink3.mk"
+.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/gdb5/PLIST.Linux b/gdb5/PLIST.Linux
new file mode 100644
index 0000000000..e05b5dda79
--- /dev/null
+++ b/gdb5/PLIST.Linux
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST.Linux,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+bin/gdbserver
+man/man1/gdbserver.1
diff --git a/gdb5/PLIST.common b/gdb5/PLIST.common
new file mode 100644
index 0000000000..f0edf42e60
--- /dev/null
+++ b/gdb5/PLIST.common
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST.common,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+bin/gdb
+include/ansidecl.h
+include/bfd.h
+include/bfdlink.h
+include/dis-asm.h
+include/symcat.h
+info/bfd.info
+info/gdb.info
+info/gdbint.info
+info/mmalloc.info
+info/stabs.info
+lib/libbfd.la
+lib/libiberty.a
+lib/libmmalloc.a
+lib/libopcodes.la
+man/man1/gdb.1
+share/locale/da/LC_MESSAGES/opcodes.mo
+share/locale/de/LC_MESSAGES/opcodes.mo
+share/locale/es/LC_MESSAGES/bfd.mo
+share/locale/es/LC_MESSAGES/opcodes.mo
+share/locale/fr/LC_MESSAGES/bfd.mo
+share/locale/fr/LC_MESSAGES/opcodes.mo
+share/locale/id/LC_MESSAGES/opcodes.mo
+share/locale/ja/LC_MESSAGES/bfd.mo
+share/locale/pt_BR/LC_MESSAGES/opcodes.mo
+share/locale/sv/LC_MESSAGES/bfd.mo
+share/locale/sv/LC_MESSAGES/opcodes.mo
+share/locale/tr/LC_MESSAGES/bfd.mo
+share/locale/tr/LC_MESSAGES/opcodes.mo
diff --git a/gdb5/distinfo b/gdb5/distinfo
new file mode 100644
index 0000000000..f69fb069a4
--- /dev/null
+++ b/gdb5/distinfo
@@ -0,0 +1,32 @@
+$NetBSD: distinfo,v 1.2 2015/11/03 03:27:27 agc Exp $
+
+SHA1 (gdb-5.3.tar.gz) = 24a6c9da6e89b1b82b7508f27f94098d989ff662
+RMD160 (gdb-5.3.tar.gz) = 3f88dc11115de08708c50c73b10acaf00ed25e96
+SHA512 (gdb-5.3.tar.gz) = d887296078bf150922953f5d59f330a55f5d7820337884a4cefd4a19607bd7f0ad9e93edb43cc042d21d8303c67c276bec2a9a9289342e0eb8c0579bf7e402cd
+Size (gdb-5.3.tar.gz) = 14707600 bytes
+SHA1 (patch-aa) = 03b55af0a826f107143ca4846000084739f7c453
+SHA1 (patch-ab) = 56fe49b2f0b6a99053f48d6cf0df91c78ae24a92
+SHA1 (patch-ac) = 681168205196ad6451674f703fcf9148b673d4de
+SHA1 (patch-ad) = f831cd919d75ba8ab76c1f90b47ee443615397f8
+SHA1 (patch-ae) = e2a7e553cab2d447e9c27f6fd956577355714f28
+SHA1 (patch-af) = 4637beaaa978395547f7664504aced476ec946d8
+SHA1 (patch-ag) = 94eaa6bc4183ac86a21e417f6d266173618e78b5
+SHA1 (patch-ah) = 0a6ceea484411d26ac584a1b3d248e4c3c50f3d7
+SHA1 (patch-ai) = 24fc619a5de034c4ead6424ffcb30a2e8aa7d816
+SHA1 (patch-aj) = 16b03a5ce9b34af42dcec4e26103ebc456d091bf
+SHA1 (patch-ak) = 0908ff7f7000df702a18c25bce4b4930c61ad8f8
+SHA1 (patch-al) = 2721abee837d85f57b05073490d94e9e11d5193d
+SHA1 (patch-am) = 73c6077dcad00fbdde289d270418bd66a36ae9d9
+SHA1 (patch-an) = c28777296917daa1a619eca092023c8f5aaf706f
+SHA1 (patch-ao) = 7a38b55945cf6d9fc422e460d67b88a1e4416e62
+SHA1 (patch-ap) = e79d8a70d12098716791e3349d8606d07f8acd47
+SHA1 (patch-aq) = f7c356f7c500b84feb141ba693390378e5f71642
+SHA1 (patch-as) = 77a2f8eb5e1f076cba915c80113cfe5bf617efaf
+SHA1 (patch-bfd_po_Make-in) = 9e09652c95dbea0d7017102546c4e959abc199da
+SHA1 (patch-gdb_Makefile.in) = 229c14522ddf8f5ddfdd414d77be1ddefc5635db
+SHA1 (patch-gdb_doc_Makefile.in) = 44f1fc8db2f37dae1ba0db3ae1192ec8ef47f4a3
+SHA1 (patch-gdb_gdbserver_Makefile.in) = 00e0015600847401ecd4471afd53c7e5030e1f15
+SHA1 (patch-gdb_gdbserver_configure.in) = 064fc1e61fb5b301f4e8601f7754b38a444c2e97
+SHA1 (patch-mmalloc_Makefile.in) = 1c45f0b326b838d442979e4ada45c0e5fc2da1c5
+SHA1 (patch-ob) = 52c017dfa9f535edc9520144efa8ef04a8020832
+SHA1 (patch-opcodes_po_Make-in) = c4f9d3d19a52acab6c18454b1ff95c9e1302c5bf
diff --git a/gdb5/patches/patch-aa b/gdb5/patches/patch-aa
new file mode 100644
index 0000000000..3cc8c275ee
--- /dev/null
+++ b/gdb5/patches/patch-aa
@@ -0,0 +1,35 @@
+$NetBSD: patch-aa,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- Makefile.in.orig	2002-12-10 21:30:40.000000000 +0000
++++ Makefile.in
+@@ -75,10 +75,10 @@ PWD = $${PWDCMD-pwd}
+ # cygwin host.
+ INSTALL_PROGRAM_ARGS =
+ 
+-INSTALL = $(SHELL) $$s/install-sh -c
+-INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS)
+-INSTALL_SCRIPT = $(INSTALL)
+-INSTALL_DATA = $(INSTALL) -m 644
++INSTALL = $(BSD_INSTALL)
++INSTALL_PROGRAM = $(BSD_INSTALL_PROGRAM)
++INSTALL_SCRIPT = $(BSD_INSTALL_SCRIPT)
++INSTALL_DATA = $(BSD_INSTALL_DATA)
+ 
+ INSTALL_DOSREL = install-dosrel-fake
+ 
+@@ -372,6 +372,7 @@ BASE_FLAGS_TO_PASS = \
+ 	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
+ 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
+ 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
++	"DESTDIR=$(DESTDIR)" \
+ 	"INSTALL=$(INSTALL)" \
+ 	"INSTALL_DATA=$(INSTALL_DATA)" \
+ 	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+@@ -707,7 +708,6 @@ INSTALL_MODULES = \
+ 	install-perl \
+ 	install-prms \
+ 	install-rcs \
+-	install-readline \
+ 	install-recode \
+ 	install-sed \
+ 	install-send-pr \
diff --git a/gdb5/patches/patch-ab b/gdb5/patches/patch-ab
new file mode 100644
index 0000000000..1aabefeca6
--- /dev/null
+++ b/gdb5/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- bfd/Makefile.am.orig	2002-08-30 08:11:44.000000000 +0000
++++ bfd/Makefile.am
+@@ -724,8 +724,8 @@ install_libbfd: $(bfdlib_LTLIBRARIES) $(
+ 	$(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
+ 	@list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 	$(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h
diff --git a/gdb5/patches/patch-ac b/gdb5/patches/patch-ac
new file mode 100644
index 0000000000..8884e4a409
--- /dev/null
+++ b/gdb5/patches/patch-ac
@@ -0,0 +1,629 @@
+$NetBSD: patch-ac,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- bfd/Makefile.in.orig	2003-03-10 21:23:58.000000000 +0000
++++ bfd/Makefile.in
+@@ -151,535 +151,45 @@ BFD_H = bfd.h
+ # for the debugger, so if you are downloading things as S-records you
+ # need two copies of the executable, one to download and one for the
+ # debugger).
+-BFD32_LIBS = \
+-	archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
+-	format.lo init.lo libbfd.lo opncls.lo reloc.lo \
+-	section.lo syms.lo targets.lo hash.lo linker.lo \
+-	srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
+-	merge.lo dwarf2.lo
++BFD32_LIBS =  	archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo 	format.lo init.lo libbfd.lo opncls.lo reloc.lo 	section.lo syms.lo targets.lo hash.lo linker.lo 	srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo 	merge.lo dwarf2.lo
+ 
+ 
+ BFD64_LIBS = archive64.lo
+ 
+-BFD32_LIBS_CFILES = \
+-	archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
+-	format.c init.c libbfd.c opncls.c reloc.c \
+-	section.c syms.c targets.c hash.c linker.c \
+-	srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
+-	merge.c dwarf2.c
++BFD32_LIBS_CFILES =  	archive.c archures.c bfd.c cache.c coffgen.c corefile.c 	format.c init.c libbfd.c opncls.c reloc.c 	section.c syms.c targets.c hash.c linker.c 	srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c 	merge.c dwarf2.c
+ 
+ 
+ BFD64_LIBS_CFILES = archive64.c
+ 
+ # This list is alphabetized to make it easier to keep in sync
+ # with the decls and initializer in archures.c.
+-ALL_MACHINES = \
+-	cpu-a29k.lo \
+-	cpu-alpha.lo \
+-	cpu-arc.lo \
+-	cpu-arm.lo \
+-	cpu-avr.lo \
+-	cpu-cris.lo \
+-	cpu-d10v.lo \
+-	cpu-d30v.lo \
+-	cpu-dlx.lo \
+-	cpu-fr30.lo \
+-	cpu-frv.lo \
+-	cpu-h8300.lo \
+-	cpu-h8500.lo \
+-	cpu-hppa.lo \
+-	cpu-ia64.lo \
+-	cpu-i370.lo \
+-	cpu-i386.lo \
+-	cpu-i860.lo \
+-	cpu-i960.lo \
+-	cpu-ip2k.lo \
+-	cpu-m32r.lo \
+-	cpu-m68hc11.lo \
+-	cpu-m68hc12.lo \
+-	cpu-m68k.lo \
+-	cpu-m88k.lo \
+-	cpu-m10200.lo \
+-	cpu-m10300.lo \
+-	cpu-mcore.lo \
+-	cpu-mips.lo \
+-	cpu-mmix.lo \
+-	cpu-or32.lo \
+-	cpu-ns32k.lo \
+-	cpu-openrisc.lo \
+-	cpu-pdp11.lo \
+-	cpu-pj.lo \
+-	cpu-powerpc.lo \
+-	cpu-rs6000.lo \
+-	cpu-s390.lo \
+-	cpu-sh.lo \
+-	cpu-sparc.lo \
+-	cpu-tic30.lo \
+-	cpu-tic4x.lo \
+-	cpu-tic54x.lo \
+-	cpu-tic80.lo \
+-	cpu-v850.lo \
+-	cpu-vax.lo \
+-	cpu-we32k.lo \
+-	cpu-w65.lo \
+-	cpu-xstormy16.lo \
+-	cpu-z8k.lo
+-
+-
+-ALL_MACHINES_CFILES = \
+-	cpu-a29k.c \
+-	cpu-alpha.c \
+-	cpu-arc.c \
+-	cpu-arm.c \
+-	cpu-avr.c \
+-	cpu-cris.c \
+-	cpu-d10v.c \
+-	cpu-d30v.c \
+-	cpu-dlx.c \
+-	cpu-fr30.c \
+-	cpu-frv.c \
+-	cpu-h8300.c \
+-	cpu-h8500.c \
+-	cpu-hppa.c \
+-	cpu-ia64.c \
+-	cpu-i370.c \
+-	cpu-i386.c \
+-	cpu-i860.c \
+-	cpu-i960.c \
+-	cpu-ip2k.c \
+-	cpu-m32r.c \
+-	cpu-m68hc11.c \
+-	cpu-m68hc12.c \
+-	cpu-m68k.c \
+-	cpu-m88k.c \
+-	cpu-m10200.c \
+-	cpu-m10300.c \
+-	cpu-mcore.c \
+-	cpu-mips.c \
+-	cpu-mmix.c \
+-	cpu-or32.c \
+-	cpu-ns32k.c \
+-	cpu-openrisc.c \
+-	cpu-pdp11.c \
+-	cpu-pj.c \
+-	cpu-powerpc.c \
+-	cpu-rs6000.c \
+-	cpu-s390.c \
+-	cpu-sh.c \
+-	cpu-sparc.c \
+-	cpu-tic30.c \
+-	cpu-tic4x.c \
+-	cpu-tic54x.c \
+-	cpu-tic80.c \
+-	cpu-v850.c \
+-	cpu-vax.c \
+-	cpu-we32k.c \
+-	cpu-w65.c \
+-	cpu-xstormy16.c \
+-	cpu-z8k.c
++ALL_MACHINES =  	cpu-a29k.lo 	cpu-alpha.lo 	cpu-arc.lo 	cpu-arm.lo 	cpu-avr.lo 	cpu-cris.lo 	cpu-d10v.lo 	cpu-d30v.lo 	cpu-dlx.lo 	cpu-fr30.lo 	cpu-frv.lo 	cpu-h8300.lo 	cpu-h8500.lo 	cpu-hppa.lo 	cpu-ia64.lo 	cpu-i370.lo 	cpu-i386.lo 	cpu-i860.lo 	cpu-i960.lo 	cpu-ip2k.lo 	cpu-m32r.lo 	cpu-m68hc11.lo 	cpu-m68hc12.lo 	cpu-m68k.lo 	cpu-m88k.lo 	cpu-m10200.lo 	cpu-m10300.lo 	cpu-mcore.lo 	cpu-mips.lo 	cpu-mmix.lo 	cpu-or32.lo 	cpu-ns32k.lo 	cpu-openrisc.lo 	cpu-pdp11.lo 	cpu-pj.lo 	cpu-powerpc.lo 	cpu-rs6000.lo 	cpu-s390.lo 	cpu-sh.lo 	cpu-sparc.lo 	cpu-tic30.lo 	cpu-tic4x.lo 	cpu-tic54x.lo 	cpu-tic80.lo 	cpu-v850.lo 	cpu-vax.lo 	cpu-we32k.lo 	cpu-w65.lo 	cpu-xstormy16.lo 	cpu-z8k.lo
++
++
++ALL_MACHINES_CFILES =  	cpu-a29k.c 	cpu-alpha.c 	cpu-arc.c 	cpu-arm.c 	cpu-avr.c 	cpu-cris.c 	cpu-d10v.c 	cpu-d30v.c 	cpu-dlx.c 	cpu-fr30.c 	cpu-frv.c 	cpu-h8300.c 	cpu-h8500.c 	cpu-hppa.c 	cpu-ia64.c 	cpu-i370.c 	cpu-i386.c 	cpu-i860.c 	cpu-i960.c 	cpu-ip2k.c 	cpu-m32r.c 	cpu-m68hc11.c 	cpu-m68hc12.c 	cpu-m68k.c 	cpu-m88k.c 	cpu-m10200.c 	cpu-m10300.c 	cpu-mcore.c 	cpu-mips.c 	cpu-mmix.c 	cpu-or32.c 	cpu-ns32k.c 	cpu-openrisc.c 	cpu-pdp11.c 	cpu-pj.c 	cpu-powerpc.c 	cpu-rs6000.c 	cpu-s390.c 	cpu-sh.c 	cpu-sparc.c 	cpu-tic30.c 	cpu-tic4x.c 	cpu-tic54x.c 	cpu-tic80.c 	cpu-v850.c 	cpu-vax.c 	cpu-we32k.c 	cpu-w65.c 	cpu-xstormy16.c 	cpu-z8k.c
+ 
+ 
+ # The .o files needed by all of the 32 bit vectors that are configured into
+ # target_vector in targets.c if configured with --enable-targets=all.
+-BFD32_BACKENDS = \
+-	aout-adobe.lo \
+-	aout-arm.lo \
+-	aout-cris.lo \
+-	aout-ns32k.lo \
+-	aout-sparcle.lo \
+-	aout-tic30.lo \
+-	aout0.lo \
+-	aout32.lo \
+-	armnetbsd.lo \
+-	bout.lo \
+-	cf-i386lynx.lo \
+-	cf-m68klynx.lo \
+-	cf-sparclynx.lo \
+-	coff-a29k.lo \
+-	coff-apollo.lo \
+-	coff-arm.lo \
+-	coff-aux.lo \
+-	coff-h8300.lo \
+-	coff-h8500.lo \
+-	coff-i386.lo \
+-	coff-go32.lo \
+-	coff-i860.lo \
+-	coff-i960.lo \
+-	coff-m68k.lo \
+-	coff-m88k.lo \
+-	coff-mips.lo \
+-	coff-or32.lo \
+-	coff-rs6000.lo \
+-	coff-sh.lo \
+-	coff-sparc.lo \
+-	coff-stgo32.lo \
+-	coff-svm68k.lo \
+-	coff-tic30.lo \
+-	coff-tic4x.lo \
+-	coff-tic54x.lo \
+-	coff-tic80.lo \
+-	coff-u68k.lo \
+-	coff-we32k.lo \
+-	coff-w65.lo \
+-	coff-z8k.lo \
+-	cofflink.lo \
+-	dwarf1.lo \
+-	ecoff.lo \
+-	ecofflink.lo \
+-	efi-app-ia32.lo \
+-	elf.lo \
+-	elf32-arc.lo \
+-	elfarm-oabi.lo \
+-	elfarm-nabi.lo \
+-	elfarmqnx-nabi.lo \
+-	elf32-avr.lo \
+-	elf32-cris.lo \
+-	elf32-d10v.lo \
+-	elf32-d30v.lo \
+-	elf32-dlx.lo \
+-	elf32-fr30.lo \
+-	elf32-frv.lo \
+-	elf32-gen.lo \
+-	elf32-h8300.lo \
+-	elf32-hppa.lo \
+-	elf32-i370.lo \
+-	elf32-i386.lo \
+-	elf32-i386qnx.lo \
+-	elf32-i860.lo \
+-	elf32-i960.lo \
+-	elf32-ia64.lo \
+-	elf32-ip2k.lo \
+-	elf32-m32r.lo \
+-	elf32-m68hc11.lo \
+-	elf32-m68hc12.lo \
+-	elf32-m68k.lo \
+-	elf32-m88k.lo \
+-	elf-m10200.lo \
+-	elf-m10300.lo \
+-	elf32-mcore.lo \
+-	elfxx-mips.lo \
+-	elf32-mips.lo \
+-	elf32-openrisc.lo \
+-	elf32-or32.lo \
+-	elf32-pj.lo \
+-	elf32-ppc.lo \
+-	elf32-ppcqnx.lo \
+-	elf32-s390.lo \
+-	elf32-sh.lo \
+-	elf32-sh-lin.lo \
+-	elf32-sh64.lo \
+-	elf32-sh64-com.lo \
+-	elf32-sh-nbsd.lo \
+-	elf32-sh64-nbsd.lo \
+-	elf32-shqnx.lo \
+-	elf32-sparc.lo \
+-	elf32-v850.lo \
+-	elf32-vax.lo \
+-	elf32-xstormy16.lo \
+-	elf32.lo \
+-	elflink.lo \
+-	elf-strtab.lo \
+-	elf-eh-frame.lo \
+-	epoc-pe-arm.lo \
+-	epoc-pei-arm.lo \
+-	hp300bsd.lo \
+-	hp300hpux.lo \
+-	som.lo \
+-	i386aout.lo \
+-	i386bsd.lo \
+-	i386dynix.lo \
+-	i386freebsd.lo \
+-	i386linux.lo \
+-	i386lynx.lo \
+-	i386msdos.lo \
+-	i386netbsd.lo \
+-	i386mach3.lo \
+-	i386os9k.lo \
+-	ieee.lo \
+-	m68k4knetbsd.lo \
+-	m68klinux.lo \
+-	m68klynx.lo \
+-	m68knetbsd.lo \
+-	m88kmach3.lo \
+-	mipsbsd.lo \
+-	newsos3.lo \
+-	nlm.lo \
+-	nlm32-i386.lo \
+-	nlm32-sparc.lo \
+-	nlm32-ppc.lo \
+-	nlm32.lo \
+-	ns32knetbsd.lo \
+-	oasys.lo \
+-	pc532-mach.lo \
+-	pdp11.lo \
+-	pe-arm.lo \
+-	pei-arm.lo \
+-	pe-i386.lo \
+-	pei-i386.lo \
+-	pe-mcore.lo \
+-	pei-mcore.lo \
+-	pe-ppc.lo \
+-	pei-ppc.lo \
+-	pe-sh.lo \
+-	pei-sh.lo \
+-	pe-mips.lo \
+-	pei-mips.lo \
+-	peigen.lo \
+-	ppcboot.lo \
+-	reloc16.lo \
+-	riscix.lo \
+-	sparclinux.lo \
+-	sparclynx.lo \
+-	sparcnetbsd.lo \
+-	sunos.lo \
+-	vaxnetbsd.lo \
+-	vax1knetbsd.lo \
+-	vaxbsd.lo \
+-	versados.lo \
+-	vms.lo \
+-	vms-gsd.lo \
+-	vms-hdr.lo \
+-	vms-misc.lo \
+-	vms-tir.lo \
+-	xcofflink.lo
+-
+-
+-BFD32_BACKENDS_CFILES = \
+-	aout-adobe.c \
+-	aout-arm.c \
+-	aout-cris.c \
+-	aout-ns32k.c \
+-	aout-sparcle.c \
+-	aout-tic30.c \
+-	aout0.c \
+-	aout32.c \
+-	armnetbsd.c \
+-	bout.c \
+-	cf-i386lynx.c \
+-	cf-m68klynx.c \
+-	cf-sparclynx.c \
+-	coff-a29k.c \
+-	coff-apollo.c \
+-	coff-arm.c \
+-	coff-aux.c \
+-	coff-h8300.c \
+-	coff-h8500.c \
+-	coff-i386.c \
+-	coff-i860.c \
+-	coff-go32.c \
+-	coff-i960.c \
+-	coff-m68k.c \
+-	coff-m88k.c \
+-	coff-mips.c \
+-	coff-or32.c \
+-	coff-rs6000.c \
+-	coff-sh.c \
+-	coff-sparc.c \
+-	coff-stgo32.c \
+-	coff-svm68k.c \
+-	coff-tic30.c \
+-	coff-tic4x.c \
+-	coff-tic54x.c \
+-	coff-tic80.c \
+-	coff-u68k.c \
+-	coff-we32k.c \
+-	coff-w65.c \
+-	coff-z8k.c \
+-	cofflink.c \
+-	dwarf1.c \
+-	ecoff.c \
+-	ecofflink.c \
+-	efi-app-ia32.c \
+-	elf.c \
+-	elf32-arc.c \
+-	elfarm-oabi.c \
+-	elfarm-nabi.c \
+-	elfarmqnx-nabi.c \
+-	elf32-avr.c \
+-	elf32-cris.c \
+-	elf32-d10v.c \
+-	elf32-d30v.c \
+-	elf32-dlx.c \
+-	elf32-fr30.c \
+-	elf32-frv.c \
+-	elf32-gen.c \
+-	elf32-h8300.c \
+-	elf32-hppa.c \
+-	elf32-i370.c \
+-	elf32-i386.c \
+-	elf32-i386qnx.c \
+-	elf32-i860.c \
+-	elf32-i960.c \
+-	elf32-ip2k.c \
+-	elf32-m32r.c \
+-	elf32-m68k.c \
+-	elf32-m68hc11.c \
+-	elf32-m68hc12.c \
+-	elf32-m88k.c \
+-	elf-m10200.c \
+-	elf-m10300.c \
+-	elf32-mcore.c \
+-	elfxx-mips.c \
+-	elf32-mips.c \
+-	elf32-openrisc.c \
+-	elf32-or32.c \
+-	elf32-pj.c \
+-	elf32-ppc.c \
+-	elf32-ppcqnx.c \
+-	elf32-sh64.c \
+-	elf32-sh64-com.c \
+-	elf32-s390.c \
+-	elf32-sh.c \
+-	elf32-sh-lin.c \
+-	elf32-sh-nbsd.c \
+-	elf32-sh64-nbsd.c \
+-	elf32-shqnx.c \
+-	elf32-sparc.c \
+-	elf32-v850.c \
+-	elf32-vax.c \
+-	elf32-xstormy16.c \
+-	elf32.c \
+-	elflink.c \
+-	elf-strtab.c \
+-	elf-eh-frame.c \
+-	epoc-pe-arm.c \
+-	epoc-pei-arm.c \
+-	hp300bsd.c \
+-	hp300hpux.c \
+-	som.c \
+-	i386aout.c \
+-	i386bsd.c \
+-	i386dynix.c \
+-	i386freebsd.c \
+-	i386linux.c \
+-	i386lynx.c \
+-	i386msdos.c \
+-	i386netbsd.c \
+-	i386mach3.c \
+-	i386os9k.c \
+-	ieee.c \
+-	m68k4knetbsd.c \
+-	m68klinux.c \
+-	m68klynx.c \
+-	m68knetbsd.c \
+-	m88kmach3.c \
+-	mipsbsd.c \
+-	newsos3.c \
+-	nlm.c \
+-	nlm32-i386.c \
+-	nlm32-sparc.c \
+-	nlm32-ppc.c \
+-	nlm32.c \
+-	ns32knetbsd.c \
+-	oasys.c \
+-	pc532-mach.c \
+-	pdp11.c \
+-	pe-arm.c \
+-	pei-arm.c \
+-	pe-i386.c \
+-	pei-i386.c \
+-	pe-mcore.c \
+-	pei-mcore.c \
+-	pe-ppc.c \
+-	pei-ppc.c \
+-	pe-sh.c \
+-	pei-sh.c \
+-	pe-mips.c \
+-	pei-mips.c \
+-	ppcboot.c \
+-	reloc16.c \
+-	riscix.c \
+-	sparclinux.c \
+-	sparclynx.c \
+-	sparcnetbsd.c \
+-	sunos.c \
+-	vaxnetbsd.c \
+-	vax1knetbsd.c \
+-	vaxbsd.c \
+-	versados.c \
+-	vms.c \
+-	vms-gsd.c \
+-	vms-hdr.c \
+-	vms-misc.c \
+-	vms-tir.c \
+-	xcofflink.c
++BFD32_BACKENDS =  	aout-adobe.lo 	aout-arm.lo 	aout-cris.lo 	aout-ns32k.lo 	aout-sparcle.lo 	aout-tic30.lo 	aout0.lo 	aout32.lo 	armnetbsd.lo 	bout.lo 	cf-i386lynx.lo 	cf-m68klynx.lo 	cf-sparclynx.lo 	coff-a29k.lo 	coff-apollo.lo 	coff-arm.lo 	coff-aux.lo 	coff-h8300.lo 	coff-h8500.lo 	coff-i386.lo 	coff-go32.lo 	coff-i860.lo 	coff-i960.lo 	coff-m68k.lo 	coff-m88k.lo 	coff-mips.lo 	coff-or32.lo 	coff-rs6000.lo 	coff-sh.lo 	coff-sparc.lo 	coff-stgo32.lo 	coff-svm68k.lo 	coff-tic30.lo 	coff-tic4x.lo 	coff-tic54x.lo 	coff-tic80.lo 	coff-u68k.lo 	coff-we32k.lo 	coff-w65.lo 	coff-z8k.lo 	cofflink.lo 	dwarf1.lo 	ecoff.lo 	ecofflink.lo 	efi-app-ia32.lo 	elf.lo 	elf32-arc.lo 	elfarm-oabi.lo 	elfarm-nabi.lo 	elfarmqnx-nabi.lo 	elf32-avr.lo 	elf32-cris.lo 	elf32-d10v.lo 	elf32-d30v.lo 	elf32-dlx.lo 	elf32-fr30.lo 	elf32-frv.lo 	elf32-gen.lo 	elf32-h8300.lo 	elf32-hppa.lo 	elf32-i370.lo 	elf32-i386.lo 	elf32-i386qnx.lo 	elf32-i860.lo 	elf32-i960.lo 	elf32-ia64.lo 	elf32-ip2k.lo 	elf32
-m32r.lo 	elf32-m68hc11.lo 	elf32-m68hc12.lo 	elf32-m68k.lo 	elf32-m88k.lo 	elf-m10200.lo 	elf-m10300.lo 	elf32-mcore.lo 	elfxx-mips.lo 	elf32-mips.lo 	elf32-openrisc.lo 	elf32-or32.lo 	elf32-pj.lo 	elf32-ppc.lo 	elf32-ppcqnx.lo 	elf32-s390.lo 	elf32-sh.lo 	elf32-sh-lin.lo 	elf32-sh64.lo 	elf32-sh64-com.lo 	elf32-sh-nbsd.lo 	elf32-sh64-nbsd.lo 	elf32-shqnx.lo 	elf32-sparc.lo 	elf32-v850.lo 	elf32-vax.lo 	elf32-xstormy16.lo 	elf32.lo 	elflink.lo 	elf-strtab.lo 	elf-eh-frame.lo 	epoc-pe-arm.lo 	epoc-pei-arm.lo 	hp300bsd.lo 	hp300hpux.lo 	som.lo 	i386aout.lo 	i386bsd.lo 	i386dynix.lo 	i386freebsd.lo 	i386linux.lo 	i386lynx.lo 	i386msdos.lo 	i386netbsd.lo 	i386mach3.lo 	i386os9k.lo 	ieee.lo 	m68k4knetbsd.lo 	m68klinux.lo 	m68klynx.lo 	m68knetbsd.lo 	m88kmach3.lo 	mipsbsd.lo 	newsos3.lo 	nlm.lo 	nlm32-i386.lo 	nlm32-sparc.lo 	nlm32-ppc.lo 	nlm32.lo 	ns32knetbsd.lo 	oasys.lo 	pc532-mach.lo 	pdp11.lo 	pe-arm.lo 	pei-arm.lo 	pe-i386.lo 	pei-i386.lo 	pe-mcore.lo 	pei-mcore.lo 	pe-ppc.lo 	pei-
 ppc.lo 	pe-sh.lo 	pei-sh.lo 	pe-mips.lo 	pei-mips.lo 	peigen.lo 	ppcboot.lo 	reloc16.lo 	riscix.lo 	sparclinux.lo 	sparclynx.lo 	sparcnetbsd.lo 	sunos.lo 	vaxnetbsd.lo 	vax1knetbsd.lo 	vaxbsd.lo 	versados.lo 	vms.lo 	vms-gsd.lo 	vms-hdr.lo 	vms-misc.lo 	vms-tir.lo 	xcofflink.lo
++
++
++BFD32_BACKENDS_CFILES =  	aout-adobe.c 	aout-arm.c 	aout-cris.c 	aout-ns32k.c 	aout-sparcle.c 	aout-tic30.c 	aout0.c 	aout32.c 	armnetbsd.c 	bout.c 	cf-i386lynx.c 	cf-m68klynx.c 	cf-sparclynx.c 	coff-a29k.c 	coff-apollo.c 	coff-arm.c 	coff-aux.c 	coff-h8300.c 	coff-h8500.c 	coff-i386.c 	coff-i860.c 	coff-go32.c 	coff-i960.c 	coff-m68k.c 	coff-m88k.c 	coff-mips.c 	coff-or32.c 	coff-rs6000.c 	coff-sh.c 	coff-sparc.c 	coff-stgo32.c 	coff-svm68k.c 	coff-tic30.c 	coff-tic4x.c 	coff-tic54x.c 	coff-tic80.c 	coff-u68k.c 	coff-we32k.c 	coff-w65.c 	coff-z8k.c 	cofflink.c 	dwarf1.c 	ecoff.c 	ecofflink.c 	efi-app-ia32.c 	elf.c 	elf32-arc.c 	elfarm-oabi.c 	elfarm-nabi.c 	elfarmqnx-nabi.c 	elf32-avr.c 	elf32-cris.c 	elf32-d10v.c 	elf32-d30v.c 	elf32-dlx.c 	elf32-fr30.c 	elf32-frv.c 	elf32-gen.c 	elf32-h8300.c 	elf32-hppa.c 	elf32-i370.c 	elf32-i386.c 	elf32-i386qnx.c 	elf32-i860.c 	elf32-i960.c 	elf32-ip2k.c 	elf32-m32r.c 	elf32-m68k.c 	elf32-m68hc11.c 	elf32-m68hc12.c 	elf32-m88k.c 	elf
-m10200.c 	elf-m10300.c 	elf32-mcore.c 	elfxx-mips.c 	elf32-mips.c 	elf32-openrisc.c 	elf32-or32.c 	elf32-pj.c 	elf32-ppc.c 	elf32-ppcqnx.c 	elf32-sh64.c 	elf32-sh64-com.c 	elf32-s390.c 	elf32-sh.c 	elf32-sh-lin.c 	elf32-sh-nbsd.c 	elf32-sh64-nbsd.c 	elf32-shqnx.c 	elf32-sparc.c 	elf32-v850.c 	elf32-vax.c 	elf32-xstormy16.c 	elf32.c 	elflink.c 	elf-strtab.c 	elf-eh-frame.c 	epoc-pe-arm.c 	epoc-pei-arm.c 	hp300bsd.c 	hp300hpux.c 	som.c 	i386aout.c 	i386bsd.c 	i386dynix.c 	i386freebsd.c 	i386linux.c 	i386lynx.c 	i386msdos.c 	i386netbsd.c 	i386mach3.c 	i386os9k.c 	ieee.c 	m68k4knetbsd.c 	m68klinux.c 	m68klynx.c 	m68knetbsd.c 	m88kmach3.c 	mipsbsd.c 	newsos3.c 	nlm.c 	nlm32-i386.c 	nlm32-sparc.c 	nlm32-ppc.c 	nlm32.c 	ns32knetbsd.c 	oasys.c 	pc532-mach.c 	pdp11.c 	pe-arm.c 	pei-arm.c 	pe-i386.c 	pei-i386.c 	pe-mcore.c 	pei-mcore.c 	pe-ppc.c 	pei-ppc.c 	pe-sh.c 	pei-sh.c 	pe-mips.c 	pei-mips.c 	ppcboot.c 	reloc16.c 	riscix.c 	sparclinux.c 	sparclynx.c 	sparcnetbsd.c 	sunos.c 	vaxnetbsd.c 
 	vax1knetbsd.c 	vaxbsd.c 	versados.c 	vms.c 	vms-gsd.c 	vms-hdr.c 	vms-misc.c 	vms-tir.c 	xcofflink.c
+ 
+ 
+ # The .o files needed by all of the 64 bit vectors that are configured into
+ # target_vector in targets.c if configured with --enable-targets=all
+ # and --enable-64-bit-bfd.
+-BFD64_BACKENDS = \
+-	aix5ppc-core.lo \
+-	aout64.lo \
+-	coff-alpha.lo \
+-	coff64-rs6000.lo \
+-	demo64.lo \
+-	efi-app-ia64.lo \
+-	elf64-x86-64.lo \
+-	elf64-alpha.lo \
+-	elf64-hppa.lo \
+-	elf64-ia64.lo \
+-	elf64-gen.lo \
+-	elfn32-mips.lo \
+-	elf64-mips.lo \
+-	elf64-mmix.lo \
+-	elf64-sh64.lo \
+-	elf64-sh64-nbsd.lo \
+-	elf64-ppc.lo \
+-	elf64-s390.lo \
+-	elf64-sparc.lo \
+-	elf64.lo \
+-	mmo.lo \
+-	nlm32-alpha.lo \
+-	nlm64.lo \
+-	pepigen.lo
+-
+-
+-BFD64_BACKENDS_CFILES = \
+-	aix5ppc-core.c \
+-	aout64.c \
+-	coff-alpha.c \
+-	coff64-rs6000.c \
+-	demo64.c \
+-	efi-app-ia64.c \
+-	elf64-x86-64.c \
+-	elf64-alpha.c \
+-	elf64-hppa.c \
+-	elf64-gen.c \
+-	elfn32-mips.c \
+-	elf64-mips.c \
+-	elf64-mmix.c \
+-	elf64-ppc.c \
+-	elf64-s390.c \
+-	elf64-sh64.c \
+-	elf64-sh64-nbsd.c \
+-	elf64-sparc.c \
+-	elf64.c \
+-	mmo.c \
+-	nlm32-alpha.c \
+-	nlm64.c
+-
+-
+-OPTIONAL_BACKENDS = \
+-	aix386-core.lo \
+-	hpux-core.lo \
+-	irix-core.lo \
+-	lynx-core.lo \
+-	osf-core.lo \
+-	sco5-core.lo \
+-	trad-core.lo \
+-	cisco-core.lo
+-
+-
+-OPTIONAL_BACKENDS_CFILES = \
+-	aix386-core.c \
+-	hpux-core.c \
+-	irix-core.c \
+-	lynx-core.c \
+-	osf-core.c \
+-	sco5-core.c \
+-	trad-core.c \
+-	cisco-core.c
++BFD64_BACKENDS =  	aix5ppc-core.lo 	aout64.lo 	coff-alpha.lo 	coff64-rs6000.lo 	demo64.lo 	efi-app-ia64.lo 	elf64-x86-64.lo 	elf64-alpha.lo 	elf64-hppa.lo 	elf64-ia64.lo 	elf64-gen.lo 	elfn32-mips.lo 	elf64-mips.lo 	elf64-mmix.lo 	elf64-sh64.lo 	elf64-sh64-nbsd.lo 	elf64-ppc.lo 	elf64-s390.lo 	elf64-sparc.lo 	elf64.lo 	mmo.lo 	nlm32-alpha.lo 	nlm64.lo 	pepigen.lo
++
++
++BFD64_BACKENDS_CFILES =  	aix5ppc-core.c 	aout64.c 	coff-alpha.c 	coff64-rs6000.c 	demo64.c 	efi-app-ia64.c 	elf64-x86-64.c 	elf64-alpha.c 	elf64-hppa.c 	elf64-gen.c 	elfn32-mips.c 	elf64-mips.c 	elf64-mmix.c 	elf64-ppc.c 	elf64-s390.c 	elf64-sh64.c 	elf64-sh64-nbsd.c 	elf64-sparc.c 	elf64.c 	mmo.c 	nlm32-alpha.c 	nlm64.c
++
++
++OPTIONAL_BACKENDS =  	aix386-core.lo 	hpux-core.lo 	irix-core.lo 	lynx-core.lo 	osf-core.lo 	sco5-core.lo 	trad-core.lo 	cisco-core.lo
++
++
++OPTIONAL_BACKENDS_CFILES =  	aix386-core.c 	hpux-core.c 	irix-core.c 	lynx-core.c 	osf-core.c 	sco5-core.c 	trad-core.c 	cisco-core.c
+ 
+ 
+ # These are defined by configure.in:
+@@ -693,33 +203,18 @@ TDEFAULTS = @tdefaults@
+ INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+ 
+ # C source files that correspond to .o's.
+-SOURCE_CFILES = \
+-	$(BFD32_LIBS_CFILES) \
+-	$(BFD64_LIBS_CFILES) \
+-	$(ALL_MACHINES_CFILES) \
+-	$(BFD32_BACKENDS_CFILES) \
+-	$(BFD64_BACKENDS_CFILES) \
+-	$(OPTIONAL_BACKENDS_CFILES)
++SOURCE_CFILES =  	$(BFD32_LIBS_CFILES) 	$(BFD64_LIBS_CFILES) 	$(ALL_MACHINES_CFILES) 	$(BFD32_BACKENDS_CFILES) 	$(BFD64_BACKENDS_CFILES) 	$(OPTIONAL_BACKENDS_CFILES)
+ 
+ 
+-BUILD_CFILES = \
+-	elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
++BUILD_CFILES =  	elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+ 
+ 
+ CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
+ 
+-SOURCE_HFILES = \
+-	aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h \
+-	elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h \
+-	elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
+-	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
+-	libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
+-	nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
+-	xcoff-target.h version.h
++SOURCE_HFILES =  	aout-target.h aoutf1.h aoutx.h coffcode.h coffswap.h ecoffswap.h 	elf-bfd.h elf-hppa.h elf32-arm.h elf32-hppa.h elf64-hppa.h 	elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h 	libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h 	nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h 	xcoff-target.h version.h
+ 
+ 
+-BUILD_HFILES = \
+-	elf32-target.h elf64-target.h targmatch.h
++BUILD_HFILES =  	elf32-target.h elf64-target.h targmatch.h
+ 
+ 
+ HFILES = $(SOURCE_HFILES) $(BUILD_HFILES)
+@@ -749,8 +244,7 @@ libbfd_a_SOURCES = 
+ BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
+ LOCAL_H_DEPS = libbfd.h sysdep.h config.h
+ 
+-BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
+-	reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
++BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c 	reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+ 
+ BFD64_H_FILES = archive64.c
+ LIBBFD_H_FILES = libbfd-in.h init.c libbfd.c cache.c reloc.c archures.c elf.c
+@@ -758,8 +252,7 @@ LIBCOFF_H_FILES = libcoff-in.h coffcode.
+ 
+ MOSTLYCLEANFILES = ofiles stamp-ofiles
+ 
+-CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
+-	stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
++CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib 	stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
+ 
+ 
+ DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+@@ -1267,8 +760,8 @@ install_libbfd: $(bfdlib_LTLIBRARIES) $(
+ 	$(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
+ 	@list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 	$(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(bfdincludedir)/bfd.h
diff --git a/gdb5/patches/patch-ad b/gdb5/patches/patch-ad
new file mode 100644
index 0000000000..2ec21c2687
--- /dev/null
+++ b/gdb5/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- etc/Makefile.in.orig	2002-01-26 21:35:45.000000000 +0000
++++ etc/Makefile.in
+@@ -67,20 +67,8 @@ info:
+ 	  fi; \
+ 	done
+ 
+-install-info: info
+-	$(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
+-	if test ! -f standards.info; then cd $(srcdir); fi; \
+-	if test -f standards.info; then \
+-	  for i in standards.info*; do \
+-	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
+-	  done; \
+-	fi
+-	if test ! -f configure.info; then cd $(srcdir); fi; \
+-	if test -f configure.info; then \
+-	  for i in configure.info*; do \
+-	    $(INSTALL_DATA) $$i $(infodir)/$$i; \
+-	  done; \
+-	fi
++install-info:
++	true
+ 
+ dvi:
+ 	for f in $(DVIFILES); do \
diff --git a/gdb5/patches/patch-ae b/gdb5/patches/patch-ae
new file mode 100644
index 0000000000..652ebae5f4
--- /dev/null
+++ b/gdb5/patches/patch-ae
@@ -0,0 +1,15 @@
+$NetBSD: patch-ae,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- opcodes/Makefile.am.orig	2002-08-28 10:38:50.000000000 +0000
++++ opcodes/Makefile.am
+@@ -312,8 +312,8 @@ install_libopcodes: $(bfdlib_LTLIBRARIES
+ 	$(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
+ 	@list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 	$(INSTALL_DATA) $(INCDIR)/dis-asm.h $(DESTDIR)$(bfdincludedir)/dis-asm.h
diff --git a/gdb5/patches/patch-af b/gdb5/patches/patch-af
new file mode 100644
index 0000000000..1067ee0dc7
--- /dev/null
+++ b/gdb5/patches/patch-af
@@ -0,0 +1,318 @@
+$NetBSD: patch-af,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- opcodes/Makefile.in.orig	2003-03-10 21:25:02.000000000 +0000
++++ opcodes/Makefile.in
+@@ -133,244 +133,14 @@ BFD_H = ../bfd/bfd.h
+ LIBIBERTY = ../libiberty/libiberty.a
+ 
+ # Header files.
+-HFILES = \
+-	arm-opc.h \
+-	fr30-desc.h fr30-opc.h \
+-	frv-desc.h frv-opc.h \
+-	h8500-opc.h \
+-	ia64-asmtab.h \
+-	ia64-opc.h \
+-	ip2k-desc.h ip2k-opc.h \
+-	m32r-desc.h m32r-opc.h \
+-	mcore-opc.h \
+-	openrisc-desc.h openrisc-opc.h \
+-	sh-opc.h \
+-	sh64-opc.h \
+-	sysdep.h \
+-	w65-opc.h \
+-	xstormy16-desc.h xstormy16-opc.h \
+-	z8k-opc.h
++HFILES =  	arm-opc.h 	fr30-desc.h fr30-opc.h 	frv-desc.h frv-opc.h 	h8500-opc.h 	ia64-asmtab.h 	ia64-opc.h 	ip2k-desc.h ip2k-opc.h 	m32r-desc.h m32r-opc.h 	mcore-opc.h 	openrisc-desc.h openrisc-opc.h 	sh-opc.h 	sh64-opc.h 	sysdep.h 	w65-opc.h 	xstormy16-desc.h xstormy16-opc.h 	z8k-opc.h
+ 
+ 
+ # C source files that correspond to .o's.
+-CFILES = \
+-	a29k-dis.c \
+-	alpha-dis.c \
+-	alpha-opc.c \
+-	arc-dis.c \
+-	arc-opc.c \
+-	arc-ext.c \
+-	arm-dis.c \
+-	avr-dis.c \
+-	cgen-asm.c \
+-	cgen-dis.c \
+-	cgen-opc.c \
+-	cris-dis.c \
+-	cris-opc.c \
+-	d10v-dis.c \
+-	d10v-opc.c \
+-	d30v-dis.c \
+-	d30v-opc.c \
+-	dlx-dis.c \
+-	dis-buf.c \
+-	disassemble.c \
+-	fr30-asm.c \
+-	fr30-desc.c \
+-	fr30-dis.c \
+-	fr30-ibld.c \
+-	fr30-opc.c \
+-	frv-asm.c \
+-	frv-desc.c \
+-	frv-dis.c \
+-	frv-ibld.c \
+-	frv-opc.c \
+-	h8300-dis.c \
+-	h8500-dis.c \
+-	hppa-dis.c \
+-	i370-dis.c \
+-	i370-opc.c \
+-	i386-dis.c \
+-	i860-dis.c \
+-	i960-dis.c \
+-	ia64-dis.c \
+-	ia64-opc-a.c \
+-	ia64-opc-b.c \
+-	ia64-opc-f.c \
+-	ia64-opc-i.c \
+-	ia64-opc-m.c \
+-	ia64-opc-d.c \
+-	ia64-opc.c \
+-	ia64-gen.c \
+-	ia64-asmtab.c \
+-	ip2k-asm.c \
+-	ip2k-desc.c \
+-	ip2k-dis.c \
+-	ip2k-ibld.c \
+-	ip2k-opc.c \
+-	m32r-asm.c \
+-	m32r-desc.c \
+-	m32r-dis.c \
+-	m32r-ibld.c \
+-	m32r-opc.c \
+-	m32r-opinst.c \
+-	m68hc11-dis.c \
+-	m68hc11-opc.c \
+-	m68k-dis.c \
+-	m68k-opc.c \
+-	m88k-dis.c \
+-	mcore-dis.c \
+-	mips-dis.c \
+-	mips-opc.c \
+-	mips16-opc.c \
+-	m10200-dis.c \
+-	m10200-opc.c \
+-	m10300-dis.c \
+-	m10300-opc.c \
+-	mmix-dis.c \
+-	mmix-opc.c \
+-	ns32k-dis.c \
+-	openrisc-asm.c \
+-	openrisc-desc.c \
+-	openrisc-dis.c \
+-	openrisc-ibld.c \
+-	openrisc-opc.c \
+-	or32-dis.c \
+-	or32-opc.c \
+-	pdp11-dis.c \
+-	pdp11-opc.c \
+-	pj-dis.c \
+-	pj-opc.c \
+-	ppc-dis.c \
+-	ppc-opc.c \
+-	s390-mkopc.c \
+-	s390-opc.c \
+-	s390-dis.c \
+-	sh-dis.c \
+-	sh64-dis.c \
+-	sh64-opc.c \
+-	sparc-dis.c \
+-	sparc-opc.c \
+-	tic30-dis.c \
+-	tic4x-dis.c \
+-	tic54x-dis.c \
+-	tic54x-opc.c \
+-	tic80-dis.c \
+-	tic80-opc.c \
+-	v850-dis.c \
+-	v850-opc.c \
+-	vax-dis.c \
+-	w65-dis.c \
+-	xstormy16-asm.c \
+-	xstormy16-desc.c \
+-	xstormy16-dis.c \
+-	xstormy16-ibld.c \
+-	xstormy16-opc.c \
+-	z8k-dis.c \
+-	z8kgen.c
+-
+-
+-ALL_MACHINES = \
+-	a29k-dis.lo \
+-	alpha-dis.lo \
+-	alpha-opc.lo \
+-	arc-dis.lo \
+-	arc-opc.lo \
+-	arc-ext.lo \
+-	arm-dis.lo \
+-	avr-dis.lo \
+-	cgen-asm.lo \
+-	cgen-dis.lo \
+-	cgen-opc.lo \
+-	cris-dis.lo \
+-	cris-opc.lo \
+-	d10v-dis.lo \
+-	d10v-opc.lo \
+-	d30v-dis.lo \
+-	d30v-opc.lo \
+-	dlx-dis.lo \
+-	fr30-asm.lo \
+-	fr30-desc.lo \
+-	fr30-dis.lo \
+-	fr30-ibld.lo \
+-	fr30-opc.lo \
+-	frv-asm.lo \
+-	frv-desc.lo \
+-	frv-dis.lo \
+-	frv-ibld.lo \
+-	frv-opc.lo \
+-	h8300-dis.lo \
+-	h8500-dis.lo \
+-	hppa-dis.lo \
+-	i386-dis.lo \
+-	i370-dis.lo \
+-	i370-opc.lo \
+-	i860-dis.lo \
+-	i960-dis.lo \
+-	ia64-dis.lo \
+-	ia64-opc.lo \
+-	ip2k-asm.lo \
+-	ip2k-desc.lo \
+-	ip2k-dis.lo \
+-	ip2k-ibld.lo \
+-	ip2k-opc.lo \
+-	m32r-asm.lo \
+-	m32r-desc.lo \
+-	m32r-dis.lo \
+-	m32r-ibld.lo \
+-	m32r-opc.lo \
+-	m32r-opinst.lo \
+-	m68hc11-dis.lo \
+-	m68hc11-opc.lo \
+-	m68k-dis.lo \
+-	m68k-opc.lo \
+-	m88k-dis.lo \
+-	m10200-dis.lo \
+-	m10200-opc.lo \
+-	m10300-dis.lo \
+-	m10300-opc.lo \
+-	mcore-dis.lo \
+-	mips-dis.lo \
+-	mips-opc.lo \
+-	mips16-opc.lo \
+-	mmix-dis.lo \
+-	mmix-opc.lo \
+-	ns32k-dis.lo \
+-	openrisc-asm.lo \
+-	openrisc-desc.lo \
+-	openrisc-dis.lo \
+-	openrisc-ibld.lo \
+-	openrisc-opc.lo \
+-	or32-dis.lo \
+-	or32-opc.lo \
+-	pdp11-dis.lo \
+-	pdp11-opc.lo \
+-	pj-dis.lo \
+-	pj-opc.lo \
+-	ppc-dis.lo \
+-	ppc-opc.lo \
+-	s390-dis.lo \
+-	s390-opc.lo \
+-	sh-dis.lo \
+-	sh64-dis.lo \
+-	sh64-opc.lo \
+-	sparc-dis.lo \
+-	sparc-opc.lo \
+-	tic30-dis.lo \
+-	tic4x-dis.lo \
+-	tic54x-dis.lo \
+-	tic54x-opc.lo \
+-	tic80-dis.lo \
+-	tic80-opc.lo \
+-	v850-dis.lo \
+-	v850-opc.lo \
+-	vax-dis.lo \
+-	w65-dis.lo \
+-	xstormy16-asm.lo \
+-	xstormy16-desc.lo \
+-	xstormy16-dis.lo \
+-	xstormy16-ibld.lo \
+-	xstormy16-opc.lo \
+-	z8k-dis.lo
++CFILES =  	a29k-dis.c 	alpha-dis.c 	alpha-opc.c 	arc-dis.c 	arc-opc.c 	arc-ext.c 	arm-dis.c 	avr-dis.c 	cgen-asm.c 	cgen-dis.c 	cgen-opc.c 	cris-dis.c 	cris-opc.c 	d10v-dis.c 	d10v-opc.c 	d30v-dis.c 	d30v-opc.c 	dlx-dis.c 	dis-buf.c 	disassemble.c 	fr30-asm.c 	fr30-desc.c 	fr30-dis.c 	fr30-ibld.c 	fr30-opc.c 	frv-asm.c 	frv-desc.c 	frv-dis.c 	frv-ibld.c 	frv-opc.c 	h8300-dis.c 	h8500-dis.c 	hppa-dis.c 	i370-dis.c 	i370-opc.c 	i386-dis.c 	i860-dis.c 	i960-dis.c 	ia64-dis.c 	ia64-opc-a.c 	ia64-opc-b.c 	ia64-opc-f.c 	ia64-opc-i.c 	ia64-opc-m.c 	ia64-opc-d.c 	ia64-opc.c 	ia64-gen.c 	ia64-asmtab.c 	ip2k-asm.c 	ip2k-desc.c 	ip2k-dis.c 	ip2k-ibld.c 	ip2k-opc.c 	m32r-asm.c 	m32r-desc.c 	m32r-dis.c 	m32r-ibld.c 	m32r-opc.c 	m32r-opinst.c 	m68hc11-dis.c 	m68hc11-opc.c 	m68k-dis.c 	m68k-opc.c 	m88k-dis.c 	mcore-dis.c 	mips-dis.c 	mips-opc.c 	mips16-opc.c 	m10200-dis.c 	m10200-opc.c 	m10300-dis.c 	m10300-opc.c 	mmix-dis.c 	mmix-opc.c 	ns32k-dis.c 	openrisc-asm.c 	openrisc-desc.c 	openr
isc-dis.c 	openrisc-ibld.c 	openrisc-opc.c 	or32-dis.c 	or32-opc.c 	pdp11-dis.c 	pdp11-opc.c 	pj-dis.c 	pj-opc.c 	ppc-dis.c 	ppc-opc.c 	s390-mkopc.c 	s390-opc.c 	s390-dis.c 	sh-dis.c 	sh64-dis.c 	sh64-opc.c 	sparc-dis.c 	sparc-opc.c 	tic30-dis.c 	tic4x-dis.c 	tic54x-dis.c 	tic54x-opc.c 	tic80-dis.c 	tic80-opc.c 	v850-dis.c 	v850-opc.c 	vax-dis.c 	w65-dis.c 	xstormy16-asm.c 	xstormy16-desc.c 	xstormy16-dis.c 	xstormy16-ibld.c 	xstormy16-opc.c 	z8k-dis.c 	z8kgen.c
++
++
++ALL_MACHINES =  	a29k-dis.lo 	alpha-dis.lo 	alpha-opc.lo 	arc-dis.lo 	arc-opc.lo 	arc-ext.lo 	arm-dis.lo 	avr-dis.lo 	cgen-asm.lo 	cgen-dis.lo 	cgen-opc.lo 	cris-dis.lo 	cris-opc.lo 	d10v-dis.lo 	d10v-opc.lo 	d30v-dis.lo 	d30v-opc.lo 	dlx-dis.lo 	fr30-asm.lo 	fr30-desc.lo 	fr30-dis.lo 	fr30-ibld.lo 	fr30-opc.lo 	frv-asm.lo 	frv-desc.lo 	frv-dis.lo 	frv-ibld.lo 	frv-opc.lo 	h8300-dis.lo 	h8500-dis.lo 	hppa-dis.lo 	i386-dis.lo 	i370-dis.lo 	i370-opc.lo 	i860-dis.lo 	i960-dis.lo 	ia64-dis.lo 	ia64-opc.lo 	ip2k-asm.lo 	ip2k-desc.lo 	ip2k-dis.lo 	ip2k-ibld.lo 	ip2k-opc.lo 	m32r-asm.lo 	m32r-desc.lo 	m32r-dis.lo 	m32r-ibld.lo 	m32r-opc.lo 	m32r-opinst.lo 	m68hc11-dis.lo 	m68hc11-opc.lo 	m68k-dis.lo 	m68k-opc.lo 	m88k-dis.lo 	m10200-dis.lo 	m10200-opc.lo 	m10300-dis.lo 	m10300-opc.lo 	mcore-dis.lo 	mips-dis.lo 	mips-opc.lo 	mips16-opc.lo 	mmix-dis.lo 	mmix-opc.lo 	ns32k-dis.lo 	openrisc-asm.lo 	openrisc-desc.lo 	openrisc-dis.lo 	openrisc-ibld.lo 	openrisc-opc.lo 	or32-dis.lo 	or32
-opc.lo 	pdp11-dis.lo 	pdp11-opc.lo 	pj-dis.lo 	pj-opc.lo 	ppc-dis.lo 	ppc-opc.lo 	s390-dis.lo 	s390-opc.lo 	sh-dis.lo 	sh64-dis.lo 	sh64-opc.lo 	sparc-dis.lo 	sparc-opc.lo 	tic30-dis.lo 	tic4x-dis.lo 	tic54x-dis.lo 	tic54x-opc.lo 	tic80-dis.lo 	tic80-opc.lo 	v850-dis.lo 	v850-opc.lo 	vax-dis.lo 	w65-dis.lo 	xstormy16-asm.lo 	xstormy16-desc.lo 	xstormy16-dis.lo 	xstormy16-ibld.lo 	xstormy16-opc.lo 	z8k-dis.lo
+ 
+ 
+ OFILES = @BFD_MACHINES@
+@@ -391,10 +161,7 @@ noinst_LIBRARIES = libopcodes.a
+ 
+ POTFILES = $(HFILES) $(CFILES)
+ 
+-CLEANFILES = \
+-	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc \
+-	stamp-xstormy16 \
+-	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
++CLEANFILES =  	stamp-ip2k stamp-m32r stamp-fr30 stamp-frv stamp-openrisc 	stamp-xstormy16 	libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
+ 
+ 
+ CGENDIR = @cgendir@
+@@ -402,24 +169,19 @@ CPUDIR = $(CGENDIR)/cpu
+ CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
+ CGENFLAGS = -v
+ 
+-CGENDEPS = \
+-	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm \
+-	$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm \
+-	$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm \
+-	$(CGENDIR)/opc-opinst.scm \
+-	cgen-asm.in cgen-dis.in cgen-ibld.in
++CGENDEPS =  	$(CGENDIR)/desc.scm $(CGENDIR)/desc-cpu.scm 	$(CGENDIR)/opcodes.scm $(CGENDIR)/opc-asmdis.scm 	$(CGENDIR)/opc-ibld.scm $(CGENDIR)/opc-itab.scm 	$(CGENDIR)/opc-opinst.scm 	cgen-asm.in cgen-dis.in cgen-ibld.in
+ 
+-@CGEN_MAINT_TRUE@IP2K_DEPS = @CGEN_MAINT_TRUE@stamp-ip2k
++@CGEN_MAINT_TRUE@IP2K_DEPS = stamp-ip2k
+ @CGEN_MAINT_FALSE@IP2K_DEPS = 
+-@CGEN_MAINT_TRUE@M32R_DEPS = @CGEN_MAINT_TRUE@stamp-m32r
++@CGEN_MAINT_TRUE@M32R_DEPS = stamp-m32r
+ @CGEN_MAINT_FALSE@M32R_DEPS = 
+-@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
++@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
+ @CGEN_MAINT_FALSE@FR30_DEPS = 
+-@CGEN_MAINT_TRUE@FRV_DEPS = @CGEN_MAINT_TRUE@stamp-frv
++@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
+ @CGEN_MAINT_FALSE@FRV_DEPS = 
+-@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
++@CGEN_MAINT_TRUE@OPENRISC_DEPS = stamp-openrisc
+ @CGEN_MAINT_FALSE@OPENRISC_DEPS = 
+-@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
++@CGEN_MAINT_TRUE@XSTORMY16_DEPS = stamp-xstormy16
+ @CGEN_MAINT_FALSE@XSTORMY16_DEPS = 
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+@@ -449,7 +211,7 @@ acinclude.m4 aclocal.m4 config.in config
+ 
+ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+ 
+-TAR = gtar
++TAR = tar
+ GZIP_ENV = --best
+ SOURCES = libopcodes.a.c $(libopcodes_la_SOURCES)
+ OBJECTS = libopcodes.a.$(OBJEXT) $(libopcodes_la_OBJECTS)
+@@ -842,8 +604,8 @@ install_libopcodes: $(bfdlib_LTLIBRARIES
+ 	$(mkinstalldirs) $(DESTDIR)$(bfdincludedir)
+ 	@list='$(bfdlib_LTLIBRARIES)'; for p in $$list; do \
+ 	  if test -f $$p; then \
+-	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
+-	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
++	    echo "$(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p"; \
++	    $(LIBTOOL)  --mode=install $(INSTALL_DATA) $$p $(DESTDIR)$(bfdlibdir)/$$p; \
+ 	  else :; fi; \
+ 	done
+ 	$(INSTALL_DATA) $(INCDIR)/dis-asm.h $(DESTDIR)$(bfdincludedir)/dis-asm.h
diff --git a/gdb5/patches/patch-ag b/gdb5/patches/patch-ag
new file mode 100644
index 0000000000..7f91e7b76b
--- /dev/null
+++ b/gdb5/patches/patch-ag
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- sim/ppc/ppc-instructions.orig	2002-03-23 22:18:31.000000000 +0100
++++ sim/ppc/ppc-instructions
+@@ -1218,6 +1218,7 @@ void::function::convert_to_integer:cpu *
+ 	  }
+ 	/**/
+ 	LABEL(Done):
++	(void)0; /* Dirty workaround to solve problems under gcc 3.4.1 */
+ 
+ 
+ # extract out raw fields of a FP number
diff --git a/gdb5/patches/patch-ah b/gdb5/patches/patch-ah
new file mode 100644
index 0000000000..b00ced643d
--- /dev/null
+++ b/gdb5/patches/patch-ah
@@ -0,0 +1,21 @@
+$NetBSD: patch-ah,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- bfd/configure.orig	2006-02-27 14:42:54.000000000 +0000
++++ bfd/configure
+@@ -5104,7 +5104,7 @@ if test "${target}" = "${host}"; then
+ 	COREFILE=trad-core.lo
+ 	TRAD_HEADER='"hosts/i386bsd.h"'
+ 	;;
+-  i[3456]86-*-freebsd*)
++  i[3456]86-*-freebsd* | i[3456]86-*-dragonfly*)
+ 	COREFILE=''
+ 	TRAD_HEADER='"hosts/i386bsd.h"'
+ 	;;
+@@ -6180,6 +6180,7 @@ do
+     i386coff_vec)		tb="$tb coff-i386.lo cofflink.lo" ;;
+     i386dynix_vec)		tb="$tb i386dynix.lo aout32.lo" ;;
+     i386freebsd_vec)		tb="$tb i386freebsd.lo aout32.lo" ;;
++    i386dragonfly_vec)		tb="$tb i386freebsd.lo aout32.lo" ;;
+     i386linux_vec)		tb="$tb i386linux.lo aout32.lo" ;;
+     i386lynx_aout_vec)		tb="$tb i386lynx.lo lynx-core.lo aout32.lo" ;;
+     i386lynx_coff_vec)		tb="$tb cf-i386lynx.lo cofflink.lo lynx-core.lo" ;;
diff --git a/gdb5/patches/patch-ai b/gdb5/patches/patch-ai
new file mode 100644
index 0000000000..df497c6346
--- /dev/null
+++ b/gdb5/patches/patch-ai
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- bfd/config.bfd.orig	2002-09-05 20:34:35.000000000 +0000
++++ bfd/config.bfd
+@@ -398,7 +398,7 @@ case "${targ}" in
+     targ_selvecs=i386bsd_vec
+     targ_underscore=yes
+     ;;
+-  i[3456]86-*-freebsd*)
++  i[3456]86-*-freebsd* | i[3456]86-*-dragonfly*)
+     targ_defvec=bfd_elf32_i386_vec
+     targ_selvecs=i386coff_vec
+     ;;
diff --git a/gdb5/patches/patch-aj b/gdb5/patches/patch-aj
new file mode 100644
index 0000000000..e6fd029c60
--- /dev/null
+++ b/gdb5/patches/patch-aj
@@ -0,0 +1,12 @@
+$NetBSD: patch-aj,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/configure.host.orig	2006-02-27 14:49:37.000000000 +0000
++++ gdb/configure.host
+@@ -58,6 +58,7 @@ i[3456]86-sequent-sysv*) gdb_host=ptx ;;
+ i[3456]86-*-bsd*)	gdb_host=i386bsd ;;
+ i[3456]86-*-dgux*)	gdb_host=i386dgux ;;
+ i[3456]86-*-freebsd*)	gdb_host=fbsd ;;
++i[3456]86-*-dragonfly*)	gdb_host=fbsd ;;
+ i[3456]86-*-netbsdelf*)	gdb_host=nbsdelf ;;
+ i[3456]86-*-netbsdaout*) gdb_host=nbsdaout ;;
+ i[3456]86-*-netbsd*)	gdb_host=nbsdaout ;;
diff --git a/gdb5/patches/patch-ak b/gdb5/patches/patch-ak
new file mode 100644
index 0000000000..f2d785b314
--- /dev/null
+++ b/gdb5/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/configure.tgt.orig	2006-02-27 14:50:06.000000000 +0000
++++ gdb/configure.tgt
+@@ -92,6 +92,7 @@ i[3456]86-ncr-*)	gdb_target=ncr3000 ;;
+ # OBSOLETE i[3456]86-*-aix*)	gdb_target=i386aix ;;
+ i[3456]86-*-bsd*)	gdb_target=i386bsd ;;
+ i[3456]86-*-freebsd*)	gdb_target=fbsd ;;
++i[3456]86-*-dragonfly*)	gdb_target=fbsd ;;
+ i[3456]86-*-netbsd*)	gdb_target=nbsd ;;
+ i[3456]86-*-openbsd*)	gdb_target=obsd ;;
+ # OBSOLETE i[3456]86-*-os9k)	gdb_target=i386os9k ;;
diff --git a/gdb5/patches/patch-al b/gdb5/patches/patch-al
new file mode 100644
index 0000000000..e21355fcc8
--- /dev/null
+++ b/gdb5/patches/patch-al
@@ -0,0 +1,13 @@
+$NetBSD: patch-al,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/rdi-share/unixcomm.c.orig	2006-02-27 14:51:31.000000000 +0000
++++ gdb/rdi-share/unixcomm.c
+@@ -36,7 +36,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ 
+-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi)
++#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (bsdi) || defined(__DragonFly__)
+ #undef BSD
+ #include <sys/ioctl.h>
+ #endif
diff --git a/gdb5/patches/patch-am b/gdb5/patches/patch-am
new file mode 100644
index 0000000000..3ef8884246
--- /dev/null
+++ b/gdb5/patches/patch-am
@@ -0,0 +1,52 @@
+$NetBSD: patch-am,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/i386bsd-nat.c.orig	2007-07-11 14:32:16.000000000 +0200
++++ gdb/i386bsd-nat.c
+@@ -395,7 +395,7 @@ _initialize_i386bsd_nat (void)
+      system header files and sysctl(3) to get at the relevant
+      information.  */
+ 
+-#if defined (__FreeBSD_version) && __FreeBSD_version >= 400011
++#if defined(__DragonFly__) || (defined (__FreeBSD_version) && __FreeBSD_version >= 400011)
+   extern int i386fbsd4_sc_pc_offset;
+   extern int i386fbsd4_sc_sp_offset;
+ #define SC_PC_OFFSET i386fbsd4_sc_pc_offset
+@@ -419,26 +419,30 @@ _initialize_i386bsd_nat (void)
+ 
+   /* Override the default value for the offset of the program counter
+      in the sigcontext structure.  */
+-  sc_pc_offset = offsetof (struct sigcontext, sc_pc);
++#if defined(__DragonFly__)
++  sc_pc_offset = offsetof (ucontext_t, uc_mcontext.mc_eip);
++#else
++  sc_pc_offset = offsetof (ucontext_t, uc_mcontext.__gregs[_REG_EIP]);
++#endif
+ 
+   if (SC_PC_OFFSET != sc_pc_offset)
+     {
+-      warning ("\
+-offsetof (struct sigcontext, sc_pc) yields %d instead of %d.\n\
+-Please report this to <bug-gdb%gnu.org@localhost>.",
++      warning ("sc_pc_offset is %d instead of %d.",
+ 	       sc_pc_offset, SC_PC_OFFSET);
+     }
+ 
+   SC_PC_OFFSET = sc_pc_offset;
+ 
+   /* Likewise for the stack pointer.  */
+-  sc_sp_offset = offsetof (struct sigcontext, sc_sp);
++#if defined(__DragonFly__)
++  sc_sp_offset = offsetof (ucontext_t, uc_mcontext.mc_esp);
++#else
++  sc_sp_offset = offsetof (ucontext_t, uc_mcontext.__gregs[_REG_UESP]);
++#endif
+ 
+   if (SC_SP_OFFSET != sc_sp_offset)
+     {
+-      warning ("\
+-offsetof (struct sigcontext, sc_sp) yields %d instead of %d.\n\
+-Please report this to <bug-gdb%gnu.org@localhost>.",
++      warning ("sc_sp_offset is %d instead of %d.",
+ 	       sc_sp_offset, SC_SP_OFFSET);
+     }
+ 
diff --git a/gdb5/patches/patch-an b/gdb5/patches/patch-an
new file mode 100644
index 0000000000..f90c1b5483
--- /dev/null
+++ b/gdb5/patches/patch-an
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/target.c.orig	2006-02-27 15:13:18.000000000 +0000
++++ gdb/target.c
+@@ -36,8 +36,6 @@
+ #include <signal.h>
+ #include "regcache.h"
+ 
+-extern int errno;
+-
+ static void target_info (char *, int);
+ 
+ static void cleanup_target (struct target_ops *);
diff --git a/gdb5/patches/patch-ao b/gdb5/patches/patch-ao
new file mode 100644
index 0000000000..305423ba6b
--- /dev/null
+++ b/gdb5/patches/patch-ao
@@ -0,0 +1,13 @@
+$NetBSD: patch-ao,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/config/djgpp/djconfig.sh.orig	2002-02-25 17:09:45.000000000 +0100
++++ gdb/config/djgpp/djconfig.sh	2006-10-22 09:54:26.000000000 +0200
+@@ -76,7 +76,7 @@ TMPFILE="${TMPDIR-.}/cfg.tmp"
+ 
+ # We need to skip the build directory if it is a subdirectory of $srcdir,
+ # otherwise we will have an infinite recursion on our hands...
+-if test "`pwd`" == "${srcdir}" ; then
++if test "`pwd`" = "${srcdir}" ; then
+   SKIPDIR=""
+   SKIPFILES=""
+ else
diff --git a/gdb5/patches/patch-ap b/gdb5/patches/patch-ap
new file mode 100644
index 0000000000..bdf487267c
--- /dev/null
+++ b/gdb5/patches/patch-ap
@@ -0,0 +1,75 @@
+$NetBSD: patch-ap,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+Patch for CVE-2005-1704 sucked from upstream.
+* elfcode.h (elf_object_p): Add more sanity checks on elf header.
+
+--- bfd/elfcode.h.orig	2002-07-07 11:10:39.000000000 +0200
++++ bfd/elfcode.h
+@@ -683,8 +683,13 @@ elf_object_p (abfd)
+ 
+   if (i_ehdrp->e_shoff != 0)
+     {
++      bfd_signed_vma where = i_ehdrp->e_shoff;
++
++      if (where != (file_ptr) where)
++	goto got_wrong_format_error;
++
+       /* Seek to the section header table in the file.  */
+-      if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
++      if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
+ 	goto got_no_match;
+ 
+       /* Read the first section header at index 0, and convert to internal
+@@ -697,13 +702,50 @@ elf_object_p (abfd)
+       /* If the section count is zero, the actual count is in the first
+ 	 section header.  */
+       if (i_ehdrp->e_shnum == SHN_UNDEF)
+-	i_ehdrp->e_shnum = i_shdr.sh_size;
++	{
++	  i_ehdrp->e_shnum = i_shdr.sh_size;
++	  if (i_ehdrp->e_shnum != i_shdr.sh_size)
++	    goto got_wrong_format_error;
++	}
+ 
+       /* And similarly for the string table index.  */
+       if (i_ehdrp->e_shstrndx == SHN_XINDEX)
+-	i_ehdrp->e_shstrndx = i_shdr.sh_link;
++	{
++	  i_ehdrp->e_shstrndx = i_shdr.sh_link;
++	  if (i_ehdrp->e_shstrndx != i_shdr.sh_link)
++	    goto got_wrong_format_error;
++	}
++
++      /* Sanity check that we can read all of the section headers.
++	 It ought to be good enough to just read the last one.  */
++      if (i_ehdrp->e_shnum != 1)
++	{
++	  /* Check that we don't have a totally silly number of sections.  */
++	  if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr))
++	    goto got_wrong_format_error;
++
++	  where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr);
++	  if (where != (file_ptr) where)
++	    goto got_wrong_format_error;
++	  if ((bfd_size_type) where <= i_ehdrp->e_shoff)
++	    goto got_wrong_format_error;
++
++	  if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
++	    goto got_no_match;
++	  if (bfd_bread (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
++	    goto got_no_match;
++
++	  /* Back to where we were.  */
++	  where = i_ehdrp->e_shoff + sizeof (x_shdr);
++	  if (bfd_seek (abfd, (file_ptr) where, SEEK_SET) != 0)
++	    goto got_no_match;
++	}
+     }
+ 
++  /* A further sanity check.  */
++  if (i_ehdrp->e_shstrndx >= i_ehdrp->e_shnum)
++    goto got_wrong_format_error;
++
+   /* Allocate space for a copy of the section header table in
+      internal form.  */
+   if (i_ehdrp->e_shnum != 0)
diff --git a/gdb5/patches/patch-aq b/gdb5/patches/patch-aq
new file mode 100644
index 0000000000..a03a4bfe86
--- /dev/null
+++ b/gdb5/patches/patch-aq
@@ -0,0 +1,15 @@
+$NetBSD: patch-aq,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+Patch for CVE-2005-1705 from Gentoo #88398.
+
+--- gdb/main.c.orig	2002-09-28 17:10:31.000000000 +0200
++++ gdb/main.c
+@@ -626,7 +626,7 @@ extern int gdbtk_test (char *);
+ 
+   if (!homedir
+       || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
+-    if (!inhibit_gdbinit)
++    if (!inhibit_gdbinit && (cwdbuf.st_uid == getuid()) && (!cwdbuf.st_mode & (S_IWOTH)))
+       {
+ 	catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL);
+       }
diff --git a/gdb5/patches/patch-as b/gdb5/patches/patch-as
new file mode 100644
index 0000000000..09ef44d00e
--- /dev/null
+++ b/gdb5/patches/patch-as
@@ -0,0 +1,28 @@
+$NetBSD: patch-as,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/i386nbsd-tdep.c.orig	2007-07-11 14:31:00.000000000 +0200
++++ gdb/i386nbsd-tdep.c
+@@ -31,6 +31,8 @@
+ 
+ #include "solib-svr4.h"
+ 
++#include <sys/param.h>
++
+ /* Map a GDB register number to an offset in the reg structure.  */
+ static int regmap[] =
+ {
+@@ -238,9 +240,14 @@ i386nbsd_pc_in_sigtramp (CORE_ADDR pc, c
+ 	  || i386nbsd_sigtramp_offset (pc) >= 0);
+ }
+ 
++#if __NetBSD_Prereq__(2,0,0)
+ /* From <machine/signal.h>.  */
+ int i386nbsd_sc_pc_offset = 44;
+ int i386nbsd_sc_sp_offset = 56;
++#else
++int i386nbsd_sc_pc_offset = 92;
++int i386nbsd_sc_sp_offset = 104;
++#endif
+ 
+ static void 
+ i386nbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
diff --git a/gdb5/patches/patch-bfd_po_Make-in b/gdb5/patches/patch-bfd_po_Make-in
new file mode 100644
index 0000000000..108b0083b1
--- /dev/null
+++ b/gdb5/patches/patch-bfd_po_Make-in
@@ -0,0 +1,25 @@
+$NetBSD: patch-bfd_po_Make-in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- bfd/po/Make-in.orig	2011-03-05 07:49:59.000000000 +0000
++++ bfd/po/Make-in
+@@ -124,16 +124,16 @@ install-data: install-data-@USE_NLS@
+ install-data-no: all
+ install-data-yes: all
+ 	if test -r $(MKINSTALLDIRS); then \
+-	  $(MKINSTALLDIRS) $(datadir); \
++	  $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ 	else \
+-	  $(top_srcdir)/mkinstalldirs $(datadir); \
++	  $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ 	fi
+ 	@catalogs='$(CATALOGS)'; \
+ 	for cat in $$catalogs; do \
+ 	  cat=`basename $$cat`; \
+ 	  case "$$cat" in \
+-	    *.gmo) destdir=$(gnulocaledir);; \
+-	    *)     destdir=$(localedir);; \
++	    *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
++	    *)     destdir=$(DESTDIR)$(localedir);; \
+ 	  esac; \
+ 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ 	  dir=$$destdir/$$lang/LC_MESSAGES; \
diff --git a/gdb5/patches/patch-gdb_Makefile.in b/gdb5/patches/patch-gdb_Makefile.in
new file mode 100644
index 0000000000..608766046c
--- /dev/null
+++ b/gdb5/patches/patch-gdb_Makefile.in
@@ -0,0 +1,23 @@
+$NetBSD: patch-gdb_Makefile.in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+* destdir installation support.
+
+--- gdb/Makefile.in.orig	2002-11-25 22:05:38.000000000 +0000
++++ gdb/Makefile.in
+@@ -437,6 +437,7 @@ FLAGS_TO_PASS = \
+ 	"CXX=$(CXX)" \
+ 	"CXXFLAGS=$(CXXFLAGS)" \
+ 	"DLLTOOL=$(DLLTOOL)" \
++	"DESTDIR=$(DESTDIR)" \
+ 	"RANLIB=$(RANLIB)" \
+ 	"MAKEINFO=$(MAKEINFO)" \
+ 	"MAKEHTML=$(MAKEHTML)" \
+@@ -909,7 +910,7 @@ install-only: $(CONFIG_INSTALL)
+ 		else \
+ 		  true ; \
+ 		fi ; \
+-		$(srcdir)/../mkinstalldirs $(bindir) ; \
++		$(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir) ; \
+ 		$(INSTALL_PROGRAM) gdb$(EXEEXT) \
+ 			$(DESTDIR)$(bindir)/$$transformed_name$(EXEEXT) ; \
+ 		$(srcdir)/../mkinstalldirs \
diff --git a/gdb5/patches/patch-gdb_doc_Makefile.in b/gdb5/patches/patch-gdb_doc_Makefile.in
new file mode 100644
index 0000000000..17b84499c1
--- /dev/null
+++ b/gdb5/patches/patch-gdb_doc_Makefile.in
@@ -0,0 +1,35 @@
+$NetBSD: patch-gdb_doc_Makefile.in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+* destdir installation support.
+
+--- gdb/doc/Makefile.in.orig	2002-11-26 22:43:57.000000000 +0000
++++ gdb/doc/Makefile.in
+@@ -145,14 +145,14 @@ all-doc: info dvi ps # pdf
+ diststuff: info
+ 
+ install-info: $(INFO_DEPS)
+-	$(SHELL) $(srcdir)/../../mkinstalldirs $(infodir)
++	$(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(infodir)
+ 	@list='$(INFO_DEPS)'; \
+ 	for file in $$list; do \
+ 	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ 	  for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ 	    if test -f $$d/$$ifile; then \
+-	      echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
+-	      $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
++	      echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
++	      $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+ 	    else : ; fi; \
+ 	  done; \
+ 	done
+@@ -160,8 +160,8 @@ install-info: $(INFO_DEPS)
+ 	@if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ 	  list='$(INFO_DEPS)'; \
+ 	  for file in $$list; do \
+-	    echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
+-	    install-info --info-dir=$(infodir) $(infodir)/$$file || :;\
++	    echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
++	    install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ 	  done; \
+ 	else : ; fi
+ 
diff --git a/gdb5/patches/patch-gdb_gdbserver_Makefile.in b/gdb5/patches/patch-gdb_gdbserver_Makefile.in
new file mode 100644
index 0000000000..e27886770c
--- /dev/null
+++ b/gdb5/patches/patch-gdb_gdbserver_Makefile.in
@@ -0,0 +1,15 @@
+$NetBSD: patch-gdb_gdbserver_Makefile.in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- gdb/gdbserver/Makefile.in.orig	2002-08-20 21:32:18.000000000 +0000
++++ gdb/gdbserver/Makefile.in
+@@ -145,8 +145,8 @@ install: all install-only
+ install-only: 
+ 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
+ 	if [ x$$n = x ]; then n=gdbserver; else true; fi; \
+-	$(INSTALL_PROGRAM) gdbserver $(bindir)/$$n; \
+-	$(INSTALL_DATA) $(srcdir)/gdbserver.1 $(man1dir)/$$n.1
++	$(INSTALL_PROGRAM) gdbserver $(DESTDIR)$(bindir)/$$n; \
++	$(INSTALL_DATA) $(srcdir)/gdbserver.1 $(DESTDIR)$(man1dir)/$$n.1
+ 
+ uninstall: force
+ 	n=`echo gdbserver | sed '$(program_transform_name)'`; \
diff --git a/gdb5/patches/patch-gdb_gdbserver_configure.in b/gdb5/patches/patch-gdb_gdbserver_configure.in
new file mode 100644
index 0000000000..be521ac6f1
--- /dev/null
+++ b/gdb5/patches/patch-gdb_gdbserver_configure.in
@@ -0,0 +1,16 @@
+$NetBSD: patch-gdb_gdbserver_configure.in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+If <stdlib.h> is needed and its wrapped with HAVE_STDDLIB_H  it must be
+tested for by autoconf!
+
+--- gdb/gdbserver/configure.in.orig	2002-07-24 21:30:46.000000000 +0000
++++ gdb/gdbserver/configure.in
+@@ -30,7 +30,7 @@ AC_PROG_INSTALL
+ 
+ AC_HEADER_STDC
+ 
+-AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
++AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl stdlib.h
+ 		 proc_service.h sys/procfs.h thread_db.h linux/elf.h unistd.h)
+ 
+ . ${srcdir}/configure.srv
diff --git a/gdb5/patches/patch-mmalloc_Makefile.in b/gdb5/patches/patch-mmalloc_Makefile.in
new file mode 100644
index 0000000000..c302e8227a
--- /dev/null
+++ b/gdb5/patches/patch-mmalloc_Makefile.in
@@ -0,0 +1,19 @@
+$NetBSD: patch-mmalloc_Makefile.in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+* destdir installation support.
+
+--- mmalloc/Makefile.in.orig	2002-11-28 16:48:37.000000000 +0000
++++ mmalloc/Makefile.in
+@@ -156,9 +156,9 @@ check: test1.c
+ #	./a.out
+ 
+ install:	all install-info
+-		$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB)n
+-		$(RANLIB) $(libdir)/$(TARGETLIB)n
+-		mv -f $(libdir)/$(TARGETLIB)n $(libdir)/$(TARGETLIB)
++		$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
++		$(RANLIB) $(DESTDIR)$(libdir)/$(TARGETLIB)n
++		mv -f $(DESTDIR)$(libdir)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(TARGETLIB)
+ 
+ uninstall:	uninstall-info
+ 
diff --git a/gdb5/patches/patch-ob b/gdb5/patches/patch-ob
new file mode 100644
index 0000000000..b01139e064
--- /dev/null
+++ b/gdb5/patches/patch-ob
@@ -0,0 +1,25 @@
+$NetBSD: patch-ob,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+gcc4 complained:
+gdbtypes.c:2961: error: invalid lvalue in increment
+
+--- include/obstack.h.orig	2001-01-21 00:02:00.000000000 +0000
++++ include/obstack.h	2007-11-30 21:04:44.000000000 +0000
+@@ -421,7 +421,7 @@ __extension__								\
+ ({ struct obstack *__o = (OBSTACK);					\
+    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
+      _obstack_newchunk (__o, sizeof (void *));				\
+-   *((void **)__o->next_free)++ = ((void *)datum);			\
++   *((*(void ***)&(__o->next_free)))++ = ((void *)datum);		\
+    (void) 0; })
+ 
+ # define obstack_int_grow(OBSTACK,datum)				\
+@@ -429,7 +429,7 @@ __extension__								\
+ ({ struct obstack *__o = (OBSTACK);					\
+    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
+      _obstack_newchunk (__o, sizeof (int));				\
+-   *((int *)__o->next_free)++ = ((int)datum);				\
++   *((*(int **)&(__o->next_free)))++ = ((int)datum);			\
+    (void) 0; })
+ 
+ # define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
diff --git a/gdb5/patches/patch-opcodes_po_Make-in b/gdb5/patches/patch-opcodes_po_Make-in
new file mode 100644
index 0000000000..b3ea306a38
--- /dev/null
+++ b/gdb5/patches/patch-opcodes_po_Make-in
@@ -0,0 +1,25 @@
+$NetBSD: patch-opcodes_po_Make-in,v 1.1 2015/03/15 14:31:31 bsiegert Exp $
+
+--- opcodes/po/Make-in.orig	2011-03-05 07:50:01.000000000 +0000
++++ opcodes/po/Make-in
+@@ -111,16 +111,16 @@ install-data: install-data-@USE_NLS@
+ install-data-no: all
+ install-data-yes: all
+ 	if test -r $(MKINSTALLDIRS); then \
+-	  $(MKINSTALLDIRS) $(datadir); \
++	  $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ 	else \
+-	  $(top_srcdir)/mkinstalldirs $(datadir); \
++	  $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ 	fi
+ 	@catalogs='$(CATALOGS)'; \
+ 	for cat in $$catalogs; do \
+ 	  cat=`basename $$cat`; \
+ 	  case "$$cat" in \
+-	    *.gmo) destdir=$(gnulocaledir);; \
+-	    *)     destdir=$(localedir);; \
++	    *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
++	    *)     destdir=$(DESTDIR)$(localedir);; \
+ 	  esac; \
+ 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ 	  dir=$$destdir/$$lang/LC_MESSAGES; \


Home | Main Index | Thread Index | Old Index