summaryrefslogtreecommitdiff
path: root/cross/h8300-hms-binutils/patches
diff options
context:
space:
mode:
Diffstat (limited to 'cross/h8300-hms-binutils/patches')
-rw-r--r--cross/h8300-hms-binutils/patches/patch-aa25
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ab41
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ac35
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ad35
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ae32
-rw-r--r--cross/h8300-hms-binutils/patches/patch-af32
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ag39
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ah39
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ai27
-rw-r--r--cross/h8300-hms-binutils/patches/patch-aj72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ak72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-al72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-am72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-an72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ao72
-rw-r--r--cross/h8300-hms-binutils/patches/patch-ap28
16 files changed, 765 insertions, 0 deletions
diff --git a/cross/h8300-hms-binutils/patches/patch-aa b/cross/h8300-hms-binutils/patches/patch-aa
new file mode 100644
index 00000000000..4709cf03153
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-aa
@@ -0,0 +1,25 @@
+$NetBSD: patch-aa,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/Makefile.in.orig 2002-05-14 23:46:29.000000000 +0000
++++ ../binutils-2.12.1/Makefile.in
+@@ -360,6 +360,7 @@ BASE_FLAGS_TO_PASS = \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
+ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
++ "DESTDIR=$(DESTDIR)" \
+ "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+@@ -1832,7 +1833,9 @@ MAKEDIRS= \
+ $(exec_prefix)
+ .PHONY: installdirs
+ installdirs: mkinstalldirs
+- $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
++ for dir in $(MAKEDIRS); do \
++ $(SHELL) $(srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
++ done
+
+ dir.info: do-install-info
+ if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
diff --git a/cross/h8300-hms-binutils/patches/patch-ab b/cross/h8300-hms-binutils/patches/patch-ab
new file mode 100644
index 00000000000..c86ac752d62
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ab
@@ -0,0 +1,41 @@
+$NetBSD: patch-ab,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/intl/Makefile.in.orig 2002-03-08 19:25:51.000000000 +0000
++++ ../binutils-2.12.1/intl/Makefile.in
+@@ -115,26 +115,26 @@ install-exec: all
+ if test "$(PACKAGE)" = "gettext" \
+ && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(libdir) $(includedir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(libdir) ${DESTDIR}$(includedir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(libdir) ${DESTDIR}$(includedir); \
+ fi; \
+- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
+- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
++ $(INSTALL_DATA) intlh.inst ${DESTDIR}$(includedir)/libintl.h; \
++ $(INSTALL_DATA) libintl.a ${DESTDIR}$(libdir)/libintl.a; \
+ else \
+ : ; \
+ fi
+ install-data: all
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
++ $(INSTALL_DATA) VERSION ${DESTDIR}$(gettextsrcdir)/VERSION; \
+ dists="$(DISTFILES.common)"; \
+ for file in $$dists; do \
+- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
++ $(INSTALL_DATA) $(srcdir)/$$file ${DESTDIR}$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
diff --git a/cross/h8300-hms-binutils/patches/patch-ac b/cross/h8300-hms-binutils/patches/patch-ac
new file mode 100644
index 00000000000..2166156a80d
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ac
@@ -0,0 +1,35 @@
+$NetBSD: patch-ac,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/gas/Makefile.am.orig 2002-04-04 16:21:08.000000000 +0000
++++ ../binutils-2.12.1/gas/Makefile.am
+@@ -666,21 +666,21 @@ CLEANFILES = dep.sed DEPTC DEPTCA DEPOBJ
+ install-exec-local: install-exec-bindir @install_tooldir@
+
+ install-exec-bindir: $(noinst_PROGRAMS)
+- $(mkinstalldirs) $(bindir)
++ $(mkinstalldirs) ${DESTDIR}$(bindir)
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+ install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
+- $(mkinstalldirs) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(tooldir)/bin
+ n=`echo as | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/as$(EXEEXT); \
+- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/as$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$n$(EXEEXT) ${DESTDIR}$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) ${DESTDIR}$(tooldir)/bin/as$(EXEEXT); \
+ else \
+ true ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-ad b/cross/h8300-hms-binutils/patches/patch-ad
new file mode 100644
index 00000000000..c2c6726e105
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ad
@@ -0,0 +1,35 @@
+$NetBSD: patch-ad,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/gas/Makefile.in.orig 2002-04-04 16:21:08.000000000 +0000
++++ ../binutils-2.12.1/gas/Makefile.in
+@@ -2843,21 +2843,21 @@ cgen.o: cgen.c cgen.h cgen-desc.h subseg
+ install-exec-local: install-exec-bindir @install_tooldir@
+
+ install-exec-bindir: $(noinst_PROGRAMS)
+- $(mkinstalldirs) $(bindir)
++ $(mkinstalldirs) ${DESTDIR}$(bindir)
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+
+ install-exec-tooldir: install-exec-bindir $(noinst_PROGRAMS)
+- $(mkinstalldirs) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(tooldir)/bin
+ n=`echo as | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/as$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/as$(EXEEXT); \
+- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) $(tooldir)/bin/as$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/as$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$n$(EXEEXT) ${DESTDIR}$(tooldir)/bin/as$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) as-new$(EXEEXT) ${DESTDIR}$(tooldir)/bin/as$(EXEEXT); \
+ else \
+ true ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-ae b/cross/h8300-hms-binutils/patches/patch-ae
new file mode 100644
index 00000000000..14eb8253ee9
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ae
@@ -0,0 +1,32 @@
+$NetBSD: patch-ae,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/binutils/Makefile.am.orig 2002-04-04 16:20:11.000000000 +0000
++++ ../binutils-2.12.1/binutils/Makefile.am
+@@ -340,19 +340,19 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+- $(mkinstalldirs) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(tooldir)/bin
+ for i in $(TOOL_PROGS); do \
+ if [ -f $$i$(EXEEXT) ]; then \
+ j=`echo $$i | sed -e 's/-new//'`; \
+ k=`echo $$j | sed '$(transform)'`; \
+ if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/$$j$(EXEEXT); \
+- ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$k$(EXEEXT) ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT); \
+ fi; \
+ else true; \
+ fi; \
diff --git a/cross/h8300-hms-binutils/patches/patch-af b/cross/h8300-hms-binutils/patches/patch-af
new file mode 100644
index 00000000000..a308bbdccda
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-af
@@ -0,0 +1,32 @@
+$NetBSD: patch-af,v 1.1 2010/02/08 05:18:37 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/binutils/Makefile.in.orig 2002-04-04 16:20:11.000000000 +0000
++++ ../binutils-2.12.1/binutils/Makefile.in
+@@ -1059,19 +1059,19 @@ mostlyclean-local:
+ install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+- $(mkinstalldirs) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(tooldir)/bin
+ for i in $(TOOL_PROGS); do \
+ if [ -f $$i$(EXEEXT) ]; then \
+ j=`echo $$i | sed -e 's/-new//'`; \
+ k=`echo $$j | sed '$(transform)'`; \
+ if [ "$(bindir)/$$k$(EXEEXT)" != "$(tooldir)/bin/$$j$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/$$j$(EXEEXT); \
+- ln $(bindir)/$$k$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(tooldir)/bin/$$j$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$k$(EXEEXT) ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) ${DESTDIR}$(tooldir)/bin/$$j$(EXEEXT); \
+ fi; \
+ else true; \
+ fi; \
diff --git a/cross/h8300-hms-binutils/patches/patch-ag b/cross/h8300-hms-binutils/patches/patch-ag
new file mode 100644
index 00000000000..814f8fe9b47
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ag
@@ -0,0 +1,39 @@
+$NetBSD: patch-ag,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/ld/Makefile.am.orig 2002-05-09 14:50:49.000000000 +0000
++++ ../binutils-2.12.1/ld/Makefile.am
+@@ -1118,24 +1118,24 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+ .PHONY: install-exec-local install-data-local
+
+ install-exec-local: ld-new$(EXEEXT)
+- $(mkinstalldirs) $(bindir) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(bindir) ${DESTDIR}$(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+ n=`echo ld | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/ld$(EXEEXT); \
+- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$n$(EXEEXT) ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT); \
+ fi
+
+ install-data-local:
+- $(mkinstalldirs) $(scriptdir)/ldscripts
++ $(mkinstalldirs) ${DESTDIR}$(scriptdir)/ldscripts
+ for f in ldscripts/*; do \
+- $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
++ $(INSTALL_DATA) $$f ${DESTDIR}$(scriptdir)/$$f ; \
+ done
+
+ # We want install to imply install-info as per GNU standards, despite the
diff --git a/cross/h8300-hms-binutils/patches/patch-ah b/cross/h8300-hms-binutils/patches/patch-ah
new file mode 100644
index 00000000000..3c0a99d5416
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ah
@@ -0,0 +1,39 @@
+$NetBSD: patch-ah,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/ld/Makefile.in.orig 2002-05-09 14:50:49.000000000 +0000
++++ ../binutils-2.12.1/ld/Makefile.in
+@@ -1819,24 +1819,24 @@ mostlyclean-local:
+ .PHONY: install-exec-local install-data-local
+
+ install-exec-local: ld-new$(EXEEXT)
+- $(mkinstalldirs) $(bindir) $(tooldir)/bin
++ $(mkinstalldirs) ${DESTDIR}$(bindir) ${DESTDIR}$(tooldir)/bin
+ @list='$(noinst_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p ${DESTDIR}$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ else :; fi; \
+ done
+ n=`echo ld | sed '$(transform)'`; \
+ if [ "$(bindir)/$$n$(EXEEXT)" != "$(tooldir)/bin/ld$(EXEEXT)" ]; then \
+- rm -f $(tooldir)/bin/ld$(EXEEXT); \
+- ln $(bindir)/$$n$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
+- || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) $(tooldir)/bin/ld$(EXEEXT); \
++ rm -f ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT); \
++ ln ${DESTDIR}$(bindir)/$$n$(EXEEXT) ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT) >/dev/null 2>/dev/null \
++ || $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) ld-new$(EXEEXT) ${DESTDIR}$(tooldir)/bin/ld$(EXEEXT); \
+ fi
+
+ install-data-local:
+- $(mkinstalldirs) $(scriptdir)/ldscripts
++ $(mkinstalldirs) ${DESTDIR}$(scriptdir)/ldscripts
+ for f in ldscripts/*; do \
+- $(INSTALL_DATA) $$f $(scriptdir)/$$f ; \
++ $(INSTALL_DATA) $$f ${DESTDIR}$(scriptdir)/$$f ; \
+ done
+
+ # We want install to imply install-info as per GNU standards, despite the
diff --git a/cross/h8300-hms-binutils/patches/patch-ai b/cross/h8300-hms-binutils/patches/patch-ai
new file mode 100644
index 00000000000..3da7c6dba93
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ai
@@ -0,0 +1,27 @@
+$NetBSD: patch-ai,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/etc/Makefile.in.orig 2002-01-26 21:35:45.000000000 +0000
++++ ../binutils-2.12.1/etc/Makefile.in
+@@ -68,17 +68,17 @@ info:
+ done
+
+ install-info: info
+- $(SHELL) $(srcdir)/../mkinstalldirs $(infodir)
++ $(SHELL) $(srcdir)/../mkinstalldirs ${DESTDIR}$(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; \
++ $(INSTALL_DATA) $$i ${DESTDIR}$(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; \
++ $(INSTALL_DATA) $$i ${DESTDIR}$(infodir)/$$i; \
+ done; \
+ fi
+
diff --git a/cross/h8300-hms-binutils/patches/patch-aj b/cross/h8300-hms-binutils/patches/patch-aj
new file mode 100644
index 00000000000..490f72a6d7d
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-aj
@@ -0,0 +1,72 @@
+$NetBSD: patch-aj,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/bfd/po/Make-in.orig 2001-11-22 16:21:01.000000000 +0000
++++ ../binutils-2.12.1/bfd/po/Make-in
+@@ -124,9 +124,9 @@ 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 \
+@@ -138,27 +138,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -166,12 +166,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-ak b/cross/h8300-hms-binutils/patches/patch-ak
new file mode 100644
index 00000000000..1700712d02b
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ak
@@ -0,0 +1,72 @@
+$NetBSD: patch-ak,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/opcodes/po/Make-in.orig 1999-05-03 07:29:01.000000000 +0000
++++ ../binutils-2.12.1/opcodes/po/Make-in
+@@ -111,9 +111,9 @@ 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 \
+@@ -125,27 +125,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-al b/cross/h8300-hms-binutils/patches/patch-al
new file mode 100644
index 00000000000..72f9be66206
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-al
@@ -0,0 +1,72 @@
+$NetBSD: patch-al,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/binutils/po/Make-in.orig 1999-05-03 07:29:10.000000000 +0000
++++ ../binutils-2.12.1/binutils/po/Make-in
+@@ -111,9 +111,9 @@ 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 \
+@@ -125,27 +125,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-am b/cross/h8300-hms-binutils/patches/patch-am
new file mode 100644
index 00000000000..9cdf8e98fd5
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-am
@@ -0,0 +1,72 @@
+$NetBSD: patch-am,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/gas/po/Make-in.orig 1999-05-03 07:28:45.000000000 +0000
++++ ../binutils-2.12.1/gas/po/Make-in
+@@ -111,9 +111,9 @@ 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 \
+@@ -125,27 +125,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-an b/cross/h8300-hms-binutils/patches/patch-an
new file mode 100644
index 00000000000..1cfb551c840
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-an
@@ -0,0 +1,72 @@
+$NetBSD: patch-an,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/gprof/po/Make-in.orig 1999-05-03 07:29:11.000000000 +0000
++++ ../binutils-2.12.1/gprof/po/Make-in
+@@ -111,9 +111,9 @@ 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 \
+@@ -125,27 +125,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-ao b/cross/h8300-hms-binutils/patches/patch-ao
new file mode 100644
index 00000000000..8295ac0abb6
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ao
@@ -0,0 +1,72 @@
+$NetBSD: patch-ao,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support
+
+--- ../binutils-2.12.1/ld/po/Make-in.orig 1999-05-03 07:29:07.000000000 +0000
++++ ../binutils-2.12.1/ld/po/Make-in
+@@ -111,9 +111,9 @@ 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 \
+@@ -125,27 +125,27 @@ install-data-yes: all
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$$destdir/$$lang/LC_MESSAGES; \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $$dir; \
++ $(MKINSTALLDIRS) ${DESTDIR}$$dir; \
+ else \
+- $(top_srcdir)/mkinstalldirs $$dir; \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$$dir; \
+ fi; \
+ if test -r $$cat; then \
+- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ $(INSTALL_DATA) $$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
++ echo "installing $$cat as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ else \
+- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
++ $(INSTALL_DATA) $(srcdir)/$$cat ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ $(INSTALL_DATA) $$cat.m ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ echo "installing $$cat.m as ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
++ ${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
++ "${DESTDIR}$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ true; \
+ fi; \
+@@ -153,12 +153,12 @@ install-data-yes: all
+ done
+ if test "$(PACKAGE)" = "gettext"; then \
+ if test -r $(MKINSTALLDIRS); then \
+- $(MKINSTALLDIRS) $(gettextsrcdir); \
++ $(MKINSTALLDIRS) ${DESTDIR}$(gettextsrcdir); \
+ else \
+- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
++ $(top_srcdir)/mkinstalldirs ${DESTDIR}$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+- $(gettextsrcdir)/Makefile.in.in; \
++ ${DESTDIR}$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
diff --git a/cross/h8300-hms-binutils/patches/patch-ap b/cross/h8300-hms-binutils/patches/patch-ap
new file mode 100644
index 00000000000..6677d0a5ac8
--- /dev/null
+++ b/cross/h8300-hms-binutils/patches/patch-ap
@@ -0,0 +1,28 @@
+$NetBSD: patch-ap,v 1.1 2010/02/08 05:18:38 dholland Exp $
+
+DESTDIR support.
+
+--- ../binutils-2.12.1/libiberty/Makefile.in~ 2002-01-22 20:14:52.000000000 +0000
++++ ../binutils-2.12.1/libiberty/Makefile.in
+@@ -237,15 +237,15 @@ INSTALL_DEST = @INSTALL_DEST@
+ install: install_to_$(INSTALL_DEST) install-subdir
+
+ install_to_libdir: all
+- $(INSTALL_DATA) $(TARGETLIB) $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
+- ( cd $(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+- mv -f $(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(libdir)$(MULTISUBDIR)/$(TARGETLIB)
++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
++ ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
++ mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+ @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+
+ install_to_tooldir: all
+- $(INSTALL_DATA) $(TARGETLIB) $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
+- ( cd $(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
+- mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n
++ ( cd $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
++ mv -f $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
+ @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+
+ # needed-list is used by libstdc++. NEEDED is the list of functions