diff options
-rw-r--r-- | cross/h8300-hms-gcc/Makefile | 13 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/PLIST | 4 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/distinfo | 7 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/patches/patch-ac | 14 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/patches/patch-ad | 389 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/patches/patch-ae | 45 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/patches/patch-af | 89 | ||||
-rw-r--r-- | cross/h8300-hms-gcc/patches/patch-ag | 28 |
8 files changed, 583 insertions, 6 deletions
diff --git a/cross/h8300-hms-gcc/Makefile b/cross/h8300-hms-gcc/Makefile index af294bd39e0..d299c4456b4 100644 --- a/cross/h8300-hms-gcc/Makefile +++ b/cross/h8300-hms-gcc/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.24 2010/02/14 06:28:07 dholland Exp $ +# $NetBSD: Makefile,v 1.25 2010/02/14 21:30:00 dholland Exp $ DISTNAME= gcc-core-3.1 PKGNAME= cross-h8300-hms-gcc-3.1 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= cross MASTER_SITES= ftp://ftp.gnu.org/gnu/gcc/gcc-3.1/ \ ftp://sources.redhat.com/pub/newlib/ @@ -18,6 +18,8 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= #empty COMMENT= GCC compiler for h8300-hms +PKG_DESTDIR_SUPPORT= user-destdir + DEPENDS+= cross-h8300-hms-binutils-[0-9]*:../../cross/h8300-hms-binutils H8300_PREFIX= ${LOCALBASE}/libexec/cross-h8300-hms @@ -34,6 +36,7 @@ CONFIGURE_SCRIPT= ${SRCDIR}/configure SRCDIR= ${WRKDIR}/gcc-3.1 MAKE_ENV+= SHELL=${CONFIG_SHELL} BUILD_TARGET= CFLAGS="-O2 -fomit-frame-pointer" all +INSTALLATION_DIRS+= bin libexec/cross-h8300-hms/h8300-hms/bin INFO_FILES= # PLIST GCC_REQD+= 2.8.0 @@ -45,8 +48,10 @@ post-extract: post-install: for f in h8300-hms-cpp h8300-hms-gcc \ h8300-hms-c++ h8300-hms-g++ \ - h8300-hms-gccbug h8300-hms-gcov ; do \ - ${LN} -s ${H8300_PREFIX}/bin/$$f ${PREFIX}/bin/$$f ; \ + h8300-hms-gccbug h8300-hms-gcov \ + h8300-hms-c++filt ; do \ + ${LN} -s ../libexec/cross-h8300-hms/bin/"$$f" \ + ${DESTDIR}${PREFIX}/bin/"$$f" || exit 1; \ done .include "../../mk/bsd.pkg.mk" diff --git a/cross/h8300-hms-gcc/PLIST b/cross/h8300-hms-gcc/PLIST index eb36c118910..11835b479b1 100644 --- a/cross/h8300-hms-gcc/PLIST +++ b/cross/h8300-hms-gcc/PLIST @@ -1,11 +1,13 @@ -@comment $NetBSD: PLIST,v 1.7 2009/06/14 17:39:53 joerg Exp $ +@comment $NetBSD: PLIST,v 1.8 2010/02/14 21:30:00 dholland Exp $ bin/h8300-hms-c++ +bin/h8300-hms-c++filt bin/h8300-hms-cpp bin/h8300-hms-g++ bin/h8300-hms-gcc bin/h8300-hms-gccbug bin/h8300-hms-gcov libexec/cross-h8300-hms/bin/h8300-hms-c++ +libexec/cross-h8300-hms/bin/h8300-hms-c++filt libexec/cross-h8300-hms/bin/h8300-hms-cpp libexec/cross-h8300-hms/bin/h8300-hms-g++ libexec/cross-h8300-hms/bin/h8300-hms-gcc diff --git a/cross/h8300-hms-gcc/distinfo b/cross/h8300-hms-gcc/distinfo index 70ecd41d726..76742faa00f 100644 --- a/cross/h8300-hms-gcc/distinfo +++ b/cross/h8300-hms-gcc/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2010/02/14 06:28:07 dholland Exp $ +$NetBSD: distinfo,v 1.5 2010/02/14 21:30:00 dholland Exp $ SHA1 (gcc-core-3.1.tar.gz) = e93048803611b5c1e0dd745d81b43d6e34bca026 RMD160 (gcc-core-3.1.tar.gz) = d6fe75142280778c952af0717acfa4a2cc500623 @@ -14,3 +14,8 @@ RMD160 (h8300-hms-gcc-3.1-1.patch) = ab3114544c8a6bcd531e4b5b7a4fed8aaf8e9150 Size (h8300-hms-gcc-3.1-1.patch) = 61226 bytes SHA1 (patch-aa) = 0c853a604a5538a84c35fcd8abcf03fb05c5d4a1 SHA1 (patch-ab) = f9e3c972ed2a31591d8fe3d411cffc0bcf53c28e +SHA1 (patch-ac) = c4db8deb5cebe30b2ca16f2c9b07287ea3323b2e +SHA1 (patch-ad) = be068d27d2c17baf2343e46a7e1483ba20e91ec7 +SHA1 (patch-ae) = 23ca3e8b25c709e553dbf2db74a9a74f4419bc9e +SHA1 (patch-af) = 4879f30cb20d207a107bbe9c203f30aba984ded8 +SHA1 (patch-ag) = 9192dde2e2a721ee2d054206ba4844cd4312c737 diff --git a/cross/h8300-hms-gcc/patches/patch-ac b/cross/h8300-hms-gcc/patches/patch-ac new file mode 100644 index 00000000000..17ae2d97459 --- /dev/null +++ b/cross/h8300-hms-gcc/patches/patch-ac @@ -0,0 +1,14 @@ +$NetBSD: patch-ac,v 1.1 2010/02/14 21:30:00 dholland Exp $ + +DESTDIR support. + +--- ../gcc-3.1/Makefile.in~ 2002-04-15 18:59:13.000000000 +0000 ++++ ../gcc-3.1/Makefile.in +@@ -361,6 +361,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)" \ diff --git a/cross/h8300-hms-gcc/patches/patch-ad b/cross/h8300-hms-gcc/patches/patch-ad new file mode 100644 index 00000000000..944b3cefa5e --- /dev/null +++ b/cross/h8300-hms-gcc/patches/patch-ad @@ -0,0 +1,389 @@ +$NetBSD: patch-ad,v 1.1 2010/02/14 21:30:00 dholland Exp $ + +DESTDIR support. + +--- ../gcc-3.1/gcc/Makefile.in~ 2002-05-08 23:18:36.000000000 +0000 ++++ ../gcc-3.1/gcc/Makefile.in +@@ -2169,10 +2169,10 @@ stmp-fixinc: fixinc.sh gsyslimits.h + # but fixincludes does not take such arguments. + if [ "$(SYSTEM_HEADER_DIR)" = "$(build_tooldir)/sys-include" ] \ + && [ -d $(build_tooldir)/sys-include ]; then \ +- if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi; \ +- if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib; fi; \ +- if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; fi; \ +- if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir) ] ; then true ; else mkdir $(DESTDIR)$(libdir) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib/$(target_alias) ; fi; \ ++ if [ -d $(DESTDIR)$(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib/$(target_alias)/$(version) ; fi; \ + else true; fi + $(STAMP) stmp-fixinc + +@@ -2531,180 +2531,180 @@ install: install-common $(INSTALL_HEADER + # Handle cpp installation. + install-cpp: cpp$(exeext) + -if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext); \ + if [ x$(cpp_install_dir) != x ]; then \ +- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ + else true; fi; \ + else \ +- rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext); \ + if [ x$(cpp_install_dir) != x ]; then \ +- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) -m 755 cpp$(exeext) $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ + else true; fi; \ + fi + + uninstall-cpp: +- -rm -f $(bindir)/$(CPP_INSTALL_NAME)$(exeext) +- -rm -f $(bindir)/$(CPP_CROSS_NAME)$(exeext) ++ -rm -f $(DESTDIR)$(bindir)/$(CPP_INSTALL_NAME)$(exeext) ++ -rm -f $(DESTDIR)$(bindir)/$(CPP_CROSS_NAME)$(exeext) + -if [ x$(cpp_install_dir) != x ]; then \ +- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ +- rm -f $(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(prefix)/$(cpp_install_dir)/$(CPP_CROSS_NAME)$(exeext); \ + else true; fi + + # Create the installation directories. + installdirs: +- -if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; chmod a+rx $(prefix) ; fi +- -if [ -d $(exec_prefix) ] ; then true ; else mkdir $(exec_prefix) ; chmod a+rx $(exec_prefix) ; fi +- -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi +- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi ++ -if [ -d $(DESTDIR)$(prefix) ] ; then true ; else mkdir $(DESTDIR)$(prefix) ; chmod a+rx $(DESTDIR)$(prefix) ; fi ++ -if [ -d $(DESTDIR)$(exec_prefix) ] ; then true ; else mkdir $(DESTDIR)$(exec_prefix) ; chmod a+rx $(DESTDIR)$(exec_prefix) ; fi ++ -if [ -d $(DESTDIR)$(libdir) ] ; then true ; else mkdir $(DESTDIR)$(libdir) ; chmod a+rx $(DESTDIR)$(libdir) ; fi ++ -if [ -d $(DESTDIR)$(libdir)/gcc-lib ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib ; chmod a+rx $(DESTDIR)$(libdir)/gcc-lib ; fi + # This dir isn't currently searched by cpp. +-# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi ++# -if [ -d $(DESTDIR)$(libdir)/gcc-lib/include ] ; then true ; else mkdir $(DESTDIR)$(libdir)/gcc-lib/include ; chmod a+rx $(DESTDIR)$(libdir)/gcc-lib/include ; fi + -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \ + fdir=$${fdir}/$${dir}; \ +- if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \ ++ if [ -d $(DESTDIR)$${fdir} ] ; then true ; else mkdir $(DESTDIR)$${fdir}; chmod a+rx $(DESTDIR)$${fdir}; fi ; \ + done +- -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi +- -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi +- -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi +- -if [ -d $(slibdir) ] ; then true ; else mkdir $(slibdir) ; chmod a+rx $(slibdir) ; fi ++ -if [ -d $(DESTDIR)$(bindir) ] ; then true ; else mkdir $(DESTDIR)$(bindir) ; chmod a+rx $(DESTDIR)$(bindir) ; fi ++ -if [ -d $(DESTDIR)$(includedir) ] ; then true ; else mkdir $(DESTDIR)$(includedir) ; chmod a+rx $(DESTDIR)$(includedir) ; fi ++ -if [ -d $(DESTDIR)$(infodir) ] ; then true ; else mkdir $(DESTDIR)$(infodir) ; chmod a+rx $(DESTDIR)$(infodir) ; fi ++ -if [ -d $(DESTDIR)$(slibdir) ] ; then true ; else mkdir $(DESTDIR)$(slibdir) ; chmod a+rx $(DESTDIR)$(slibdir) ; fi + # We don't use mkdir -p to create the parents of man1dir, + # because some systems don't support it. + # Instead, we use this technique to create the immediate parent of man1dir. + -parent=`echo $(man1dir)|sed -e 's@/[^/]*$$@@'`; \ +- if [ -d $$parent ] ; then true ; else mkdir $$parent ; chmod a+rx $$parent ; fi +- -if [ -d $(man1dir) ] ; then true ; else mkdir $(man1dir) ; chmod a+rx $(man1dir) ; fi +- -if [ -d $(man7dir) ] ; then true ; else mkdir $(man7dir) ; chmod a+rx $(man7dir) ; fi ++ if [ -d $(DESTDIR)$$parent ] ; then true ; else mkdir $(DESTDIR)$$parent ; chmod a+rx $(DESTDIR)$$parent ; fi ++ -if [ -d $(DESTDIR)$(man1dir) ] ; then true ; else mkdir $(DESTDIR)$(man1dir) ; chmod a+rx $(DESTDIR)$(man1dir) ; fi ++ -if [ -d $(DESTDIR)$(man7dir) ] ; then true ; else mkdir $(DESTDIR)$(man7dir) ; chmod a+rx $(DESTDIR)$(man7dir) ; fi + + # Install the compiler executables built during cross compilation. + install-common: native $(EXTRA_PARTS) lang.install-common + for file in $(COMPILERS); do \ + if [ -f $$file ] ; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \ + else true; \ + fi; \ + done + for file in $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \ + if [ x"$$file" != x.. ]; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_PROGRAM) $$file $(DESTDIR)$(libsubdir)/$$file; \ + else true; fi; \ + done + for file in $(EXTRA_PARTS) ..; do \ + if [ x"$$file" != x.. ]; then \ +- rm -f $(libsubdir)/$$file; \ +- $(INSTALL_DATA) $$file $(libsubdir)/$$file; \ +- chmod a-x $(libsubdir)/$$file; \ ++ rm -f $(DESTDIR)$(libsubdir)/$$file; \ ++ $(INSTALL_DATA) $$file $(DESTDIR)$(libsubdir)/$$file; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/$$file; \ + else true; fi; \ + done + # Don't mess with specs if it doesn't exist yet. + -if [ -f specs ] ; then \ +- rm -f $(libsubdir)/specs; \ +- $(INSTALL_DATA) specs $(libsubdir)/specs; \ +- chmod a-x $(libsubdir)/specs; \ ++ rm -f $(DESTDIR)$(libsubdir)/specs; \ ++ $(INSTALL_DATA) specs $(DESTDIR)$(libsubdir)/specs; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/specs; \ + fi + # Install protoize if it was compiled. + -if [ -f protoize$(exeext) ]; \ + then \ + if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ +- rm -f $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) protoize$(exeext) $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) unprotoize$(exeext) $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) protoize$(exeext) $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) unprotoize$(exeext) $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext); \ + fi ; \ +- rm -f $(libsubdir)/SYSCALLS.c.X; \ +- $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \ +- chmod a-x $(libsubdir)/SYSCALLS.c.X; \ ++ rm -f $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ ++ $(INSTALL_DATA) SYSCALLS.c.X $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ ++ chmod a-x $(DESTDIR)$(libsubdir)/SYSCALLS.c.X; \ + fi +- -rm -f $(libsubdir)/cpp0$(exeext) +- $(INSTALL_PROGRAM) cpp0$(exeext) $(libsubdir)/cpp0$(exeext) +- -rm -f $(libsubdir)/tradcpp0$(exeext) +- $(INSTALL_PROGRAM) tradcpp0$(exeext) $(libsubdir)/tradcpp0$(exeext) ++ -rm -f $(DESTDIR)$(libsubdir)/cpp0$(exeext) ++ $(INSTALL_PROGRAM) cpp0$(exeext) $(DESTDIR)$(libsubdir)/cpp0$(exeext) ++ -rm -f $(DESTDIR)$(libsubdir)/tradcpp0$(exeext) ++ $(INSTALL_PROGRAM) tradcpp0$(exeext) $(DESTDIR)$(libsubdir)/tradcpp0$(exeext) + # Install gcov if it was compiled. + -if [ -f gcov$(exeext) ]; \ + then \ +- rm -f $(bindir)/gcov$(exeext); \ +- $(INSTALL_PROGRAM) gcov$(exeext) $(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/gcov$(exeext); \ ++ $(INSTALL_PROGRAM) gcov$(exeext) $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext); \ + fi +- $(INSTALL_SCRIPT) gccbug $(bindir)/$(GCCBUG_INSTALL_NAME) ++ $(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME) + + # Install the driver program as $(target_alias)-gcc + # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc. + install-driver: installdirs xgcc$(exeext) + -if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(bindir)/$(GCC_CROSS_NAME)$(exeext); \ +- if [ -d $(gcc_tooldir)/bin/. ] ; then \ +- rm -f $(gcc_tooldir)/bin/gcc$(exeext); \ +- $(INSTALL_PROGRAM) gcc-cross$(exeext) $(gcc_tooldir)/bin/gcc$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \ ++ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \ ++ rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ ++ $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ + else true; fi; \ + else \ +- rm -f $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(target_alias)-gcc-1$(exeext); \ +- $(LN) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target_alias)-gcc-1$(exeext); \ +- mv $(bindir)/$(target_alias)-gcc-1$(exeext) $(bindir)/$(GCC_TARGET_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext); \ ++ mv $(DESTDIR)$(bindir)/$(target_alias)-gcc-1$(exeext) $(DESTDIR)$(bindir)/$(GCC_TARGET_INSTALL_NAME)$(exeext); \ + fi + + # Install the info files. + # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir + # to do the install. + install-info: doc installdirs lang.install-info +- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* +- -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info* ++ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* ++ -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* + if [ -f $(docdir)/gcc.info ]; then \ + for f in $(docdir)/cpp.info* $(docdir)/gcc.info* \ + $(docdir)/cppinternals.info* $(docdir)/gccint.info*; do \ + realfile=`echo $$f | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ +- $(INSTALL_DATA) $$f $(infodir)/$$realfile; \ ++ $(INSTALL_DATA) $$f $(DESTDIR)$(infodir)/$$realfile; \ + done; \ + else true; fi + -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ +- if [ -f $(infodir)/dir ] ; then \ ++ if [ -f $(DESTDIR)$(infodir)/dir ] ; then \ + for f in cpp.info gcc.info gccint.info cppinternals.info; do \ +- if [ -f $(infodir)/$$f ]; then \ +- install-info --dir-file=$(infodir)/dir $(infodir)/$$f; \ ++ if [ -f $(DESTDIR)$(infodir)/$$f ]; then \ ++ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/$$f; \ + else true; fi; \ + done; \ + else true; fi; \ + else true; fi; +- -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info* +- -chmod a-x $(infodir)/cppinternals.info* $(infodir)/gccint.info* ++ -chmod a-x $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* ++ -chmod a-x $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* + + # Install the man pages. + install-man: installdirs $(GENERATED_MANPAGES) lang.install-man + -if [ -f gcc-cross$(exeext) ] ; then \ +- rm -f $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ +- $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ +- chmod a-x $(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ ++ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext); \ + else \ +- rm -f $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ +- $(INSTALL_DATA) $(docdir)/gcc.1 $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ +- chmod a-x $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ ++ $(INSTALL_DATA) $(docdir)/gcc.1 $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext); \ + fi +- -rm -f $(man1dir)/cpp$(man1ext) +- -$(INSTALL_DATA) $(docdir)/cpp.1 $(man1dir)/cpp$(man1ext) +- -chmod a-x $(man1dir)/cpp$(man1ext) +- -rm -f $(man1dir)/gcov$(man1ext) +- -$(INSTALL_DATA) $(docdir)/gcov.1 $(man1dir)/gcov$(man1ext) +- -chmod a-x $(man1dir)/gcov$(man1ext) +- -rm -f $(man7dir)/fsf-funding$(man7ext) +- -$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(man7dir)/fsf-funding$(man7ext) +- -chmod a-x $(man7dir)/fsf-funding$(man7ext) +- -rm -f $(man7dir)/gfdl$(man7ext) +- -$(INSTALL_DATA) $(docdir)/gfdl.7 $(man7dir)/gfdl$(man7ext) +- -chmod a-x $(man7dir)/gfdl$(man7ext) +- -rm -f $(man7dir)/gpl$(man7ext) +- -$(INSTALL_DATA) $(docdir)/gpl.7 $(man7dir)/gpl$(man7ext) +- -chmod a-x $(man7dir)/gpl$(man7ext) ++ -rm -f $(DESTDIR)$(man1dir)/cpp$(man1ext) ++ -$(INSTALL_DATA) $(docdir)/cpp.1 $(DESTDIR)$(man1dir)/cpp$(man1ext) ++ -chmod a-x $(DESTDIR)$(man1dir)/cpp$(man1ext) ++ -rm -f $(DESTDIR)$(man1dir)/gcov$(man1ext) ++ -$(INSTALL_DATA) $(docdir)/gcov.1 $(DESTDIR)$(man1dir)/gcov$(man1ext) ++ -chmod a-x $(DESTDIR)$(man1dir)/gcov$(man1ext) ++ -rm -f $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) ++ -$(INSTALL_DATA) $(docdir)/fsf-funding.7 $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) ++ -chmod a-x $(DESTDIR)$(man7dir)/fsf-funding$(man7ext) ++ -rm -f $(DESTDIR)$(man7dir)/gfdl$(man7ext) ++ -$(INSTALL_DATA) $(docdir)/gfdl.7 $(DESTDIR)$(man7dir)/gfdl$(man7ext) ++ -chmod a-x $(DESTDIR)$(man7dir)/gfdl$(man7ext) ++ -rm -f $(DESTDIR)$(man7dir)/gpl$(man7ext) ++ -$(INSTALL_DATA) $(docdir)/gpl.7 $(DESTDIR)$(man7dir)/gpl$(man7ext) ++ -chmod a-x $(DESTDIR)$(man7dir)/gpl$(man7ext) + + # Install the library. + install-libgcc: libgcc.mk libgcc.a installdirs +@@ -2763,23 +2763,23 @@ install-headers: $(INSTALL_HEADERS_DIR) + # Fix symlinks to absolute paths in the installed include directory to + # point to the installed directory, not the build directory. + # Don't need to use LN_S here since we really do need ln -s and no substitutes. +- -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \ ++ -files=`cd $(DESTDIR)$(libsubdir)/include; find . -type l -print 2>/dev/null`; \ + if [ $$? -eq 0 ]; then \ + dir=`cd include; pwd`; \ + for i in $$files; do \ +- dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ ++ dest=`ls -ld $(DESTDIR)$(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \ + if expr "$$dest" : "$$dir.*" > /dev/null; then \ +- rm -f $(libsubdir)/include/$$i; \ +- ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \ ++ rm -f $(DESTDIR)$(libsubdir)/include/$$i; \ ++ ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(DESTDIR)$(libsubdir)/include/$$i; \ + fi; \ + done; \ + fi + + # Create or recreate the gcc private include file directory. + install-include-dir: installdirs +- -rm -rf $(libsubdir)/include +- mkdir $(libsubdir)/include +- -chmod a+rx $(libsubdir)/include ++ -rm -rf $(DESTDIR)$(libsubdir)/include ++ mkdir $(DESTDIR)$(libsubdir)/include ++ -chmod a+rx $(DESTDIR)$(libsubdir)/include + + # Install the include directory using tar. + install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir +@@ -2788,7 +2788,7 @@ install-headers-tar: stmp-int-hdrs $(STM + # found in CDPATH, corrupting the output. We could just redirect the + # output of `cd', but some shells lose on redirection within `()'s + (cd `pwd`/include ; \ +- tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar xpf - ) ++ tar -cf - .; exit 0) | (cd $(DESTDIR)$(libsubdir)/include; tar xpf - ) + # /bin/sh on some systems returns the status of the first tar, + # and that can lose with GNU tar which always writes a full block. + # So use `exit 0' to ignore its exit status. +@@ -2797,35 +2797,35 @@ install-headers-tar: stmp-int-hdrs $(STM + install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir + # See discussion about the use of `pwd` above + cd `pwd`/include ; \ +- find . -print | cpio -pdum $(libsubdir)/include ++ find . -print | cpio -pdum $(DESTDIR)$(libsubdir)/include + + # Install the include directory using cp. + install-headers-cp: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir +- cp -p -r include $(libsubdir) ++ cp -p -r include $(DESTDIR)$(libsubdir) + + # Use this target to install the program `collect2' under the name `collect2'. + install-collect2: collect2 installdirs +- $(INSTALL_PROGRAM) collect2$(exeext) $(libsubdir)/collect2$(exeext) ++ $(INSTALL_PROGRAM) collect2$(exeext) $(DESTDIR)$(libsubdir)/collect2$(exeext) + # Install the driver program as $(libsubdir)/gcc for collect2. +- $(INSTALL_PROGRAM) xgcc$(exeext) $(libsubdir)/gcc$(exeext) ++ $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(libsubdir)/gcc$(exeext) + + # Cancel installation by deleting the installed files. + uninstall: intl.uninstall lang.uninstall $(UNINSTALL_CPP) +- -rm -rf $(libsubdir) +- -rm -rf $(bindir)/$(GCC_INSTALL_NAME)$(exeext) +- -rm -rf $(bindir)/$(GCC_CROSS_NAME)$(exeext) +- -rm -rf $(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) +- -rm -rf $(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext) +- -rm -rf $(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) +- -rm -rf $(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext) +- -rm -rf $(bindir)/$(GCOV_INSTALL_NAME)$(exeext) +- -rm -rf $(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) +- -rm -rf $(man1dir)/$(GCC_CROSS_NAME)$(man1ext) +- -rm -rf $(man1dir)/cpp$(man1ext) +- -rm -rf $(man1dir)/protoize$(man1ext) +- -rm -rf $(man1dir)/unprotoize$(man1ext) +- -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info* +- -rm -f $(infodir)/cppinternals.info* $(infodir)/gccint.info* ++ -rm -rf $(DESTDIR)$(libsubdir) ++ -rm -rf $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_INSTALL_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(PROTOIZE_CROSS_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_INSTALL_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(UNPROTOIZE_CROSS_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(bindir)/$(GCOV_INSTALL_NAME)$(exeext) ++ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_INSTALL_NAME)$(man1ext) ++ -rm -rf $(DESTDIR)$(man1dir)/$(GCC_CROSS_NAME)$(man1ext) ++ -rm -rf $(DESTDIR)$(man1dir)/cpp$(man1ext) ++ -rm -rf $(DESTDIR)$(man1dir)/protoize$(man1ext) ++ -rm -rf $(DESTDIR)$(man1dir)/unprotoize$(man1ext) ++ -rm -f $(DESTDIR)$(infodir)/cpp.info* $(DESTDIR)$(infodir)/gcc.info* ++ -rm -f $(DESTDIR)$(infodir)/cppinternals.info* $(DESTDIR)$(infodir)/gccint.info* + # + # These targets are for the dejagnu testsuites. The file site.exp + # contains global variables that all the testsuites will use. diff --git a/cross/h8300-hms-gcc/patches/patch-ae b/cross/h8300-hms-gcc/patches/patch-ae new file mode 100644 index 00000000000..64068eed75f --- /dev/null +++ b/cross/h8300-hms-gcc/patches/patch-ae @@ -0,0 +1,45 @@ +$NetBSD: patch-ae,v 1.1 2010/02/14 21:30:00 dholland Exp $ + +DESTDIR support. + +--- ../gcc-3.1/gcc/mklibgcc.in.orig 2002-05-09 17:35:21.000000000 +0000 ++++ ../gcc-3.1/gcc/mklibgcc.in +@@ -404,7 +404,7 @@ done + + echo 'stmp-dirs: force' + echo ' for d in '"$dirs"'; do \' +-echo ' if [ -d $$d ]; then true; else '$mkinstalldirs' $$d; fi; \' ++echo ' if [ -d $$d ]; then true; else '$mkinstalldirs' $(DESTDIR)$$d; fi; \' + echo ' done' + echo ' if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi' + +@@ -440,16 +440,16 @@ for ml in $MULTILIBS; do + dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` + if [ $dir != . ]; then + ldir='$(libsubdir)'/$dir +- echo " if [ -d $ldir ]; then true; else mkdir $ldir; chmod a+rx $ldir; fi;" ++ echo " if [ -d "'$(DESTDIR)'"$ldir ]; then true; else mkdir "'$(DESTDIR)'"$ldir; chmod a+rx "'$(DESTDIR)'"$ldir; fi;" + else + ldir='$(libsubdir)' + fi +- echo ' $(INSTALL_DATA)' ${dir}/libgcc.a ${ldir}/ +- echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a ++ echo ' $(INSTALL_DATA)' ${dir}/libgcc.a '$(DESTDIR)'${ldir}/ ++ echo ' $(RANLIB_FOR_TARGET)' '$(DESTDIR)'${ldir}/libgcc.a + + if [ "$SHLIB_LINK" ]; then +- echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/ +- echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a ++ echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a '$(DESTDIR)'${ldir}/ ++ echo ' $(RANLIB_FOR_TARGET)' '$(DESTDIR)'${ldir}/libgcc_eh.a + + if [ -z "$SHLIB_MULTILIB" ]; then + if [ "$dir" = . ]; then +@@ -520,6 +520,6 @@ for f in $EXTRA_MULTILIB_PARTS; do + out=$f + ldir='$(libsubdir)' + fi +- echo ' $(INSTALL_DATA)' $out $ldir/ ++ echo ' $(INSTALL_DATA)' $out '$(DESTDIR)'$ldir/ + done + done diff --git a/cross/h8300-hms-gcc/patches/patch-af b/cross/h8300-hms-gcc/patches/patch-af new file mode 100644 index 00000000000..8c0babcfe91 --- /dev/null +++ b/cross/h8300-hms-gcc/patches/patch-af @@ -0,0 +1,89 @@ +$NetBSD: patch-af,v 1.1 2010/02/14 21:30:00 dholland Exp $ + +DESTDIR support. + +--- ../gcc-3.1/gcc/cp/Make-lang.in~ 2002-03-16 00:59:04.000000000 +0000 ++++ ../gcc-3.1/gcc/cp/Make-lang.in +@@ -155,37 +155,37 @@ c++.install-normal: + c++.install-common: installdirs + -if [ -f cc1plus$(exeext) ] ; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g++-cross$(exeext) $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \ +- rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ +- $(LN) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext); \ +- if [ -d $(gcc_tooldir)/bin/. ] ; then \ +- rm -f $(gcc_tooldir)/bin/g++$(exeext); \ +- $(INSTALL_PROGRAM) g++-cross$(exeext) $(gcc_tooldir)/bin/g++$(exeext); \ +- rm -f $(gcc_tooldir)/bin/c++$(exeext); \ +- $(LN) $(gcc_tooldir)/bin/g++$(exeext) $(gcc_tooldir)/bin/c++$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GXX_CROSS_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_CROSS_NAME)$(exeext); \ ++ if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \ ++ rm -f $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \ ++ $(INSTALL_PROGRAM) g++-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext); \ ++ rm -f $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \ ++ $(LN) $(DESTDIR)$(gcc_tooldir)/bin/g++$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/c++$(exeext); \ + else true; fi; \ + else \ +- rm -f $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) g++$(exeext) $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ +- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \ +- $(LN) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \ +- rm -f $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \ +- $(LN) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) g++$(exeext) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(GXX_TARGET_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \ ++ $(LN) $(DESTDIR)$(bindir)/$(CXX_INSTALL_NAME)$(exeext) $(DESTDIR)$(bindir)/$(CXX_TARGET_INSTALL_NAME)$(exeext); \ + fi ; \ + if [ x$(DEMANGLER_PROG) != x ] && [ -x "$(DEMANGLER_PROG)" ]; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_CROSS_NAME)$(exeext); \ + else \ +- rm -f $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ +- $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ +- chmod a+x $(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ rm -f $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ $(INSTALL_PROGRAM) $(DEMANGLER_PROG) $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ ++ chmod a+x $(DESTDIR)$(bindir)/$(DEMANGLER_INSTALL_NAME)$(exeext); \ + fi ; \ + fi ; \ + fi +@@ -195,13 +195,13 @@ c++.install-info: + c++.install-man: installdirs $(srcdir)/cp/g++.1 + -if [ -f cc1plus$(exeext) ] ; then \ + if [ -f g++-cross$(exeext) ] ; then \ +- rm -f $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ +- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ +- chmod a-x $(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ ++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_CROSS_NAME)$(man1ext); \ + else \ +- rm -f $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ +- $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ +- chmod a-x $(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ ++ rm -f $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ ++ $(INSTALL_DATA) $(srcdir)/cp/g++.1 $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ ++ chmod a-x $(DESTDIR)$(man1dir)/$(GXX_INSTALL_NAME)$(man1ext); \ + fi; \ + else true; fi + diff --git a/cross/h8300-hms-gcc/patches/patch-ag b/cross/h8300-hms-gcc/patches/patch-ag new file mode 100644 index 00000000000..b9ddb7b405b --- /dev/null +++ b/cross/h8300-hms-gcc/patches/patch-ag @@ -0,0 +1,28 @@ +$NetBSD: patch-ag,v 1.1 2010/02/14 21:30:00 dholland Exp $ + +DESTDIR support. + +--- ../gcc-3.1/libiberty/Makefile.in~ 2002-01-22 20:03:29.000000000 +0000 ++++ ../gcc-3.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 |