--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-cross.mk
@@ -0,0 +1,57 @@
+arch_binaries := $(arch_binaries) gcc-cross
+
+dirs_gcc = \
+ $(docdir)/$(p_base)/gcc \
+ $(PF)/bin \
+ $(gcc_lib_dir)/include \
+ $(PF)/share/man/man1
+
+files_gcc = \
+ $(PF)/bin/{$(DEB_TARGET_GNU_TPE)-gcc,$(DEB_TARGET_GNU_TYPE)-cpp}$(pkg_ver) \
+ $(PF)/share/man/man1/{$(DEB_TARGET_GNU_TYPE)-gcc}$(pkg_ver).1 \
+ $(gcc_lib_dir) \
+
+
+files_gcc += \
+ $(shell test -e $(d)/$(gcc_lib_dir)/SYSCALLS.c.X \
+ && echo $(gcc_lib_dir)/SYSCALLS.c.X)
+
+usr_doc_files = debian/README.Bugs \
+ $(shell test -f $(srcdir)/FAQ && echo $(srcdir)/FAQ)
+ifeq ($(with_check),yes)
+ usr_doc_files += test-summary
+endif
+ifeq ($(DEB_HOST_ARCH),sparc)
+ usr_doc_files += debian/README.sparc
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc-cross: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ rm -rf $(d_gcc)
+ dh_installdirs -p$(p_gcc) $(dirs_gcc)
+ $(IS) debian/c89 $(d)/$(PF)/bin/
+ $(IR) debian/c89.1 $(d)/$(PF)/share/man/man1/
+
+ rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
+ ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
+
+ DH_COMPAT=2 dh_movefiles -p$(p_gcc) $(files_gcc)
+
+# dh_installdebconf
+ debian/dh_doclink -p$(p_gcc) $(p_base)
+ cp -p $(usr_doc_files) $(d_gcc)/$(docdir)/$(p_base)/.
+ cp -p debian/NEWS.gcc $(d_gcc)/$(docdir)/$(p_base)/NEWS
+ dh_undocumented -p$(p_gcc) gccbug$(pkg_ver).1
+ debian/dh_rmemptydirs -p$(p_gcc)
+ dh_strip -p$(p_gcc)
+ dh_compress -p$(p_gcc)
+ dh_fixperms -p$(p_gcc)
+ dh_shlibdeps -p$(p_gcc)
+ dh_gencontrol -p$(p_gcc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gcc)
+ dh_md5sums -p$(p_gcc)
+ dh_builddeb -p$(p_gcc)
+ touch $@
+
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-fastjar.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-fastjar.mk
@@ -0,0 +1,55 @@
+arch_binaries := $(arch_binaries) fastjar
+
+p_fjar = fastjar
+d_fjar = debian/$(p_fjar)
+
+dirs_fjar = \
+ $(docdir)/$(p_fjar) \
+ $(PF)/bin \
+ $(PF)/share/man/man1 \
+ $(PF)/share/info
+
+files_fjar = \
+ $(PF)/bin/{fastjar,grepjar}* \
+ $(PF)/share/man/man1/{fastjar,grepjar}*.1 \
+ $(PF)/share/info/fastjar.info
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-fastjar: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_fjar)
+ dh_installdirs -p$(p_fjar) $(dirs_fjar)
+
+#ifeq ($(versioned_packages),yes)
+# : # rename versioned files back to unversioned ones.
+# for i in fastjar grepjar; do \
+# mv $(d)/$(PF)/bin/$$i$(pkg_ver) $(d)/$(PF)/bin/$$i; \
+# mv $(d)/$(PF)/share/man/man1/$$i$(pkg_ver).1 \
+# $(d)/$(PF)/share/man/man1/$$i.1; \
+# done
+#endif
+ for i in fastjar grepjar; do \
+ ln -s $$i$(pkg_ver) $(d)/$(PF)/bin/$$i; \
+ ln -s $$i$(pkg_ver).1 $(d)/$(PF)/share/man/man1/$$i.1; \
+ done
+
+ DH_COMPAT=2 dh_movefiles -p$(p_fjar) $(files_fjar)
+
+ dh_installdocs -p$(p_fjar) $(srcdir)/fastjar/{CHANGES,NEWS,README}
+ dh_installchangelogs -p$(p_fjar) $(srcdir)/fastjar/ChangeLog
+
+ debian/dh_rmemptydirs -p$(p_fjar)
+
+ dh_strip -p$(p_fjar)
+ dh_compress -p$(p_fjar)
+ dh_fixperms -p$(p_fjar)
+ dh_shlibdeps -p$(p_fjar)
+ dh_gencontrol -p$(p_fjar) -- -v$(DEB_EVERSION) $(common_substvars)
+ dh_installdeb -p$(p_fjar)
+ dh_md5sums -p$(p_fjar)
+ dh_builddeb -p$(p_fjar)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libssp.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libssp.mk
@@ -0,0 +1,121 @@
+arch_binaries := $(arch_binaries) libssp
+ifeq ($(with_lib64ssp),yes)
+ arch_binaries := $(arch_binaries) lib64ssp
+endif
+ifeq ($(with_lib32ssp),yes)
+ arch_binaries := $(arch_binaries) lib32ssp
+endif
+
+p_ssp = libssp$(SSP_SONAME)
+p_ssp32 = lib32ssp$(SSP_SONAME)
+p_ssp64 = lib64ssp$(SSP_SONAME)
+p_sspd = libssp$(SSP_SONAME)-dev
+
+d_ssp = debian/$(p_ssp)
+d_ssp32 = debian/$(p_ssp32)
+d_ssp64 = debian/$(p_ssp64)
+d_sspd = debian/$(p_sspd)
+
+dirs_ssp = \
+ $(docdir)/$(p_base) \
+ $(PF)/$(libdir)
+files_ssp = \
+ $(PF)/$(libdir)/libssp.so.*
+
+dirs_sspd = \
+ $(docdir) \
+ $(PF)/include \
+ $(PF)/$(libdir)
+files_sspd = \
+ $(gcc_lib_dir)/include/ssp \
+ $(PF)/$(libdir)/libssp.{a,so,la} \
+ $(PF)/$(libdir)/libssp_nonshared.{a,la}
+
+ifeq ($(with_lib32ssp),yes)
+ dirs_sspd += $(lib32)
+ files_sspd += $(lib32)/libssp.{a,la,so}
+ files_sspd += $(lib32)/libssp_nonshared.{a,la}
+endif
+ifeq ($(with_lib64ssp),yes)
+ dirs_sspd += $(PF)/lib64
+ files_sspd += $(PF)/lib64/libssp.{a,la,so}
+ files_sspd += $(PF)/lib64/libssp_nonshared.{a,la}
+endif
+
+$(binary_stamp)-libssp: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_ssp)
+ dh_installdirs -p$(p_ssp)
+
+ DH_COMPAT=2 dh_movefiles -p$(p_ssp) $(files_ssp)
+ debian/dh_doclink -p$(p_ssp) $(p_base)
+
+ debian/dh_rmemptydirs -p$(p_ssp)
+
+ dh_strip -p$(p_ssp)
+ dh_compress -p$(p_ssp)
+ dh_fixperms -p$(p_ssp)
+ dh_makeshlibs -p$(p_ssp) -V '$(p_ssp) (>= $(DEB_SOVERSION))'
+ dh_shlibdeps -p$(p_ssp)
+ dh_gencontrol -p$(p_ssp) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_ssp)
+ dh_md5sums -p$(p_ssp)
+ dh_builddeb -p$(p_ssp)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64ssp: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_ssp64)
+ dh_installdirs -p$(p_ssp64) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_ssp64) \
+ $(PF)/lib64/libssp.so.*
+
+ debian/dh_doclink -p$(p_ssp64) $(p_base)
+
+ dh_strip -p$(p_ssp64)
+ dh_compress -p$(p_ssp64)
+ dh_fixperms -p$(p_ssp64)
+ dh_makeshlibs -p$(p_ssp64) -V '$(p_ssp64) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_ssp64)
+ dh_gencontrol -p$(p_ssp64) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_ssp64)
+ dh_md5sums -p$(p_ssp64)
+ dh_builddeb -p$(p_ssp64)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32ssp: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_ssp32)
+ dh_installdirs -p$(p_ssp32) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_ssp32) \
+ $(lib32)/libssp.so.*
+
+ debian/dh_doclink -p$(p_ssp32) $(p_base)
+
+ dh_strip -p$(p_ssp32)
+ dh_compress -p$(p_ssp32)
+ dh_fixperms -p$(p_ssp32)
+ dh_makeshlibs -p$(p_ssp32) -V '$(p_ssp32) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_ssp32)
+ dh_gencontrol -p$(p_ssp32) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_ssp32)
+ dh_md5sums -p$(p_ssp32)
+ dh_builddeb -p$(p_ssp32)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-source.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-source.mk
@@ -0,0 +1,28 @@
+indep_binaries := $(indep_binaries) gcc-source
+
+p_source = gcc$(pkg_ver)-source
+d_source= debian/$(p_source)
+
+$(binary_stamp)-gcc-source:
+ dh_testdir
+ dh_testroot
+
+ dh_install -p$(p_source) $(gcc_tarball) usr/src/gcc$(pkg_ver)
+ dh_install -p$(p_source) $(gcj_tarball) usr/src/gcc$(pkg_ver)
+ dh_install -p$(p_source) debian/patches usr/src/gcc$(pkg_ver)
+ chmod 755 debian/$(p_source)/usr/src/gcc$(pkg_ver)/patches/*
+ rm -rf debian/$(p_source)/usr/src/gcc$(pkg_ver)/patches/.svn
+ dh_install -p$(p_source) \
+ debian/rules.defs debian/rules.patch debian/rules.source \
+ debian/rules.unpack debian/multiarch.inc \
+ usr/src/gcc$(pkg_ver)
+
+ debian/dh_doclink -p$(p_source) $(p_base)
+
+ dh_fixperms -p$(p_source)
+ dh_gencontrol -p$(p_source) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_source)
+ dh_md5sums -p$(p_source)
+ dh_builddeb -p$(p_source)
+
+ touch $@
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-softfloat.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-softfloat.mk
@@ -0,0 +1,33 @@
+arch_binaries := $(arch_binaries) softfloat
+
+p_softfloat = gcc$(pkg_ver)-soft-float
+d_softfloat = debian/$(p_softfloat)
+
+dirs_softfloat = \
+ $(PF)/$(libdir)/soft-float \
+ $(gcc_lib_dir)/soft-float
+
+files_softfloat = \
+ $(PF)/$(libdir)/soft-float \
+ $(gcc_lib_dir)/soft-float
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-softfloat: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_softfloat)
+ dh_installdirs -p$(p_softfloat) $(dirs_softfloat)
+ DH_COMPAT=2 dh_movefiles -p$(p_softfloat) $(files_softfloat)
+ debian/dh_doclink -p$(p_softfloat) $(p_base)
+ dh_strip -p$(p_softfloat) -Xlibgcj.a
+ dh_compress -p$(p_softfloat)
+ dh_fixperms -p$(p_softfloat)
+ dh_shlibdeps -p$(p_softfloat)
+ dh_gencontrol -p$(p_softfloat) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_softfloat)
+ dh_md5sums -p$(p_softfloat)
+ dh_builddeb -p$(p_softfloat)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-cpp-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-cpp-cross.mk
@@ -0,0 +1,40 @@
+arch_binaries := $(arch_binaries) cpp
+
+dirs_cpp = \
+ $(docdir) \
+ $(PF)/share/man/man1 \
+ $(PF)/bin \
+ $(gcc_lexec_dir)
+
+files_cpp = \
+ $(PF)/bin/$(DEB_TARGET_GNU_TYPE)-cpp$(pkg_ver) \
+ $(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-cpp$(pkg_ver).1 \
+ $(gcc_lexec_dir)/cc1
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cpp: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cpp)
+ dh_installdirs -p$(p_cpp) $(dirs_cpp)
+ DH_COMPAT=2 dh_movefiles -p$(p_cpp) $(files_cpp)
+
+ debian/dh_doclink -p$(p_cpp) $(p_base)
+ debian/dh_rmemptydirs -p$(p_cpp)
+
+ dh_strip -p$(p_cpp)
+ dh_compress -p$(p_cpp)
+ dh_fixperms -p$(p_cpp)
+ dh_shlibdeps -p$(p_cpp)
+ dh_gencontrol -p$(p_cpp) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_cpp)
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g;s/gcc/cpp/g' < debian/gcc-cross.postinst > debian/$(p_cpp)/DEBIAN/postinst
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g;s/gcc/cpp/g' < debian/gcc-cross.prerm > debian/$(p_cpp)/DEBIAN/prerm
+ chmod 755 debian/$(p_cpp)/DEBIAN/{postinst,prerm}
+ dh_md5sums -p$(p_cpp)
+ dh_builddeb -p$(p_cpp)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-base.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-base.mk
@@ -0,0 +1,27 @@
+arch_binaries := base $(arch_binaries)
+
+# ---------------------------------------------------------------------------
+# gcc-base
+
+$(binary_stamp)-base: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ rm -rf $(d_base)
+ dh_installdirs -p$(p_base)
+ dh_installdocs -p$(p_base)
+ifeq ($(with_base_only),yes)
+ dh_installchangelogs -p$(p_base)
+else
+ dh_installchangelogs -p$(p_base) $(srcdir)/ChangeLog
+endif
+ dh_compress -p$(p_base)
+ for i in copyright changelog.Debian.gz; do \
+ ln -f $(d_base)/usr/share/doc/$(p_base)/$$i \
+ $(d_base)/usr/share/doc/$(p_base)/.$$i; \
+ done
+ dh_fixperms -p$(p_base)
+ dh_gencontrol -p$(p_base) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_base)
+ dh_md5sums -p$(p_base)
+ dh_builddeb -p$(p_base)
+ touch $@
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libmudflap.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libmudflap.mk
@@ -0,0 +1,125 @@
+arch_binaries := $(arch_binaries) libmudflap
+ifeq ($(with_lib64mudflap),yes)
+ arch_binaries := $(arch_binaries) lib64mudflap
+endif
+ifeq ($(with_lib32mudflap),yes)
+ arch_binaries := $(arch_binaries) lib32mudflap
+endif
+
+p_mf = libmudflap$(MUDFLAP_SONAME)
+p_l32mf = lib32mudflap$(MUDFLAP_SONAME)
+p_l64mf = lib64mudflap$(MUDFLAP_SONAME)
+p_mfd = libmudflap$(MUDFLAP_SONAME)-dev
+
+d_mf = debian/$(p_mf)
+d_l32mf = debian/$(p_l32mf)
+d_l64mf = debian/$(p_l64mf)
+d_mfd = debian/$(p_mfd)
+
+dirs_mf = \
+ $(docdir)/$(p_mf) \
+ $(PF)/$(libdir)
+files_mf = \
+ $(PF)/$(libdir)/libmudflap*.so.*
+
+dirs_mfd = \
+ $(docdir) \
+ $(PF)/include \
+ $(PF)/$(libdir)
+files_mfd = \
+ $(PF)/include/mf-runtime.h \
+ $(PF)/$(libdir)/libmudflap*.{a,so,la}
+
+ifeq ($(with_lib32mudflap),yes)
+ dirs_mfd += $(lib32)
+ files_mfd += $(lib32)/libmudflap*.{a,so,la}
+endif
+ifeq ($(with_lib64mudflap),yes)
+ dirs_mfd += $(PF)/lib64
+ files_mfd += $(PF)/lib64/libmudflap*.{a,so,la}
+endif
+
+$(binary_stamp)-libmudflap: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_mf) $(d_mfd)
+ dh_installdirs -p$(p_mf) $(dirs_mf)
+ dh_installdirs -p$(p_mfd) $(dirs_mfd)
+
+ DH_COMPAT=2 dh_movefiles -p$(p_mf) $(files_mf)
+ DH_COMPAT=2 dh_movefiles -p$(p_mfd) $(files_mfd)
+
+ dh_installdocs -p$(p_mf)
+ dh_installchangelogs -p$(p_mf) $(srcdir)/libmudflap/ChangeLog
+ cp -p debian/libmudflap.copyright $(d_mf)/$(docdir)/$(p_mf)/copyright
+ debian/dh_doclink -p$(p_mfd) $(p_mf)
+
+ debian/dh_rmemptydirs -p$(p_mf)
+ debian/dh_rmemptydirs -p$(p_mfd)
+
+ dh_strip -p$(p_mf) -p$(p_mfd)
+ dh_compress -p$(p_mf) -p$(p_mfd)
+ dh_fixperms -p$(p_mf) -p$(p_mfd)
+ dh_makeshlibs -p$(p_mf) -V '$(p_mf) (>= $(DEB_SOVERSION))'
+ dh_shlibdeps -p$(p_mf) -p$(p_mfd)
+ dh_gencontrol -p$(p_mf) -p$(p_mfd) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_mf) -p$(p_mfd)
+ dh_md5sums -p$(p_mf) -p$(p_mfd)
+ dh_builddeb -p$(p_mf) -p$(p_mfd)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64mudflap: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64mf)
+ dh_installdirs -p$(p_l64mf) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_l64mf) \
+ $(PF)/lib64/libmudflap*.so.*
+
+ debian/dh_doclink -p$(p_l64mf) $(p_base)
+
+ dh_strip -p$(p_l64mf)
+ dh_compress -p$(p_l64mf)
+ dh_fixperms -p$(p_l64mf)
+ dh_makeshlibs -p$(p_l64mf) -V '$(p_l64mf) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l64mf)
+ dh_gencontrol -p$(p_l64mf) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l64mf)
+ dh_md5sums -p$(p_l64mf)
+ dh_builddeb -p$(p_l64mf)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32mudflap: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32mf)
+ dh_installdirs -p$(p_l32mf) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_l32mf) \
+ $(lib32)/libmudflap*.so.*
+
+ debian/dh_doclink -p$(p_l32mf) $(p_base)
+
+ dh_strip -p$(p_l32mf)
+ dh_compress -p$(p_l32mf)
+ dh_fixperms -p$(p_l32mf)
+ dh_makeshlibs -p$(p_l32mf) -V '$(p_l32mf) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l32mf)
+ dh_gencontrol -p$(p_l32mf) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l32mf)
+ dh_md5sums -p$(p_l32mf)
+ dh_builddeb -p$(p_l32mf)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-cpp.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-cpp.mk
@@ -0,0 +1,94 @@
+arch_binaries := $(arch_binaries) cpp
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ indep_binaries := $(indep_binaries) cpp-doc
+endif
+
+dirs_cpp = \
+ $(docdir) \
+ $(PF)/share/man/man1 \
+ $(PF)/bin \
+ $(gcc_lexec_dir)
+
+files_cpp = \
+ $(PF)/bin/cpp$(pkg_ver) \
+ $(gcc_lexec_dir)/cc1
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_cpp += \
+ $(PF)/share/man/man1/cpp$(pkg_ver).1
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cpp: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cpp)
+ dh_installdirs -p$(p_cpp) $(dirs_cpp)
+ DH_COMPAT=2 dh_movefiles -p$(p_cpp) $(files_cpp)
+
+ifeq ($(with_common_gcclibdir),yes)
+ ln -sf $(BASE_VERSION) \
+ $(d_cpp)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lib_dir))
+ ifneq ($(gcc_lib_dir),$(gcc_lexec_dir))
+ ln -sf $(BASE_VERSION) \
+ $(d_cpp)/$(subst /$(BASE_VERSION),/$(GCC_VERSION),$(gcc_lexec_dir))
+ endif
+
+ : # compat symlinks (only needed for the 4.1.2 -> 4.1.3 transition)
+ mkdir -p $(d_cpp)/$(old_lib_dir)
+ ln -sf ../$(BASE_VERSION)/cc1 $(d_cpp)/$(old_lib_dir)/cc1
+endif
+
+ ln -sf cpp$(pkg_ver) \
+ $(d_cpp)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-cpp$(pkg_ver)
+ ln -sf cpp$(pkg_ver) \
+ $(d_cpp)/$(PF)/bin/$(TARGET_ALIAS)-cpp$(pkg_ver)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ ln -sf cpp$(pkg_ver).1 \
+ $(d_cpp)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-cpp$(pkg_ver).1
+ ln -sf cpp$(pkg_ver).1 \
+ $(d_cpp)/$(PF)/share/man/man1/$(TARGET_ALIAS)-cpp$(pkg_ver).1
+endif
+
+ debian/dh_doclink -p$(p_cpp) $(p_base)
+ debian/dh_rmemptydirs -p$(p_cpp)
+
+ dh_strip -p$(p_cpp)
+ dh_compress -p$(p_cpp)
+ dh_fixperms -p$(p_cpp)
+ dh_shlibdeps -p$(p_cpp)
+ dh_gencontrol -p$(p_cpp) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_cpp)
+ dh_md5sums -p$(p_cpp)
+ dh_builddeb -p$(p_cpp)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cpp-doc: $(build_html_stamp) $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cppd)
+ dh_installdirs -p$(p_cppd) \
+ $(docdir)/$(p_base) \
+ $(PF)/share/info
+ DH_COMPAT=2 dh_movefiles -p$(p_cppd) \
+ $(PF)/share/info/cpp*
+
+ debian/dh_doclink -p$(p_cppd) $(p_base)
+ dh_installdocs -p$(p_cppd) html/cpp.html html/cppinternals.html
+ rm -f $(d_cppd)/$(docdir)/$(p_base)/copyright
+ debian/dh_rmemptydirs -p$(p_cppd)
+
+ dh_compress -p$(p_cppd)
+ dh_fixperms -p$(p_cppd)
+ dh_installdeb -p$(p_cppd)
+ dh_gencontrol -p$(p_cppd) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_cppd)
+ dh_builddeb -p$(p_cppd)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-gcc-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-gcc-cross.mk
@@ -0,0 +1,109 @@
+arch_binaries := $(arch_binaries) gcc
+
+# gcc must be moved after g77 and g++
+# not all files $(PF)/include/*.h are part of gcc,
+# but it becomes difficult to name all these files ...
+
+dirs_gcc = \
+ $(PF)/bin \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)/include \
+ $(PF)/share/man/man1 $(libdir)
+
+files_gcc = \
+ $(PF)/bin/$(DEB_TARGET_GNU_TYPE)-gcc$(pkg_ver) \
+ $(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-gcc$(pkg_ver).1 \
+ $(gcc_lexec_dir)/collect2 \
+ $(gcc_lib_dir)/{libgcc*,*.o} \
+ $(gcc_lib_dir)/include/README \
+ $(gcc_lib_dir)/include/{float,iso646,limits,std*,syslimits,unwind,varargs}.h \
+ $(shell for d in asm bits gnu linux; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$d \
+ && echo $(gcc_lib_dir)/include/$$d; \
+ done) \
+ $(shell test -e $(d)/$(gcc_lib_dir)/SYSCALLS.c.X \
+ && echo $(gcc_lib_dir)/SYSCALLS.c.X) \
+ $(shell for h in {,e,p,x}mmintrin.h mm3dnow.h mm_malloc.h; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$h \
+ && echo $(gcc_lib_dir)/include/$$h; \
+ done) \
+
+
+ifeq ($(biarch),yes)
+ files_gcc += $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,*.o}
+endif
+ifeq ($(biarch32),yes)
+ files_gcc += $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,*.o}
+endif
+
+ifeq ($(DEB_TARGET_ARCH),ia64)
+ files_gcc += $(gcc_lib_dir)/include/ia64intrin.h
+endif
+
+ifeq ($(DEB_TARGET_ARCH),m68k)
+ files_gcc += $(gcc_lib_dir)/include/math-68881.h
+endif
+
+ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),powerpc ppc64))
+ files_gcc += $(gcc_lib_dir)/include/{altivec.h,ppc-asm.h}
+endif
+
+usr_doc_files = debian/README.Bugs \
+ $(shell test -f $(srcdir)/FAQ && echo $(srcdir)/FAQ)
+ifeq ($(with_check),yes)
+ usr_doc_files += test-summary
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gcc)
+ dh_installdirs -p$(p_gcc) $(dirs_gcc)
+
+ rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
+ ln -sf /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
+ifeq ($(biarch),yes)
+ rm -f $(d)/$(PF)/$(lib64)/libgcc_s.so
+ dh_link -p$(p_gcc) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_64.so \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+endif
+ifeq ($(biarch32),yes)
+ mkdir -p $(d_gcc)/$(gcc_lib_dir)
+ mv $(d)/$(gcc_lib_dir)/$(biarchsubdir) $(d_gcc)/$(gcc_lib_dir)/
+ dh_link -p$(p_gcc) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_32.so \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s_32.so \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+endif
+
+ DH_COMPAT=2 dh_movefiles -p$(p_gcc) $(files_gcc)
+
+# dh_installdebconf
+ debian/dh_doclink -p$(p_gcc) $(p_base)
+ debian/dh_rmemptydirs -p$(p_gcc)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_gcc)
+ dh_compress -p$(p_gcc)
+ dh_fixperms -p$(p_gcc)
+ dh_shlibdeps -p$(p_gcc)
+ dh_gencontrol -p$(p_gcc) -- -v$(DEB_VERSION) $(common_substvars)
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g' < debian/gcc-cross.postinst > debian/$(p_gcc)/DEBIAN/postinst
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g' < debian/gcc-cross.prerm > debian/$(p_gcc)/DEBIAN/prerm
+ chmod 755 debian/$(p_gcc)/DEBIAN/{postinst,prerm}
+ dh_installdeb -p$(p_gcc)
+ dh_md5sums -p$(p_gcc)
+ dh_builddeb -p$(p_gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+ : # remove empty directories, when all components are in place
+ for d in `find $(d) -depth -type d -empty 2> /dev/null`; do \
+ while rmdir $$d 2> /dev/null; do d=`dirname $$d`; done; \
+ done
+
+ @echo "Listing installed files not included in any package:"
+ -find $(d) ! -type d
+
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-ada.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-ada.mk
@@ -0,0 +1,310 @@
+arch_binaries := $(arch_binaries) gnatbase ada
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ indep_binaries := $(indep_binaries) ada-doc
+endif
+
+ifeq ($(with_libgnat),yes)
+ arch_binaries := $(arch_binaries) libgnat
+endif
+
+p_gbase = gnat-$(GNAT_VERSION)-base
+p_gnat = gnat-$(GNAT_VERSION)
+p_lgnat = libgnat-$(GNAT_VERSION)
+p_lgnat_dbg = $(p_lgnat)-dbg
+p_lgnatvsn = libgnatvsn$(GNAT_VERSION)
+p_lgnatvsn_dbg = $(p_lgnatvsn)-dbg
+p_lgnatprj = libgnatprj$(GNAT_VERSION)
+p_lgnatprj_dbg = $(p_lgnatprj)-dbg
+p_gnatd = $(p_gnat)-doc
+
+d_gbase = debian/$(p_gbase)
+d_gnat = debian/$(p_gnat)
+d_lgnat = debian/$(p_lgnat)
+d_lgnatvsn = debian/$(p_lgnatvsn)
+d_lgnatprj = debian/$(p_lgnatprj)
+d_gnatd = debian/$(p_gnatd)
+
+GNAT_TOOLS = gnat gnatbind gnatbl gnatchop gnatclean gnatfind gnatkr gnatlink \
+ gnatls gnatmake gnatname gnatprep gnatxref \
+ gprmake
+
+dirs_gnat = \
+ $(docdir)/$(p_base)/Ada \
+ $(PF)/bin \
+ $(PF)/share/man/man1 \
+ $(gcc_lib_dir) \
+ $(gcc_lexec_dir)
+
+files_gnat = \
+ $(gcc_lexec_dir)/gnat1 \
+ $(gcc_lib_dir)/{adalib,adainclude} \
+ $(foreach i,$(GNAT_TOOLS),$(PF)/bin/$(i))
+
+# $(foreach i,$(GNAT_TOOLS),$(PF)/bin/$(i)-$(GNAT_VERSION))
+
+dirs_lgnat = \
+ $(docdir) \
+ $(PF)/lib
+files_lgnat = \
+ $(PF)/$(libdir)/lib{gnat,gnarl}-$(GNAT_SONAME).so.1
+
+$(binary_stamp)-gnatbase: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ dh_installdocs -p$(p_gbase)
+ dh_installchangelogs -p$(p_gbase)
+ dh_compress -p$(p_gbase)
+ dh_fixperms -p$(p_gbase)
+ dh_gencontrol -p$(p_gbase) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gbase)
+ dh_md5sums -p$(p_gbase)
+ dh_builddeb -p$(p_gbase)
+ touch $@
+
+
+$(binary_stamp)-libgnat: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ : # libgnat
+ rm -rf $(d_lgnat)
+ dh_installdirs -p$(p_lgnat) $(dirs_lgnat)
+
+ for lib in lib{gnat,gnarl}; do \
+ vlib=$$lib-$(GNAT_SONAME); \
+ mv $(d)/$(gcc_lib_dir)/adalib/$$vlib.so.1 $(d)/$(PF)/$(libdir)/. ; \
+ rm -f $(d)/$(gcc_lib_dir)/adalib/$$lib.so.1; \
+ done
+ dh_movefiles -p$(p_lgnat) $(files_lgnat)
+
+ debian/dh_doclink -p$(p_lgnat) $(p_gbase)
+
+ debian/dh_rmemptydirs -p$(p_lgnat)
+
+ dh_strip -p$(p_lgnat) --dbg-package=$(p_lgnat)
+ dh_compress -p$(p_lgnat)
+ dh_fixperms -p$(p_lgnat)
+ b=libgnat; \
+ for ext in preinst postinst prerm postrm; do \
+ for t in '' -dev -dbg; do \
+ v=$(GNAT_VERSION); \
+ if [ -f debian/$$b$$t.$$ext ]; then \
+ cp -pf debian/$$b$$t.$$ext debian/$$b$$v$$t.$$ext; \
+ fi; \
+ done; \
+ done
+
+ dh_makeshlibs -p$(p_lgnat) -V '$(p_lgnat) (>= $(DEB_VERSION))'
+ cat debian/$(p_lgnat)/DEBIAN/shlibs >> debian/shlibs.local
+
+ mkdir -p $(d_lgnat)/usr/share/lintian/overrides
+ cp -p debian/$(p_lgnat).overrides \
+ $(d_lgnat)/usr/share/lintian/overrides/$(p_lgnat)
+
+ dh_shlibdeps -p$(p_lgnat)
+ dh_gencontrol -p$(p_lgnat) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnat)
+ dh_md5sums -p$(p_lgnat)
+ dh_builddeb -p$(p_lgnat)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+
+$(binary_stamp)-libgnatdbg: $(binary_stamp)-libgnat
+ debian/dh_doclink -p$(p_lgnat_dbg) $(p_gbase)
+ dh_compress -p$(p_lgnat_dbg)
+ dh_fixperms -p$(p_lgnat_dbg)
+ dh_gencontrol -p$(p_lgnat_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnat_dbg)
+ dh_md5sums -p$(p_lgnat_dbg)
+ dh_builddeb -p$(p_lgnat_dbg)
+ touch $@
+
+$(binary_stamp)-libgnatvsn:
+ : # libgnatvsn-dev
+ dh_movefiles -plibgnatvsn-dev usr/lib/ada/adalib/gnatvsn
+ dh_movefiles -plibgnatvsn-dev usr/share/ada/adainclude/gnatvsn
+ dh_install -plibgnatvsn-dev \
+ debian/gnatvsn.gpr usr/share/ada/adainclude
+ dh_movefiles -plibgnatvsn-dev usr/lib/libgnatvsn.a
+ dh_link -plibgnatvsn-dev \
+ usr/lib/libgnatvsn.so.$(GNAT_VERSION) \
+ usr/lib/libgnatvsn.so
+ dh_strip -plibgnatvsn-dev -X.a --keep-debug
+ dh_fixperms -plibgnatvsn-dev
+ debian/dh_doclink -plibgnatvsn-dev $(p_gbase)
+ dh_gencontrol -plibgnatvsn-dev -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -plibgnatvsn-dev
+ dh_builddeb -plibgnatvsn-dev
+
+ : # libgnatvsn
+ dh_movefiles -p$(p_lgnatvsn) usr/lib/libgnatvsn.so.$(GNAT_VERSION)
+ debian/dh_doclink -p$(p_lgnatvsn) $(p_gbase)
+ dh_strip -p$(p_lgnatvsn) --dbg-package=$(p_lgnatvsn)
+ dh_makeshlibs -p$(p_lgnatvsn) -V '$(p_lgnatvsn) (>= $(DEB_VERSION))'
+ cat debian/$(p_lgnatvsn)/DEBIAN/shlibs >> debian/shlibs.local
+ dh_shlibdeps -p$(p_lgnatvsn)
+ dh_gencontrol -p$(p_lgnatvsn) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnatvsn)
+ dh_md5sums -p$(p_lgnatvsn)
+ dh_builddeb -p$(p_lgnatvsn)
+
+ touch $@
+
+$(binary_stamp)-libgnatvsndbg: $(binary_stamp)-libgnatvsn
+ debian/dh_doclink -p$(p_lgnatvsn_dbg) $(p_gbase)
+ dh_compress -p$(p_lgnatvsn_dbg)
+ dh_fixperms -p$(p_lgnatvsn_dbg)
+ dh_gencontrol -p$(p_lgnatvsn_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnatvsn_dbg)
+ dh_md5sums -p$(p_lgnatvsn_dbg)
+ dh_builddeb -p$(p_lgnatvsn_dbg)
+ touch $@
+
+$(binary_stamp)-libgnatprj:
+ : # libgnatprj-dev
+ dh_movefiles -plibgnatprj-dev usr/lib/ada/adalib/gnatprj
+ dh_movefiles -plibgnatprj-dev usr/share/ada/adainclude/gnatprj
+ dh_install -plibgnatprj-dev \
+ debian/gnatprj.gpr usr/share/ada/adainclude
+ dh_movefiles -plibgnatprj-dev usr/lib/libgnatprj.a
+ dh_link -plibgnatprj-dev \
+ usr/lib/libgnatprj.so.$(GNAT_VERSION) \
+ usr/lib/libgnatprj.so
+ dh_strip -plibgnatprj-dev -X.a --keep-debug
+ dh_fixperms -plibgnatprj-dev
+ debian/dh_doclink -plibgnatprj-dev $(p_gbase)
+ dh_gencontrol -plibgnatprj-dev -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -plibgnatprj-dev
+ dh_builddeb -plibgnatprj-dev
+
+ : # libgnatprj
+ dh_movefiles -p$(p_lgnatprj) usr/lib/libgnatprj.so.$(GNAT_VERSION)
+ debian/dh_doclink -p$(p_lgnatprj) $(p_gbase)
+ dh_strip -p$(p_lgnatprj) --dbg-package=$(p_lgnatprj)
+ dh_makeshlibs -p$(p_lgnatprj) -V '$(p_lgnatprj) (>= $(DEB_VERSION))'
+ cat debian/$(p_lgnatprj)/DEBIAN/shlibs >> debian/shlibs.local
+ dh_shlibdeps -p$(p_lgnatprj)
+ dh_gencontrol -p$(p_lgnatprj) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnatprj)
+ dh_md5sums -p$(p_lgnatprj)
+ dh_builddeb -p$(p_lgnatprj)
+
+ touch $@
+
+$(binary_stamp)-libgnatprjdbg: $(binary_stamp)-libgnatprj
+ debian/dh_doclink -p$(p_lgnatprj_dbg) $(p_gbase)
+ dh_compress -p$(p_lgnatprj_dbg)
+ dh_fixperms -p$(p_lgnatprj_dbg)
+ dh_gencontrol -p$(p_lgnatprj_dbg) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_lgnatprj_dbg)
+ dh_md5sums -p$(p_lgnatprj_dbg)
+ dh_builddeb -p$(p_lgnatprj_dbg)
+ touch $@
+
+ifeq ($(with_libgnat),yes)
+$(binary_stamp)-ada: $(install_stamp) $(binary_stamp)-libgnat $(binary_stamp)-libgnatdbg
+$(binary_stamp)-ada: $(binary_stamp)-libgnatvsn $(binary_stamp)-libgnatvsndbg
+$(binary_stamp)-ada: $(binary_stamp)-libgnatprj $(binary_stamp)-libgnatprjdbg
+else
+$(binary_stamp)-ada: $(install_stamp)
+endif
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+ : # gnat
+ rm -rf $(d_gnat)
+ dh_installdirs -p$(p_gnat) $(dirs_gnat)
+ dh_movefiles -p$(p_gnat) $(files_gnat)
+
+ifeq (0,1)
+ifeq ($(PKGSOURCE),gnat-$(BASE_VERSION))
+ mkdir -p $(d_gnat)/$(libexecdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)
+ ln -sf ../$(GCC_VERSION)/gnat1 \
+ $(d_gnat)/$(libexecdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)/gnat1
+ mkdir -p $(d_gnat)/$(PF)/$(libdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)
+ ln -sf ../$(GCC_VERSION)/adalib \
+ $(d_gnat)/$(PF)/$(libdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)/adalib
+ ln -sf ../$(GCC_VERSION)/adainclude \
+ $(d_gnat)/$(PF)/$(libdir)/gcc/$(TARGET_ALIAS)/$(BASE_VERSION)/adainclude
+endif
+endif
+
+ifeq ($(with_libgnat),yes)
+ for lib in lib{gnat,gnarl}; do \
+ vlib=$$lib-$(GNAT_SONAME); \
+ dh_link -p$(p_gnat) \
+ /$(PF)/$(libdir)/$$vlib.so.1 /$(PF)/$(libdir)/$$vlib.so \
+ /$(PF)/$(libdir)/$$vlib.so.1 /$(PF)/$(libdir)/$$lib.so; \
+ done
+endif
+ debian/dh_doclink -p$(p_gnat) $(p_gbase)
+
+ cp -p $(srcdir)/gcc/ada/ChangeLog \
+ $(d_gnat)/$(docdir)/$(p_base)/Ada/changelog
+
+ for i in $(GNAT_TOOLS); do \
+ case "$$i" in \
+ gnat) cp -p debian/gnat.1 $(d_gnat)/$(PF)/share/man/man1/ ;; \
+ *) ln -sf gnat.1 $(d_gnat)/$(PF)/share/man/man1/$$i.1; \
+ esac; \
+ done
+
+ debian/dh_rmemptydirs -p$(p_gnat)
+
+ dh_strip -p$(p_gnat)
+ dh_compress -p$(p_gnat)
+ dh_fixperms -p$(p_gnat)
+ find $(d_gnat) -name '*.ali' | xargs chmod 444
+ dh_shlibdeps -p$(p_gnat)
+ dh_gencontrol -p$(p_gnat) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gnat)
+ dh_md5sums -p$(p_gnat)
+ dh_builddeb -p$(p_gnat)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+
+ada_info_dir = $(d_gnatd)/$(PF)/share/info
+
+$(binary_stamp)-ada-doc: $(build_html_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gnatd)
+ dh_installdirs -p$(p_gnatd) \
+ $(docdir)/$(p_base)/Ada \
+ $(PF)/share/info
+
+ cd $(ada_info_dir) && \
+ makeinfo -I $(srcdir)/gcc/doc/include -I $(srcdir)/gcc/ada \
+ -I $(builddir)/gcc \
+ -o gnat_ugn_unw-$(GNAT_VERSION).info \
+ $(builddir)/gcc/doc/gnat_ugn_unw.texi
+ cd $(ada_info_dir) && \
+ makeinfo -I $(srcdir)/gcc/doc/include -I $(srcdir)/gcc/ada \
+ -I $(builddir)/gcc \
+ -o gnat_rm-$(GNAT_VERSION).info \
+ $(srcdir)/gcc/ada/gnat_rm.texi
+ cd $(ada_info_dir) && \
+ makeinfo -I $(srcdir)/gcc/doc/include -I $(srcdir)/gcc/ada \
+ -I $(builddir)/gcc \
+ -o gnat-style-$(GNAT_VERSION).info \
+ $(srcdir)/gcc/ada/gnat-style.texi
+
+ debian/dh_doclink -p$(p_gnatd) $(p_gbase)
+ dh_installdocs -p$(p_gnatd)
+ rm -f $(d_gnatd)/$(docdir)/$(p_base)/copyright
+ cp -p html/gnat_ugn_unw.html html/gnat_rm.html html/gnat-style.html \
+ $(d_gnatd)/$(docdir)/$(p_base)/Ada/
+
+ dh_compress -p$(p_gnatd)
+ dh_fixperms -p$(p_gnatd)
+ dh_installdeb -p$(p_gnatd)
+ dh_gencontrol -p$(p_gnatd) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_gnatd)
+ dh_builddeb -p$(p_gnatd)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-cxx-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-cxx-cross.mk
@@ -0,0 +1,42 @@
+arch_binaries := $(arch_binaries) cxx
+
+dirs_cxx = \
+ $(docdir) \
+ $(PF)/bin \
+ $(gcc_lib_dir) \
+ $(PF)/share/man/man1
+files_cxx = \
+ $(PF)/bin/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver) \
+ $(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver).1 \
+ $(gcc_lib_dir)/cc1plus
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cxx)
+ dh_installdirs -p$(p_cxx) $(dirs_cxx)
+ DH_COMPAT=2 dh_movefiles -p$(p_cxx) $(files_cxx)
+# g++ man page is a .so link
+ rm -f $(d_cxx)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver).1
+ ln -sf $(DEB_TARGET_GNU_TYPE)-gcc$(pkg_ver).1.gz \
+ $(d_cxx)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver).1.gz
+
+ debian/dh_doclink -p$(p_cxx) $(p_base)
+ debian/dh_rmemptydirs -p$(p_cxx)
+
+ dh_strip -p$(p_cxx)
+ dh_compress -p$(p_cxx)
+ dh_fixperms -p$(p_cxx)
+ dh_shlibdeps -p$(p_cxx)
+ dh_gencontrol -p$(p_cxx) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_cxx)
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g;s/gcc/g++/g' < debian/gcc-cross.postinst > debian/$(p_cxx)/DEBIAN/postinst
+ sed 's/cross-/$(TP)/g;s/-ver/$(pkg_ver)/g;s/gcc/g++/g' < debian/gcc-cross.prerm > debian/$(p_cxx)/DEBIAN/prerm
+ chmod 755 debian/$(p_cxx)/DEBIAN/{postinst,prerm}
+ dh_md5sums -p$(p_cxx)
+ dh_builddeb -p$(p_cxx)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libffi.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libffi.mk
@@ -0,0 +1,142 @@
+arch_binaries := $(arch_binaries) libffi
+ifeq ($(with_lib64ffi),yes)
+ arch_binaries := $(arch_binaries) lib64ffi
+endif
+ifeq ($(with_lib32ffi),yes)
+ arch_binaries := $(arch_binaries) lib32ffi
+endif
+
+p_ffi = libffi$(FFI_SONAME)
+p_l32ffi= lib32ffi$(FFI_SONAME)
+p_l64ffi= lib64ffi$(FFI_SONAME)
+p_ffid = libffi$(FFI_SONAME)-dev
+
+d_ffi = debian/$(p_ffi)
+d_l32ffi= debian/$(p_l32ffi)
+d_l64ffi= debian/$(p_l64ffi)
+d_ffid = debian/$(p_ffid)
+
+dirs_ffi = \
+ $(docdir)/$(p_ffi) \
+ $(PF)/$(libdir)
+files_ffi = \
+ $(PF)/$(libdir)/libffi.so.*
+
+dirs_ffid = \
+ $(docdir) \
+ $(PF)/include \
+ $(gcc_lib_dir)/include
+files_ffid = \
+ $(gcc_lib_dir)/include/libffi \
+ $(PF)/include/{ffi.h,ffitarget.h} \
+ $(PF)/$(libdir)/libffi.{a,so,la}
+
+ifeq ($(with_lib32ffi),yes)
+ dirs_ffid += $(lib32)
+ files_ffid += $(lib32)/libffi.{a,so,la}
+endif
+ifeq ($(with_lib64ffi),yes)
+ dirs_ffid += $(PF)/lib64
+ files_ffid += $(PF)/lib64/libffi.{a,so,la}
+endif
+
+$(binary_stamp)-libffi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_ffi) $(d_ffid)
+ dh_installdirs -p$(p_ffi) $(dirs_ffi)
+ dh_installdirs -p$(p_ffid) $(dirs_ffid)
+
+ mv $(d)/$(gcc_lib_dir)/include/libffi/ffitarget.h $(d)/$(PF)/include/.
+
+ DH_COMPAT=2 dh_movefiles -p$(p_ffi) $(files_ffi)
+ DH_COMPAT=2 dh_movefiles -p$(p_ffid) $(files_ffid)
+
+ cp -p $(buildlibdir)/libffi/.libs/libffi_convenience.a \
+ $(d_ffid)/$(PF)/lib/libffi_pic.a
+
+ifeq ($(with_lib64ffi),yes)
+ cp -p $(buildlibdir)/64/libffi/.libs/libffi_convenience.a \
+ $(d_ffid)/$(PF)/$(lib64)/libffi_pic.a
+endif
+ifeq ($(with_lib32ffi),yes)
+ cp -p $(buildlibdir)/32/libffi/.libs/libffi_convenience.a \
+ $(d_ffid)/$(lib32)/libffi_pic.a
+endif
+
+ dh_installdocs -p$(p_ffi) $(srcdir)/libffi/README
+ dh_installchangelogs -p$(p_ffi) $(srcdir)/libffi/ChangeLog
+ cp -p $(srcdir)/libffi/LICENSE $(d_ffi)/$(docdir)/$(p_ffi)/copyright
+ cp -p $(srcdir)/libffi/ChangeLog.libgcj \
+ $(d_ffi)/$(docdir)/$(p_ffi)/changelog.libgcj
+ debian/dh_doclink -p$(p_ffid) $(p_ffi)
+
+ debian/dh_rmemptydirs -p$(p_ffi)
+ debian/dh_rmemptydirs -p$(p_ffid)
+
+ dh_strip -p$(p_ffi) -p$(p_ffid)
+ dh_compress -p$(p_ffi) -p$(p_ffid)
+ dh_fixperms -p$(p_ffi) -p$(p_ffid)
+ dh_makeshlibs -p$(p_ffi) -V '$(p_ffi) (>= $(DEB_FFI_SOVERSION))'
+ dh_shlibdeps -p$(p_ffi) -p$(p_ffid)
+ dh_gencontrol -p$(p_ffi) -p$(p_ffid) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_ffi) -p$(p_ffid)
+ dh_md5sums -p$(p_ffi) -p$(p_ffid)
+ dh_builddeb -p$(p_ffi) -p$(p_ffid)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64ffi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64ffi)
+ dh_installdirs -p$(p_l64ffi) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_l64ffi) \
+ $(PF)/lib64/libffi.so.*
+
+ debian/dh_doclink -p$(p_l64ffi) $(p_base)
+
+ dh_strip -p$(p_l64ffi)
+ dh_compress -p$(p_l64ffi)
+ dh_fixperms -p$(p_l64ffi)
+ dh_makeshlibs -p$(p_l64ffi) -V '$(p_l64ffi) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l64ffi)
+ dh_gencontrol -p$(p_l64ffi) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l64ffi)
+ dh_md5sums -p$(p_l64ffi)
+ dh_builddeb -p$(p_l64ffi)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32ffi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32ffi)
+ dh_installdirs -p$(p_l32ffi) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_l32ffi) \
+ $(lib32)/libffi.so.*
+
+ debian/dh_doclink -p$(p_l32ffi) $(p_base)
+
+ dh_strip -p$(p_l32ffi)
+ dh_compress -p$(p_l32ffi)
+ dh_fixperms -p$(p_l32ffi)
+ dh_makeshlibs -p$(p_l32ffi) -V '$(p_l32ffi) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l32ffi)
+ dh_gencontrol -p$(p_l32ffi) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l32ffi)
+ dh_md5sums -p$(p_l32ffi)
+ dh_builddeb -p$(p_l32ffi)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-fixincl.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-fixincl.mk
@@ -0,0 +1,47 @@
+arch_binaries := $(arch_binaries) fixincl
+
+p_fix = fixincludes
+d_fix = debian/$(p_fix)
+
+dirs_fix = \
+ $(docdir)/$(p_base)/fixincludes \
+ $(PF)/share/man/man1 \
+ $(PF)/bin \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)
+files_fix = \
+ $(gcc_lexec_dir)/install-tools \
+ $(gcc_lib_dir)/install-tools
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-fixincl: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_fix)
+ dh_installdirs -p$(p_fix) $(dirs_fix)
+ DH_COMPAT=2 dh_movefiles -p$(p_fix) $(files_fix)
+
+# $(IP) $(builddir)/gcc/fixinc/fixincl $(d_fix)/$(PF)/lib/fixincludes/
+# sed -e "s,^FIXINCL=\(.*\),FIXINCL=/$(PF)/lib/fixincludes/fixincl," \
+# $(builddir)/gcc/fixinc.sh \
+# > $(d_fix)/$(PF)/lib/fixincludes/fixinc.sh
+# chmod 755 $(d_fix)/$(PF)/lib/fixincludes/fixinc.sh
+ $(IR) $(srcdir)/fixincludes/README \
+ $(d_fix)/$(docdir)/$(p_base)/fixincludes
+ sed -e 's,@LIBEXECDIR@,$(gcc_lexec_dir),g' debian/fixincludes.in \
+ > $(d_fix)/$(PF)/bin/fixincludes
+ chmod 755 $(d_fix)/$(PF)/bin/fixincludes
+
+ debian/dh_doclink -p$(p_fix) $(p_base)
+ dh_strip -p$(p_fix)
+ dh_compress -p$(p_fix)
+ dh_fixperms -p$(p_fix)
+ dh_shlibdeps -p$(p_fix)
+ dh_gencontrol -p$(p_fix) -- -v$(DEB_EVERSION) $(common_substvars)
+ dh_installdeb -p$(p_fix)
+ dh_md5sums -p$(p_fix)
+ dh_builddeb -p$(p_fix)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-gcc.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-gcc.mk
@@ -0,0 +1,304 @@
+ifneq (,$(filter yes, $(biarch) $(biarch32)))
+ arch_binaries := $(arch_binaries) gcc-multi
+endif
+arch_binaries := $(arch_binaries) gcc
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ indep_binaries := $(indep_binaries) gcc-doc
+endif
+ifeq ($(with_nls),yes)
+ indep_binaries := $(indep_binaries) gcc-locales
+endif
+
+# gcc must be moved after g77 and g++
+# not all files $(PF)/include/*.h are part of gcc,
+# but it becomes difficult to name all these files ...
+
+dirs_gcc = \
+ $(docdir)/$(p_base)/{gcc,libssp} \
+ $(PF)/bin \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)/include \
+ $(PF)/share/man/man1 $(libdir)
+
+files_gcc = \
+ $(PF)/bin/{gcc,gcov,gccbug}$(pkg_ver) \
+ $(PF)/share/man/man1/gccbug$(pkg_ver).1 \
+ $(gcc_lexec_dir)/collect2 \
+ $(gcc_lib_dir)/{libgcc*,libgcov.a,*.o} \
+ $(gcc_lib_dir)/include/README \
+ $(gcc_lib_dir)/include/{float,iso646,limits,std*,syslimits,unwind,varargs}.h \
+ $(shell for d in asm bits gnu linux; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$d \
+ && echo $(gcc_lib_dir)/include/$$d; \
+ done) \
+ $(shell test -e $(d)/$(gcc_lib_dir)/SYSCALLS.c.X \
+ && echo $(gcc_lib_dir)/SYSCALLS.c.X) \
+ $(shell for h in {,e,p,x}mmintrin.h mm3dnow.h mm_malloc.h; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$h \
+ && echo $(gcc_lib_dir)/include/$$h; \
+ done)
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_gcc += \
+ $(PF)/share/man/man1/{gcc,gcov}$(pkg_ver).1
+endif
+
+ifeq ($(with_libssp),yes)
+ files_gcc += $(gcc_lib_dir)/include/ssp
+endif
+
+ifeq ($(DEB_HOST_ARCH),ia64)
+ files_gcc += $(gcc_lib_dir)/include/ia64intrin.h
+endif
+
+ifeq ($(DEB_HOST_ARCH),m68k)
+ files_gcc += $(gcc_lib_dir)/include/math-68881.h
+endif
+
+ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),powerpc ppc64))
+ files_gcc += $(gcc_lib_dir)/include/{altivec.h,ppc-asm.h,spe.h}
+endif
+
+usr_doc_files = debian/README.Bugs \
+ $(shell test -f $(srcdir)/FAQ && echo $(srcdir)/FAQ)
+ifeq ($(with_check),yes)
+ usr_doc_files += test-summary
+endif
+
+p_loc = gcc$(pkg_ver)-locales
+d_loc = debian/$(p_loc)
+
+p_gcc_m = gcc$(pkg_ver)-multilib
+d_gcc_m = debian/$(p_gcc_m)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gcc)
+ dh_installdirs -p$(p_gcc) $(dirs_gcc)
+
+ rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
+ ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
+
+ifeq ($(with_libssp),yes)
+ mv $(d)/$(PF)/lib/libssp*.a $(d_gcc)/$(gcc_lib_dir)/
+ rm -f $(d)/$(PF)/lib/libssp*.{la,so}
+ dh_link -p$(p_gcc) \
+ /$(PF)/lib/libssp.so.$(SSP_SONAME) /$(gcc_lib_dir)/libssp.so
+ cp -p $(srcdir)/libssp/ChangeLog \
+ $(d_gcc)/$(docdir)/$(p_base)/libssp/changelog
+endif
+ cp -p debian/gccbug.1 $(d)/$(PF)/share/man/man1/gccbug$(pkg_ver).1
+
+ DH_COMPAT=2 dh_movefiles -p$(p_gcc) $(files_gcc)
+
+ifeq ($(with_common_gcclibdir),yes)
+ : # compat symlinks (only needed for the 4.1.2 -> 4.1.3 transition)
+ mkdir -p $(d_gcc)/$(old_lib_dir)/include
+ for i in $(d_gcc)/$(gcc_lib_dir)/*; do \
+ [ -d "$$i" ] && continue; \
+ b=$$(basename $$i); \
+ ln -sf ../$(BASE_VERSION)/$$b $(d_gcc)/$(old_lib_dir)/$$b; \
+ done
+ for i in $(d_gcc)/$(gcc_lib_dir)/include/*.h; do \
+ b=include/$$(basename $$i); \
+ ln -sf ../$(BASE_VERSION)/$$b $(d_gcc)/$(old_lib_dir)/$$b; \
+ done
+endif
+
+ ln -sf gcc$(pkg_ver) \
+ $(d_gcc)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-gcc$(pkg_ver)
+ ln -sf gcc$(pkg_ver) \
+ $(d_gcc)/$(PF)/bin/$(TARGET_ALIAS)-gcc$(pkg_ver)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ ln -sf gcc$(pkg_ver).1 \
+ $(d_gcc)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-gcc$(pkg_ver).1
+ ln -sf gcc$(pkg_ver).1 \
+ $(d_gcc)/$(PF)/share/man/man1/$(TARGET_ALIAS)-gcc$(pkg_ver).1
+endif
+
+# dh_installdebconf
+ debian/dh_doclink -p$(p_gcc) $(p_base)
+ cp -p $(usr_doc_files) $(d_gcc)/$(docdir)/$(p_base)/.
+ if [ -f testsuite-comparision ]; then \
+ cp -p testsuite-comparision $(d_gcc)/$(docdir)/$(p_base)/. ; \
+ fi
+ cp -p debian/README.ssp $(d_gcc)/$(docdir)/$(p_base)/
+ cp -p debian/NEWS.gcc $(d_gcc)/$(docdir)/$(p_base)/NEWS
+ cp -p debian/NEWS.html $(d_gcc)/$(docdir)/$(p_base)/NEWS.html
+ cp -p $(srcdir)/gcc/ChangeLog \
+ $(d_gcc)/$(docdir)/$(p_base)/gcc/changelog
+ if [ -f $(builddir)/gcc/.bad_compare ]; then \
+ ( \
+ echo "The comparision of the stage2 and stage3 object files shows differences."; \
+ echo "The Debian package was modified to ignore these differences."; \
+ echo ""; \
+ echo "The following files differ:"; \
+ echo ""; \
+ cat $(builddir)/gcc/.bad_compare; \
+ ) > $(d_gcc)/$(docdir)/$(p_base)/BOOTSTRAP_COMPARISION_FAILURE; \
+ else \
+ true; \
+ fi
+ debian/dh_rmemptydirs -p$(p_gcc)
+ dh_strip -p$(p_gcc)
+ dh_compress -p$(p_gcc) -X README.Bugs
+ dh_fixperms -p$(p_gcc)
+ dh_shlibdeps -p$(p_gcc)
+ dh_gencontrol -p$(p_gcc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gcc)
+ dh_md5sums -p$(p_gcc)
+ dh_builddeb -p$(p_gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+ : # remove empty directories, when all components are in place
+ for d in `find $(d) -depth -type d -empty 2> /dev/null`; do \
+ while rmdir $$d 2> /dev/null; do d=`dirname $$d`; done; \
+ done
+
+ @echo "Listing installed files not included in any package:"
+ -find $(d) ! -type d
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc-multi: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gcc_m)
+ dh_installdirs -p$(p_gcc_m) \
+ $(docdir) \
+ $(gcc_lib_dir)/$(biarchsubdir) \
+
+ifeq ($(biarch),yes)
+ DH_COMPAT=2 dh_movefiles -p$(p_gcc_m) \
+ $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,libgcov.a,*.o}
+ rm -f $(d)/$(PF)/$(lib64)/libgcc_s.so
+ dh_link -p$(p_gcc_m) \
+ /$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_64.so \
+ /$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+ ifeq ($(with_lib64gmath),yes)
+ rm -f $(d)/$(PF)/$(lib64)/libgcc-math.{la,so}
+ dh_link -p$(p_gcc_m) \
+ /$(PF)/$(lib64)/libgcc-math.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc-math.so
+ mv $(d)/$(PF)/$(lib64)/libgcc-math.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/
+ endif
+endif
+ifeq ($(biarch32),yes)
+ DH_COMPAT=2 dh_movefiles -p$(p_gcc_m) \
+ $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,libgcov.a,*.o}
+ rm -f $(d)/$(lib32)/libgcc_s.so
+ dh_link -p$(p_gcc_m) \
+ /$(lib32)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_32.so \
+ /$(lib32)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+ ifeq ($(with_lib32gmath),yes)
+ rm -f $(d)/$(lib32)/libgcc-math.{la,so}
+ dh_link -p$(p_gcc_m) \
+ /$(lib32)/libgcc-math.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc-math.so
+ mv $(d)/$(lib32)/libgcc-math.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/
+ endif
+endif
+
+ifeq ($(with_libssp),yes)
+ ifeq ($(biarch),yes)
+ mv $(d)/$(PF)/$(lib64)/libssp*.a $(d_gcc_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ rm -f $(d)/$(PF)/$(lib64)/$(biarchsubdir)/libssp*.{la,so}
+ dh_link -p$(p_gcc_m) \
+ /$(PF)/$(lib64)/libssp.so.$(SSP_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libssp.so
+ endif
+ ifeq ($(biarch32),yes)
+ mv $(d)/$(lib32)/libssp*.a $(d_gcc_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ rm -f $(d)/$(lib32)/$(biarchsubdir)/libssp*.{la,so}
+ dh_link -p$(p_gcc_m) \
+ /$(lib32)/libssp.so.$(SSP_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libssp.so
+ endif
+endif
+
+ifeq ($(with_common_gcclibdir),yes)
+ : # compat symlinks (only needed for the 4.1.2 -> 4.1.3 transition)
+ ifeq ($(biarch),yes)
+ mkdir -p $(d_gcc_m)/$(old_lib_dir)/$(biarchsubdir)
+ for i in $(d_gcc_m)/$(gcc_lib_dir)/$(biarchsubdir)/*; do \
+ b=$(biarchsubdir)/$$(basename $$i); \
+ ln -sf ../$(BASE_VERSION)/$$b $(d_gcc_m)/$(old_lib_dir)/$$b; \
+ done
+ endif
+ ifeq ($(biarch32),yes)
+ mkdir -p $(d_gcc_m)/$(old_lib_dir)/$(biarchsubdir)
+ for i in $(d_gcc_m)/$(gcc_lib_dir)/$(biarchsubdir)/*; do \
+ b=$(biarchsubdir)/$$(basename $$i); \
+ ln -sf ../$(BASE_VERSION)/$$b $(d_gcc_m)/$(old_lib_dir)/$$b; \
+ done
+ endif
+endif
+
+ debian/dh_doclink -p$(p_gcc_m) $(p_base)
+ debian/dh_rmemptydirs -p$(p_gcc_m)
+
+ dh_strip -p$(p_gcc_m)
+ dh_compress -p$(p_gcc_m)
+ dh_shlibdeps -p$(p_gcc_m)
+ dh_fixperms -p$(p_gcc_m)
+ dh_installdeb -p$(p_gcc_m)
+ dh_gencontrol -p$(p_gcc_m) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_gcc_m)
+ dh_builddeb -p$(p_gcc_m)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc-locales: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_loc)
+ dh_installdirs -p$(p_loc) \
+ $(docdir)
+ DH_COMPAT=2 dh_movefiles -p$(p_loc) \
+ $(PF)/share/locale/*/*/cpplib*.* \
+ $(PF)/share/locale/*/*/gcc*.*
+
+ debian/dh_doclink -p$(p_loc) $(p_base)
+ debian/dh_rmemptydirs -p$(p_loc)
+
+ dh_compress -p$(p_loc)
+ dh_fixperms -p$(p_loc)
+ dh_installdeb -p$(p_loc)
+ dh_gencontrol -p$(p_loc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_loc)
+ dh_builddeb -p$(p_loc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcc-doc: $(build_html_stamp) $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_doc)
+ dh_installdirs -p$(p_doc) \
+ $(docdir)/$(p_base) \
+ $(PF)/share/info
+ DH_COMPAT=2 dh_movefiles -p$(p_doc) \
+ $(PF)/share/info/gcc*
+ rm -f $(d_doc)/$(PF)/share/info/gccinst*
+
+ debian/dh_doclink -p$(p_doc) $(p_base)
+ dh_installdocs -p$(p_doc) html/gcc.html html/gccint.html
+ rm -f $(d_doc)/$(docdir)/$(p_base)/copyright
+ debian/dh_rmemptydirs -p$(p_doc)
+
+ dh_compress -p$(p_doc)
+ dh_fixperms -p$(p_doc)
+ dh_installdeb -p$(p_doc)
+ dh_gencontrol -p$(p_doc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_doc)
+ dh_builddeb -p$(p_doc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-objcxx.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-objcxx.mk
@@ -0,0 +1,62 @@
+ifneq (,$(filter yes, $(biarch) $(biarch32)))
+ arch_binaries := $(arch_binaries) objcxx-multi
+endif
+arch_binaries := $(arch_binaries) objcxx
+
+p_objcx = gobjc++$(pkg_ver)
+d_objcx = debian/$(p_objcx)
+
+p_objcx_m = gobjc++$(pkg_ver)-multilib
+d_objcx_m = debian/$(p_objcx_m)
+
+dirs_objcx = \
+ $(docdir)/$(p_base)/Obj-C++ \
+ $(gcc_lexec_dir)
+
+files_objcx = \
+ $(gcc_lexec_dir)/cc1objplus
+
+$(binary_stamp)-objcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_objcx)
+ dh_installdirs -p$(p_objcx) $(dirs_objcx)
+ DH_COMPAT=2 dh_movefiles -p$(p_objcx) $(files_objcx)
+
+ debian/dh_doclink -p$(p_objcx) $(p_base)
+ cp -p $(srcdir)/gcc/objcp/ChangeLog \
+ $(d_objcx)/$(docdir)/$(p_base)/Obj-C++/changelog
+
+ debian/dh_rmemptydirs -p$(p_objcx)
+
+ dh_strip -p$(p_objcx)
+ dh_compress -p$(p_objcx)
+
+ dh_fixperms -p$(p_objcx)
+ dh_shlibdeps -p$(p_objcx)
+ dh_gencontrol -p$(p_objcx) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objcx)
+ dh_md5sums -p$(p_objcx)
+ dh_builddeb -p$(p_objcx)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+$(binary_stamp)-objcxx-multi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+
+ rm -rf $(d_objcx_m)
+
+ debian/dh_doclink -p$(p_objcx_m) $(p_base)
+ debian/dh_rmemptydirs -p$(p_objcx_m)
+ dh_strip -p$(p_objcx_m)
+ dh_compress -p$(p_objcx_m)
+
+ dh_fixperms -p$(p_objcx_m)
+ dh_shlibdeps -p$(p_objcx_m)
+ dh_gencontrol -p$(p_objcx_m) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objcx_m)
+ dh_md5sums -p$(p_objcx_m)
+ dh_builddeb -p$(p_objcx_m)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-snapshot.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-snapshot.mk
@@ -0,0 +1,87 @@
+arch_binaries := $(arch_binaries) snapshot
+
+p_snap = gcc-snapshot
+d_snap = debian/$(p_snap)
+
+dirs_snap = \
+ $(docdir)/$(p_snap) \
+ usr/lib
+files_snap =
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-snapshot: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_snap)
+ dh_installdirs -p$(p_snap) $(dirs_snap)
+
+ -find $(d) -name '*.gch' -type d | xargs rm -rf
+
+ : # dh_movefiles -p$(p_snap) $(files_snap)
+ rm -f $(d_snap)/$(PF)
+ mv $(d)/$(PF) $(d_snap)/usr/lib/
+
+ rm -rf $(d_snap)/$(PF)/lib/nof
+
+ifeq ($(DEB_TARGET_ARCH),hppa)
+ rm -f $(install_hppa64_stamp)
+
+ : # provide as and ld links
+ dh_link -p $(p_snap) \
+ /usr/bin/hppa64-linux-gnu-as \
+ /$(PF)/lib/gcc/hppa64-linux-gnu/$(GCC_VERSION)/as \
+ /usr/bin/hppa64-linux-gnu-ld \
+ /$(PF)/lib/gcc/hppa64-linux-gnu/$(GCC_VERSION)/ld
+
+ DH_COMPAT=2 dh_movefiles -p$(p_snap) --sourcedir=$(d_hppa64) \
+ $(PF)/libexec \
+ $(PF)/lib \
+ $(PF)/bin/hppa64-linux-gnu-{cpp,gcc}
+endif
+
+ifeq ($(with_check),yes)
+ dh_installdocs -p$(p_snap) test-summary
+ ifeq ($(with_pascal),yes)
+ cp -p gpc-test-summary $(d_snap)/$(docdir)/$(p_snap)/
+ endif
+else
+ dh_installdocs -p$(p_snap)
+endif
+ if [ -f $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt ]; \
+ then \
+ cp -p $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt \
+ $(d_snap)/$(docdir)/$(p_snap)/libstdc++6_symbols.txt; \
+ fi
+ cp -p debian/README.snapshot \
+ $(d_snap)/$(docdir)/$(p_snap)/README.Debian
+ dh_installchangelogs -p$(p_snap)
+ifeq ($(DEB_TARGET_ARCH),hppa)
+ dh_strip -p$(p_snap) -Xdebug -X.o -X.a
+else
+ dh_strip -p$(p_snap) -Xdebug
+endif
+ dh_compress -p$(p_snap)
+ -find $(d_snap) -type d ! -perm 755 -exec chmod 755 {} \;
+ dh_fixperms -p$(p_snap)
+ifeq ($(biarch),yes)
+ mv $(d_snap)/$(PF)/lib64 .
+endif
+ifeq ($(biarch32),yes)
+ mv $(d_snap)/$(PF)/lib32 .
+endif
+ dh_shlibdeps -p$(p_snap) \
+ -l$(d_snap)/$(PF)/lib:$(d_snap)/$(gcc_lib_dir)
+ifeq ($(biarch),yes)
+ mv lib64 $(d_snap)/$(PF)/
+endif
+ifeq ($(biarch32),yes)
+ mv lib32 $(d_snap)/$(PF)/
+endif
+ dh_gencontrol -p$(p_snap) -- $(common_substvars)
+ dh_installdeb -p$(p_snap)
+ dh_md5sums -p$(p_snap)
+ dh_builddeb -p$(p_snap)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-treelang.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-treelang.mk
@@ -0,0 +1,55 @@
+arch_binaries := $(arch_binaries) treelang
+
+p_tree = treelang$(pkg_ver)
+d_tree = debian/$(p_tree)
+
+dirs_tree = \
+ $(docdir)/$(p_base)/treelang \
+ $(gcc_lexec_dir) \
+ $(PF)/bin \
+ $(PF)/share/info
+
+files_tree = \
+ $(PF)/bin/gtreelang$(pkg_ver) \
+ $(gcc_lexec_dir)/tree1
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_tree += \
+ $(PF)/share/info/treelang*
+endif
+
+$(binary_stamp)-treelang: $(build_html_stamp) $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_tree)
+ dh_installdirs -p$(p_tree) $(dirs_tree)
+ DH_COMPAT=2 dh_movefiles -p$(p_tree) $(files_tree)
+
+ debian/dh_doclink -p$(p_tree) $(p_base)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ dh_installdocs -p$(p_tree)
+ rm -f $(d_tree)/$(docdir)/$(p_base)/copyright
+ cp -p html/treelang.html $(d_tree)/$(docdir)/$(p_base)/treelang/
+endif
+ cp -p $(srcdir)/gcc/treelang/README \
+ $(d_tree)/$(docdir)/$(p_base)/treelang/.
+ cp -p $(srcdir)/gcc/treelang/ChangeLog \
+ $(d_tree)/$(docdir)/$(p_base)/treelang/changelog
+ cp -p debian/README.treelang \
+ $(d_tree)/$(docdir)/$(p_base)/treelang/README.Debian
+
+ debian/dh_rmemptydirs -p$(p_tree)
+
+ dh_strip -p$(p_tree)
+ dh_compress -p$(p_tree)
+
+ dh_fixperms -p$(p_tree)
+ dh_shlibdeps -p$(p_tree)
+ dh_gencontrol -p$(p_tree) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_tree)
+ dh_md5sums -p$(p_tree)
+ dh_builddeb -p$(p_tree)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-cxx.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-cxx.mk
@@ -0,0 +1,112 @@
+ifneq (,$(filter yes, $(biarch) $(biarch32)))
+ arch_binaries := $(arch_binaries) cxx-multi
+endif
+arch_binaries := $(arch_binaries) cxx
+
+dirs_cxx = \
+ $(docdir)/$(p_base)/C++ \
+ $(PF)/bin \
+ $(PF)/share/info \
+ $(gcc_lexec_dir) \
+ $(PF)/share/man/man1
+files_cxx = \
+ $(PF)/bin/g++$(pkg_ver) \
+ $(gcc_lexec_dir)/cc1plus
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_cxx += \
+ $(PF)/share/man/man1/g++$(pkg_ver).1
+endif
+
+p_cxx_m = g++$(pkg_ver)-multilib
+d_cxx_m = debian/$(p_cxx_m)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cxx)
+ dh_installdirs -p$(p_cxx) $(dirs_cxx)
+ DH_COMPAT=2 dh_movefiles -p$(p_cxx) $(files_cxx)
+
+ ln -sf g++$(pkg_ver) \
+ $(d_cxx)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver)
+ ln -sf g++$(pkg_ver) \
+ $(d_cxx)/$(PF)/bin/$(TARGET_ALIAS)-g++$(pkg_ver)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+# g++ man page is a .so link
+ rm -f $(d_cxx)/$(PF)/share/man/man1/g++$(pkg_ver).1
+ ln -sf gcc$(pkg_ver).1.gz \
+ $(d_cxx)/$(PF)/share/man/man1/g++$(pkg_ver).1.gz
+ ln -sf g++$(pkg_ver).1.gz \
+ $(d_cxx)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-g++$(pkg_ver).1.gz
+ ln -sf g++$(pkg_ver).1.gz \
+ $(d_cxx)/$(PF)/share/man/man1/$(TARGET_ALIAS)-g++$(pkg_ver).1.gz
+endif
+
+ debian/dh_doclink -p$(p_cxx) $(p_base)
+ cp -p debian/README.C++ $(d_cxx)/$(docdir)/$(p_base)/C++/
+ cp -p $(srcdir)/gcc/cp/ChangeLog \
+ $(d_cxx)/$(docdir)/$(p_base)/C++/changelog
+ debian/dh_rmemptydirs -p$(p_cxx)
+
+ dh_strip -p$(p_cxx)
+ dh_compress -p$(p_cxx)
+ dh_fixperms -p$(p_cxx)
+ dh_shlibdeps -p$(p_cxx)
+ dh_gencontrol -p$(p_cxx) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_cxx)
+ dh_md5sums -p$(p_cxx)
+ dh_builddeb -p$(p_cxx)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-cxx-multi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_cxx_m)
+ dh_installdirs -p$(p_cxx_m) \
+ $(docdir) \
+ $(gcc_lib_dir)/$(biarchsubdir)
+
+ifeq ($(biarch),yes)
+ mv $(d)/$(PF)/lib64/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/$(biarchsubdir)/.
+endif
+ifeq ($(biarch32),yes)
+ mv $(d)/$(lib32)/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/$(biarchsubdir)/.
+endif
+
+ DH_COMPAT=2 dh_movefiles -p$(p_cxx_m) \
+ $(gcc_lib_dir)/$(biarchsubdir)/libstdc++.{a,so} \
+ $(gcc_lib_dir)/$(biarchsubdir)/libsupc++.a \
+ $(gcc_lib_dir)/$(biarchsubdir)/libstdc++_pic.a
+
+ifeq ($(biarch),yes)
+ dh_link -p$(p_cxx_m) \
+ /$(PF)/lib64/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+ifeq ($(biarch32),yes)
+ dh_link -p$(p_cxx_m) \
+ /$(lib32)/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+
+ debian/dh_doclink -p$(p_cxx_m) $(p_base)
+ debian/dh_rmemptydirs -p$(p_cxx_m)
+
+ dh_strip -p$(p_cxx_m)
+ dh_compress -p$(p_cxx_m)
+ dh_fixperms -p$(p_cxx_m)
+ dh_shlibdeps -p$(p_cxx_m)
+ dh_gencontrol -p$(p_cxx_m) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_cxx_m)
+ dh_md5sums -p$(p_cxx_m)
+ dh_builddeb -p$(p_cxx_m)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-hppa64.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-hppa64.mk
@@ -0,0 +1,29 @@
+arch_binaries := $(arch_binaries) hppa64
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-hppa64: $(install_hppa64_stamp)
+ dh_testdir
+ dh_testroot
+
+# dh_installdirs -p$(p_hppa64)
+
+ : # provide as and ld links
+ dh_link -p $(p_hppa64) \
+ /usr/bin/hppa64-linux-gnu-as \
+ /$(PF)/lib/gcc/hppa64-linux-gnu/$(GCC_VERSION)/as \
+ /usr/bin/hppa64-linux-gnu-ld \
+ /$(PF)/lib/gcc/hppa64-linux-gnu/$(GCC_VERSION)/ld
+
+ debian/dh_doclink -p$(p_hppa64) $(p_base)
+ debian/dh_rmemptydirs -p$(p_hppa64)
+
+ dh_strip -p$(p_hppa64) -X.o -Xlibgcc.a -Xlibgcov.a
+ dh_compress -p$(p_hppa64)
+ dh_fixperms -p$(p_hppa64)
+ dh_shlibdeps -p$(p_hppa64)
+ dh_gencontrol -p$(p_hppa64) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_hppa64)
+ dh_md5sums -p$(p_hppa64)
+ dh_builddeb -p$(p_hppa64)
+
+ touch $@
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-proto.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-proto.mk
@@ -0,0 +1,43 @@
+arch_binaries := $(arch_binaries) proto
+
+p_proto = protoize
+d_proto = debian/$(p_proto)
+
+dirs_proto = \
+ $(docdir) \
+ $(PF)/share/man/man1 \
+ $(PF)/bin
+files_proto = \
+ $(PF)/bin/{protoize,unprotoize} \
+ $(PF)/share/man/man1/{protoize,unprotoize}.1
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-proto: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_proto)
+ dh_installdirs -p$(p_proto) $(dirs_proto)
+
+ifeq ($(versioned_packages),yes)
+ : # rename versioned files back to unversioned ones.
+ for i in protoize unprotoize; do \
+ mv $(d)/$(PF)/bin/$$i$(pkg_ver) $(d)/$(PF)/bin/$$i; \
+ done
+endif
+ $(IR) debian/protoize.1 $(d)/$(PF)/share/man/man1/
+ ln -sf protoize.1 $(d)/$(PF)/share/man/man1/unprotoize.1
+ DH_COMPAT=2 dh_movefiles -p$(p_proto) $(files_proto)
+
+ debian/dh_doclink -p$(p_proto) $(p_base)
+ dh_strip -p$(p_proto)
+ dh_compress -p$(p_proto)
+ dh_fixperms -p$(p_proto)
+ dh_shlibdeps -p$(p_proto)
+ dh_gencontrol -p$(p_proto) -- -v$(DEB_EVERSION) $(common_substvars)
+ dh_installdeb -p$(p_proto)
+ dh_md5sums -p$(p_proto)
+ dh_builddeb -p$(p_proto)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-pascal.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-pascal.mk
@@ -0,0 +1,100 @@
+arch_binaries := $(arch_binaries) pascal
+indep_binaries := $(indep_binaries) pascal-doc
+
+p_gpc = gpc$(gpc_pkg_ver)
+p_gpcd = gpc$(gpc_pkg_ver)-doc
+
+d_gpc = debian/$(p_gpc)
+d_gpcd = debian/$(p_gpcd)
+
+dirs_gpc = \
+ $(docdir)/$(p_base)/pascal \
+ $(PF)/bin \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)/{include,units} \
+ $(PF)/share/man/man1
+ifeq ($(with_gpidump),yes)
+ files_gpc = \
+ $(PF)/bin/{binobj,gpc,gpc-run,gpidump}$(gpc_pkg_ver) \
+ $(PF)/share/man/man1/{binobj,gpc,gpc-run,gpidump}$(gpc_pkg_ver).1 \
+ $(gcc_lexec_dir)/gpc1 \
+ $(gcc_lib_dir)/{libgpc.a,units} \
+ $(gcc_lib_dir)/include/gpc-in-c.h
+else
+ files_gpc = \
+ $(PF)/bin/{binobj,gpc,gpc-run}$(gpc_pkg_ver) \
+ $(PF)/share/man/man1/{binobj,gpc,gpc-run}$(gpc_pkg_ver).1 \
+ $(gcc_lexec_dir)/gpc1 \
+ $(gcc_lib_dir)/{libgpc.a,units} \
+ $(gcc_lib_dir)/include/gpc-in-c.h
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-pascal: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gpc)
+ dh_installdirs -p$(p_gpc) $(dirs_gpc)
+
+ rm -f $(d)/$(PF)/bin/pc $(d)/$(PF)/share/man/man1/pc.1
+ DH_COMPAT=2 dh_movefiles -p$(p_gpc) $(files_gpc)
+
+ debian/dh_doclink -p$(p_gpc) $(p_base)
+ cp -p $(srcdir)/gcc/p/{AUTHORS,FAQ,NEWS,README} \
+ $(d_gpc)/$(docdir)/$(p_base)/pascal/.
+ cp -p $(srcdir)/gcc/p/test/README \
+ $(d_gpc)/$(docdir)/$(p_base)/pascal/README.gpc-test
+ cp -p $(srcdir)/gcc/p/ChangeLog \
+ $(d_gpc)/$(docdir)/$(p_base)/pascal/changelog
+
+# ln -sf ../$(p_gpc)/examples $(d_gpcd)/$(docdir)/$(p_gpcd)/examples
+# ln -sf ../$(p_gpc)/docdemos $(d_gpcd)/$(docdir)/$(p_gpcd)/docdemos
+
+ dh_strip -p$(p_gpc)
+ dh_compress -p$(p_gpc)
+ dh_fixperms -p$(p_gpc)
+ dh_shlibdeps -p$(p_gpc)
+ dh_gencontrol -p$(p_gpc) -- -v$(DEB_GPC_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gpc)
+ dh_md5sums -p$(p_gpc)
+ dh_builddeb -p$(p_gpc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-pascal-doc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gpcd)
+ dh_installdirs -p$(p_gpcd) \
+ $(docdir)/$(p_base)/pascal \
+ $(PF)/share/info
+ DH_COMPAT=2 dh_movefiles -p$(p_gpcd) \
+ $(PF)/share/info/gpc*$(gpc_pkg_ver)*info*
+ debian/dh_doclink -p$(p_gpcd) $(p_base)
+ dh_installdocs -p$(p_gpcd)
+ rm -f $(d_gpcd)/$(docdir)/$(p_base)/copyright
+ cp -p html/gpc.html html/gpcs.html \
+ $(d_gpcd)/$(docdir)/$(p_base)/pascal/
+ mv $(d)/$(PF)/doc/gpc/demos \
+ $(d_gpcd)/$(docdir)/$(p_base)/pascal/examples
+ mv $(d)/$(PF)/doc/gpc/docdemos \
+ $(d_gpcd)/$(docdir)/$(p_base)/pascal/.
+
+# -$(MAKE) -C $(builddir)/gcc gpc.ps
+# cp -p $(builddir)/gcc/gpc.ps $(d_gpcd)/$(docdir)/$(p_base)/pascal/.
+
+ debian/dh_rmemptydirs -p$(p_gpcd)
+
+ dh_compress -p$(p_gpcd)
+ dh_fixperms -p$(p_gpcd)
+ dh_installdeb -p$(p_gpcd)
+ dh_gencontrol -p$(p_gpcd) -- -v$(DEB_GPC_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_gpcd)
+ dh_builddeb -p$(p_gpcd)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libstdcxx.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libstdcxx.mk
@@ -0,0 +1,417 @@
+
+ifeq ($(with_libcxx),yes)
+ arch_binaries := $(arch_binaries) libstdcxx
+endif
+ifeq ($(with_lib64cxx),yes)
+ arch_binaries := $(arch_binaries) lib64stdcxx
+endif
+ifeq ($(with_lib64cxxdbg),yes)
+ arch_binaries := $(arch_binaries) lib64stdcxxdbg
+endif
+ifeq ($(with_lib32cxx),yes)
+ arch_binaries := $(arch_binaries) lib32stdcxx
+endif
+ifeq ($(with_lib32cxxdbg),yes)
+ arch_binaries := $(arch_binaries) lib32stdcxxdbg
+endif
+
+ifeq ($(with_cxxdev),yes)
+ arch_binaries := $(arch_binaries) libstdcxx-dev
+ indep_binaries := $(indep_binaries) libstdcxx-doc
+endif
+
+libstdc_ext = -$(BASE_VERSION)
+
+p_lib = libstdc++$(CXX_SONAME)
+p_lib64 = lib64stdc++$(CXX_SONAME)
+p_lib32 = lib32stdc++$(CXX_SONAME)
+p_dev = libstdc++$(CXX_SONAME)$(libstdc_ext)-dev
+p_pic = libstdc++$(CXX_SONAME)$(libstdc_ext)-pic
+p_dbg = libstdc++$(CXX_SONAME)$(libstdc_ext)-dbg
+p_dbg64 = $(p_lib64)$(libstdc_ext)-dbg
+p_dbg32 = $(p_lib32)$(libstdc_ext)-dbg
+p_libd = libstdc++$(CXX_SONAME)$(libstdc_ext)-doc
+
+d_lib = debian/$(p_lib)
+d_lib64 = debian/$(p_lib64)
+d_lib32 = debian/$(p_lib32)
+d_dev = debian/$(p_dev)
+d_pic = debian/$(p_pic)
+d_dbg = debian/$(p_dbg)
+d_dbg64 = debian/$(p_dbg64)
+d_dbg32 = debian/$(p_dbg32)
+d_libd = debian/$(p_libd)
+
+dirs_dev = \
+ $(docdir)/$(p_base)/C++ \
+ $(PF)/$(libdir) \
+ $(gcc_lib_dir)/include \
+ $(cxx_inc_dir)
+
+files_dev = \
+ $(cxx_inc_dir)/ \
+ $(gcc_lib_dir)/libstdc++.{a,so} \
+ $(gcc_lib_dir)/libsupc++.a
+# Not yet...
+# $(PF)/$(libdir)/lib{supc,stdc}++.la
+
+dirs_dbg = \
+ $(docdir) \
+ $(PF)/$(libdir)/debug \
+ $(gcc_lib_dir)
+files_dbg = \
+ $(PF)/$(libdir)/debug/libstdc++.*
+
+dirs_pic = \
+ $(docdir) \
+ $(gcc_lib_dir)
+files_pic = \
+ $(gcc_lib_dir)/libstdc++_pic.a
+
+# ----------------------------------------------------------------------
+
+gxx_baseline_dir = $(shell \
+ sed -n '/^baseline_dir *=/s,.*= *\(.*\)\$$.*$$,\1,p' \
+ $(buildlibdir)/libstdc++-v3/testsuite/Makefile)
+gxx_baseline_file = $(gxx_baseline_dir)/baseline_symbols.txt
+
+debian/README.libstdc++-baseline:
+ cat debian/README.libstdc++-baseline.in \
+ > debian/README.libstdc++-baseline
+
+ baseline_name=`basename $(gxx_baseline_dir)`; \
+ baseline_parentdir=`dirname $(gxx_baseline_dir)`; \
+ compat_baseline_name=""; \
+ if [ -f "$(gxx_baseline_file)" ]; then \
+ ( \
+ echo "A baseline file for $$baseline_name was found."; \
+ echo "Running the check-abi script ..."; \
+ echo ""; \
+ $(MAKE) -C $(buildlibdir)/libstdc++-v3/testsuite \
+ check-abi; \
+ ) >> debian/README.libstdc++-baseline; \
+ else \
+ ( \
+ echo "No baseline file found for $$baseline_name."; \
+ echo "Generating a new baseline file ..."; \
+ echo ""; \
+ ) >> debian/README.libstdc++-baseline; \
+ mkdir $(gxx_baseline_dir); \
+ $(MAKE) -C $(buildlibdir)/libstdc++-v3/testsuite new-abi-baseline; \
+ cat $(gxx_baseline_file) >> debian/README.libstdc++-baseline; \
+ fi
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libstdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib)
+ dh_installdirs -p$(p_lib) \
+ $(docdir) \
+ $(PF)/$(libdir)
+
+ cp -a $(d)/$(PF)/$(libdir)/libstdc++.so.* \
+ $(d_lib)/$(PF)/$(libdir)/
+
+ debian/dh_doclink -p$(p_lib) $(p_base)
+ debian/dh_rmemptydirs -p$(p_lib)
+
+ dh_strip -p$(p_lib)
+ dh_compress -p$(p_lib)
+ dh_fixperms -p$(p_lib)
+ dh_makeshlibs -p$(p_lib) -V '$(p_lib) (>= $(DEB_STDCXX_SOVERSION))'
+ cat debian/$(p_lib)/DEBIAN/shlibs >> debian/shlibs.local
+ dh_shlibdeps \
+ -L$(p_lgcc) -l:$(d)/$(PF)/lib:$(d_lgcc)/lib:\
+ -p$(p_lib)
+ dh_gencontrol -p$(p_lib) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib)
+ dh_md5sums -p$(p_lib)
+ dh_builddeb -p$(p_lib)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64stdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib64)
+ dh_installdirs -p$(p_lib64) \
+ $(docdir) \
+ $(PF)/lib64
+
+ cp -a $(d)/$(PF)/lib64/libstdc++.so.* \
+ $(d_lib64)/$(PF)/lib64/.
+
+ dh_strip -p$(p_lib64)
+
+ debian/dh_doclink -p$(p_lib64) $(p_base)
+ debian/dh_rmemptydirs -p$(p_lib64)
+
+ dh_compress -p$(p_lib64)
+ dh_fixperms -p$(p_lib64)
+ dh_makeshlibs -p$(p_lib64) -V '$(p_lib64) (>= $(DEB_STDCXX_SOVERSION))'
+# pass explicit dependencies to dh_shlibdeps
+# dh_shlibdeps -p$(p_lib64) -L $(p_l64gcc) -l $(d_l64gcc)/lib
+#/usr/bin/ldd: line 1: /lib/ld64.so.1: cannot execute binary file
+#dpkg-shlibdeps: failure: ldd on `debian/lib64gcc1/lib64/libgcc_s.so.1' gave error exit status 1
+ echo 'shlibs:Depends=$(p_l64gcc) (>= $(DEB_LIBGCC_SOVERSION))' \
+ > debian/$(p_lib64).substvars
+ dh_gencontrol -p$(p_lib64) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib64)
+ dh_md5sums -p$(p_lib64)
+ dh_builddeb -p$(p_lib64)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64stdcxxdbg: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_dbg64)
+ dh_installdirs -p$(p_dbg64) \
+ $(PF)/lib64
+
+ cp -a $(d)/$(PF)/lib64/libstdc++.so.* \
+ $(d_dbg64)/$(PF)/lib64/.
+ dh_strip -p$(p_dbg64) --keep-debug
+ rm -f $(d_dbg64)/$(PF)/lib64/libstdc++.so.*
+
+# mv $(d)/$(PF)/lib64/debug $(d_dbg64)/$(PF)/lib64/.
+ rm -f $(d_dbg64)/$(PF)/lib64/debug/libstdc++_pic.a
+
+ debian/dh_doclink -p$(p_dbg64) $(p_base)
+ debian/dh_rmemptydirs -p$(p_dbg64)
+
+ dh_compress -p$(p_dbg64)
+ dh_fixperms -p$(p_dbg64)
+ dh_gencontrol -p$(p_dbg64) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_dbg64)
+ dh_md5sums -p$(p_dbg64)
+ dh_builddeb -p$(p_dbg64)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32stdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib32)
+
+ dh_installdirs -p$(p_lib32) \
+ $(docdir) \
+ $(lib32)
+
+ cp -a $(d)/$(lib32)/libstdc++.so.* \
+ $(d_lib32)/$(lib32)/.
+
+ debian/dh_doclink -p$(p_lib32) $(p_base)
+ debian/dh_rmemptydirs -p$(p_lib32)
+
+ dh_strip -p$(p_lib32)
+ dh_compress -p$(p_lib32)
+ dh_fixperms -p$(p_lib32)
+ dh_makeshlibs -p$(p_lib32) -V '$(p_lib32) (>= $(DEB_STDCXX_SOVERSION))'
+ dh_gencontrol -p$(p_lib32) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib32)
+ dh_md5sums -p$(p_lib32)
+ dh_builddeb -p$(p_lib32)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32stdcxxdbg: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_dbg32)
+ dh_installdirs -p$(p_dbg32) \
+ $(lib32)
+
+ cp -a $(d)/$(lib32)/libstdc++.so.* \
+ $(d_dbg32)/$(lib32)/.
+ dh_strip -p$(p_dbg32) --keep-debug
+ rm -f $(d_dbg32)/$(lib32)/libstdc++.so.*
+
+ mv $(d)/$(lib32)/debug $(d_dbg32)/$(lib32)/.
+ rm -f $(d_dbg32)/$(lib32)/debug/libstdc++_pic.a
+
+ debian/dh_doclink -p$(p_dbg32) $(p_base)
+ debian/dh_rmemptydirs -p$(p_dbg32)
+
+ dh_compress -p$(p_dbg32)
+ dh_fixperms -p$(p_dbg32)
+ dh_gencontrol -p$(p_dbg32) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_dbg32)
+ dh_md5sums -p$(p_dbg32)
+ dh_builddeb -p$(p_dbg32)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+libcxxdev_deps = $(install_stamp)
+ifeq ($(with_libcxx),yes)
+ libcxxdev_deps += $(binary_stamp)-libstdcxx
+endif
+ifeq ($(with_check),yes)
+ libcxxdev_deps += debian/README.libstdc++-baseline
+endif
+$(binary_stamp)-libstdcxx-dev: $(libcxxdev_deps)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_dev) $(d_pic)
+ dh_installdirs -p$(p_dev) $(dirs_dev)
+ dh_installdirs -p$(p_pic) $(dirs_pic)
+ dh_installdirs -p$(p_dbg) $(dirs_dbg)
+
+ : # - correct libstdc++-v3 file locations
+ mv $(d)/$(PF)/$(libdir)/libsupc++.a $(d)/$(gcc_lib_dir)/
+ mv $(d)/$(PF)/$(libdir)/libstdc++.{a,so} $(d)/$(gcc_lib_dir)/
+ ln -sf ../../../$(DEB_TARGET_GNU_TYPE)/libstdc++.so.$(CXX_SONAME) \
+ $(d)/$(gcc_lib_dir)/libstdc++.so
+ mv $(d)/$(PF)/$(libdir)/libstdc++_pic.a $(d)/$(gcc_lib_dir)/
+
+ rm -f $(d)/$(PF)/$(libdir)/debug/libstdc++_pic.a
+ rm -f $(d)/$(PF)/lib64/debug/libstdc++_pic.a
+
+ : # remove precompiled headers
+ -find $(d) -type d -name '*.gch' | xargs rm -rf
+
+ for i in $(d)/$(PF)/include/c++/$(GCC_VERSION)/*-linux; do \
+ if [ -d $$i ]; then mv $$i $$i-gnu; fi; \
+ done
+
+ DH_COMPAT=2 dh_movefiles -p$(p_dev) $(files_dev)
+ DH_COMPAT=2 dh_movefiles -p$(p_pic) $(files_pic)
+ DH_COMPAT=2 dh_movefiles -p$(p_dbg) $(files_dbg)
+
+ dh_link -p$(p_dev) \
+ /$(PF)/$(libdir)/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/libstdc++.so \
+ /$(cxx_inc_dir) /$(PF)/include/c++/$(BASE_VERSION)
+
+ debian/dh_doclink -p$(p_dev) $(p_base)
+ debian/dh_doclink -p$(p_pic) $(p_base)
+ debian/dh_doclink -p$(p_dbg) $(p_base)
+ cp -p $(srcdir)/libstdc++-v3/ChangeLog \
+ $(d_dev)/$(docdir)/$(p_base)/C++/changelog.libstdc++
+ifeq ($(with_check),yes)
+ cp -p debian/README.libstdc++-baseline \
+ $(d_dev)/$(docdir)/$(p_base)/C++/README.libstdc++-baseline
+ if [ -f $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt ]; \
+ then \
+ cp -p $(buildlibdir)/libstdc++-v3/testsuite/current_symbols.txt \
+ $(d_dev)/$(docdir)/$(p_base)/C++/libstdc++_symbols.txt; \
+ fi
+endif
+ cp -p $(srcdir)/libstdc++-v3/config/linker-map.gnu \
+ $(d_pic)/$(gcc_lib_dir)/libstdc++_pic.map
+
+ifeq ($(with_cxxdev),yes)
+ debian/dh_rmemptydirs -p$(p_dev)
+ debian/dh_rmemptydirs -p$(p_pic)
+ debian/dh_rmemptydirs -p$(p_dbg)
+endif
+
+ cp -a $(d)/$(PF)/$(libdir)/libstdc++.so.* \
+ $(d_dbg)/$(PF)/$(libdir)/
+ dh_strip -p$(p_dbg) --keep-debug
+ rm -f $(d_dbg)/$(PF)/$(libdir)/libstdc++.so.*
+
+ dh_strip -p$(p_dev) --dbg-package=$(p_lib)
+ dh_strip -p$(p_pic)
+
+ dh_compress -p$(p_dev) -p$(p_pic) -p$(p_dbg) -X.txt
+ dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ifeq ($(biarch),yes)
+ dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib64
+else
+ dh_shlibdeps -p$(p_dev) -p$(p_pic) -p$(p_dbg) -Xlib32/debug
+endif
+ dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ dh_md5sums -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ dh_builddeb -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+
+doxygen_doc_dir = $(buildlibdir)/libstdc++-v3/docs/doxygen
+
+doxygen-docs: $(build_doxygen_stamp)
+$(build_doxygen_stamp):
+ rm -rf $(doxygen_doc_dir)/html*
+ $(MAKE) -C $(buildlibdir)/libstdc++-v3 SHELL=/bin/bash doxygen
+ $(MAKE) -C $(buildlibdir)/libstdc++-v3 SHELL=/bin/bash doxygen-man
+ sed -e 's,http://gcc\.gnu\.org/onlinedocs/libstdc++,../html,g' \
+ -e 's,
Main Page,libstdc++-v3 Source: Main Index,' \
+ $(doxygen_doc_dir)/html_user/index.html \
+ > $(doxygen_doc_dir)/html_user/index.html.new
+ mv -f $(doxygen_doc_dir)/html_user/index.html.new \
+ $(doxygen_doc_dir)/html_user/index.html
+
+ -find $(doxygen_doc_dir)/html_user -name 'struct*' -empty | xargs rm -f
+
+ touch $@
+
+$(binary_stamp)-libstdcxx-doc: $(install_stamp) doxygen-docs
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_libd)
+ dh_installdirs -p$(p_libd) \
+ $(docdir)/$(p_base)/libstdc++ \
+ $(PF)/share/man
+
+# debian/dh_doclink -p$(p_libd) $(p_base)
+ dh_link -p$(p_libd) /usr/share/doc/$(p_base) /usr/share/doc/$(p_libd)
+ dh_installdocs -p$(p_libd)
+ rm -f $(d_libd)/$(docdir)/$(p_base)/copyright
+
+ cp -a $(srcdir)/libstdc++-v3/docs/html \
+ $(d_libd)/$(docdir)/$(p_base)/libstdc++/.
+ ln -sf documentation.html \
+ $(d_libd)/$(docdir)/$(p_base)/libstdc++/html/index.html
+ -find $(d_libd)/$(docdir)/$(p_base)/libstdc++/ -name CVS -type d \
+ | xargs rm -rf
+
+ cp -a $(doxygen_doc_dir)/html_user \
+ $(d_libd)/$(docdir)/$(p_base)/libstdc++/.
+ cp -a $(doxygen_doc_dir)/man/man3 \
+ $(d_libd)/$(PF)/share/man/.
+ cp -p $(srcdir)/libstdc++-v3/docs/doxygen/Intro.3 \
+ $(d_libd)/$(PF)/share/man/man3/C++Intro.3
+
+ mkdir -p $(d_libd)/usr/share/lintian/overrides
+ cp -p debian/$(p_libd).overrides \
+ $(d_libd)/usr/share/lintian/overrides/$(p_libd)
+
+ dh_compress -p$(p_libd) -Xhtml/17_intro -X.txt -X.tag
+ dh_fixperms -p$(p_libd)
+ dh_gencontrol -p$(p_libd) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_libd)
+ dh_md5sums -p$(p_libd)
+ dh_builddeb -p$(p_libd)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libobjc.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libobjc.mk
@@ -0,0 +1,122 @@
+ifeq ($(with_objcdev),yes)
+ arch_binaries := $(arch_binaries) libobjc
+endif
+ifeq ($(with_lib64objc),yes)
+ arch_binaries := $(arch_binaries) lib64objc
+endif
+ifeq ($(with_lib32objc),yes)
+ arch_binaries := $(arch_binaries) lib32objc
+endif
+
+p_lobjc = libobjc$(OBJC_SONAME)
+p_l32objc = lib32objc$(OBJC_SONAME)
+p_l64objc = lib64objc$(OBJC_SONAME)
+
+d_lobjc = debian/$(p_lobjc)
+d_l32objc = debian/$(p_l32objc)
+d_l64objc = debian/$(p_l64objc)
+
+dirs_lobjc = \
+ $(docdir)/objc \
+ $(PF)/$(libdir)
+files_lobjc = \
+ $(PF)/$(libdir)/libobjc.so.*
+ifeq ($(with_objc_gc),yes)
+ files_lobjc += \
+ $(PF)/$(libdir)/libobjc_gc.so.*
+endif
+
+
+$(binary_stamp)-libobjc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lobjc)
+ dh_installdirs -p$(p_lobjc) $(dirs_lobjc)
+# mv $(d)/$(gcc_lib_dir)/libobjc.so.* $(d)/$(PF)/$(libdir)/.
+#ifeq ($(with_objc_gc),yes)
+# mv $(d)/$(gcc_lib_dir)/libobjc_gc.so.* $(d)/$(PF)/$(libdir)/.
+#endif
+ DH_COMPAT=2 dh_movefiles -p$(p_lobjc) $(files_lobjc)
+
+ dh_installdocs -p$(p_lobjc)
+ echo "See /$(docdir)/$(p_base) for more information" \
+ > $(d_lobjc)/$(docdir)/$(p_lobjc)/README.Debian
+ dh_installchangelogs -p$(p_lobjc) $(srcdir)/libobjc/ChangeLog
+
+ debian/dh_rmemptydirs -p$(p_lobjc)
+
+ dh_strip -p$(p_lobjc)
+ dh_compress -p$(p_lobjc)
+
+ dh_fixperms -p$(p_lobjc)
+ b=libobjc; \
+ for ext in preinst postinst prerm postrm; do \
+ for t in '' -dev -dbg; do \
+ v=$(OBJC_SONAME); \
+ if [ -f debian/$$b$$t.$$ext ]; then \
+ cp -pf debian/$$b$$t.$$ext debian/$$b$$v$$t.$$ext; \
+ fi; \
+ done; \
+ done
+ dh_makeshlibs -p$(p_lobjc) -V '$(p_lobjc) (>= $(DEB_SOEVERSION))'
+ dh_shlibdeps -p$(p_lobjc)
+ dh_gencontrol -p$(p_lobjc) -- -v$(DEB_EVERSION) $(common_substvars)
+ dh_installdeb -p$(p_lobjc)
+ dh_md5sums -p$(p_lobjc)
+ dh_builddeb -p$(p_lobjc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64objc)
+ dh_installdirs -p$(p_l64objc) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_l64objc) \
+ $(PF)/lib64/libobjc.so.*
+
+ debian/dh_doclink -p$(p_l64objc) $(p_base)
+
+ dh_strip -p$(p_l64objc)
+ dh_compress -p$(p_l64objc)
+ dh_fixperms -p$(p_l64objc)
+ dh_makeshlibs -p$(p_l64objc) -V '$(p_l64objc) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l64objc)
+ dh_gencontrol -p$(p_l64objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l64objc)
+ dh_md5sums -p$(p_l64objc)
+ dh_builddeb -p$(p_l64objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32objc)
+ dh_installdirs -p$(p_l32objc) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_l32objc) \
+ $(lib32)/libobjc.so.*
+
+ debian/dh_doclink -p$(p_l32objc) $(p_base)
+
+ dh_strip -p$(p_l32objc)
+ dh_compress -p$(p_l32objc)
+ dh_fixperms -p$(p_l32objc)
+ dh_makeshlibs -p$(p_l32objc) -V '$(p_l32objc) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l32objc)
+ dh_gencontrol -p$(p_l32objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l32objc)
+ dh_md5sums -p$(p_l32objc)
+ dh_builddeb -p$(p_l32objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-nof-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-nof-cross.mk
@@ -0,0 +1,46 @@
+arch_binaries := $(arch_binaries) nof
+
+p_nof = gcc$(pkg_arch)-nof
+d_nof = debian/$(p_nof)
+
+dirs_nof = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/nof
+ifeq ($(with_cdev),yes)
+ dirs_nof += \
+ $(gcc_lib_dir)/nof
+endif
+
+ifeq ($(with_cdev),yes)
+ files_nof = \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libgcc_s_nof.so.$(GCC_SONAME) \
+ $(gcc_lib_dir)/libgcc_s_nof.so \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/nof \
+ $(gcc_lib_dir)/nof
+else
+ files_nof = \
+ lib/libgcc_s_nof.so.$(GCC_SONAME)
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-nof: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ ln -sf /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libgcc_s_nof.so.$(GCC_SONAME) \
+ $(d)/$(gcc_lib_dir)/libgcc_s_nof.so
+
+ rm -rf $(d_nof)
+ dh_installdirs -p$(p_nof) $(dirs_nof)
+ DH_COMPAT=2 dh_movefiles -p$(p_nof) $(files_nof)
+ debian/dh_doclink -p$(p_nof) $(p_base)
+ dh_strip -p$(p_nof)
+ dh_compress -p$(p_nof)
+ dh_fixperms -p$(p_nof)
+ dh_gencontrol -p$(p_nof) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_nof)
+ dh_md5sums -p$(p_nof)
+ dh_builddeb -p$(p_nof)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libgcc-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libgcc-cross.mk
@@ -0,0 +1,158 @@
+ifeq ($(with_libgcc),yes)
+ arch_binaries := $(arch_binaries) libgcc
+endif
+ifeq ($(with_lib64gcc),yes)
+ arch_binaries := $(arch_binaries) lib64gcc
+endif
+ifeq ($(biarch32),yes)
+ arch_binaries := $(arch_binaries) lib32gcc
+endif
+
+p_lgcc = libgcc$(GCC_SONAME)$(cross_lib_arch)
+d_lgcc = debian/$(p_lgcc)
+
+p_l64gcc = lib32gcc$(GCC_SONAME)$(cross_lib_arch)
+d_l64gcc = debian/$(p_l32gcc)
+
+p_l64gcc = lib64gcc$(GCC_SONAME)$(cross_lib_arch)
+d_l64gcc = debian/$(p_l64gcc)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lgcc)
+ dh_installdirs -p$(p_lgcc) \
+ $(docdir)/$(p_lgcc) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib
+
+ifeq ($(with_shared_libgcc),yes)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libgcc_s.so.$(GCC_SONAME) $(d_lgcc)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/.
+endif
+
+ dh_installdocs -p$(p_lgcc)
+ dh_installchangelogs -p$(p_lgcc)
+
+ debian/dh_rmemptydirs -p$(p_lgcc)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_lgcc)
+ dh_compress -p$(p_lgcc)
+ dh_fixperms -p$(p_lgcc)
+ifeq ($(with_shared_libgcc),yes)
+ dh_makeshlibs -p$(p_lgcc) -V '$(p_lgcc) (>= $(DEB_LIBGCC_SOVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_lgcc)/DEBIAN/shlibs > debian/$(p_lgcc)/DEBIAN/shlibs.fixed
+ mv debian/$(p_lgcc)/DEBIAN/shlibs.fixed debian/$(p_lgcc)/DEBIAN/shlibs
+ cat debian/$(p_lgcc)/DEBIAN/shlibs >> debian/shlibs.local
+endif
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lgcc)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lgcc).substvars > debian/$(p_lgcc).substvars.new
+ mv debian/$(p_lgcc).substvars.new debian/$(p_lgcc).substvars
+ dh_gencontrol -p$(p_lgcc) \
+ -- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
+ b=libgcc; v=$(GCC_SONAME); \
+ for ext in preinst postinst prerm postrm; do \
+ if [ -f debian/$$b$$t.$$ext ]; then \
+ cp -pf debian/$$b$$t.$$ext debian/$$b$$v$$t.$$ext; \
+ fi; \
+ done
+ dh_installdeb -p$(p_lgcc)
+ dh_md5sums -p$(p_lgcc)
+ dh_builddeb -p$(p_lgcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64gcc)
+ dh_installdirs -p$(p_l64gcc) \
+ $(docdir)/$(p_l64gcc) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib64
+
+ifeq ($(with_shared_libgcc),yes)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/libgcc_s.so.$(GCC_SONAME) $(d_l64gcc)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/.
+endif
+
+ dh_installdocs -p$(p_l64gcc)
+ dh_installchangelogs -p$(p_l64gcc)
+
+ debian/dh_rmemptydirs -p$(p_l64gcc)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_l64gcc)
+ dh_compress -p$(p_l64gcc)
+ dh_fixperms -p$(p_l64gcc)
+ifeq ($(with_shared_libgcc),yes)
+ dh_makeshlibs -p$(p_l64gcc) \
+ -V '$(p_l64gcc) (>= $(DEB_LIBGCC_SOVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_l64gcc)/DEBIAN/shlibs > debian/$(p_l64gcc)/DEBIAN/shlibs.fixed
+ mv debian/$(p_l64gcc)/DEBIAN/shlibs.fixed debian/$(p_l64gcc)/DEBIAN/shlibs
+ cat debian/$(p_l64gcc)/DEBIAN/shlibs >> debian/shlibs.local
+endif
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_l64gcc)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_l64gcc).substvars > debian/$(p_l64gcc).substvars.new
+ mv debian/$(p_l64gcc).substvars.new debian/$(p_l64gcc).substvars
+ dh_gencontrol -p$(p_l64gcc) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ b=libgcc; v=$(GCC_SONAME); \
+ for ext in preinst postinst prerm postrm; do \
+ if [ -f debian/$$b$$t.$$ext ]; then \
+ cp -pf debian/$$b$$t.$$ext debian/$$b$$v$$t.$$ext; \
+ fi; \
+ done
+ dh_installdeb -p$(p_l64gcc)
+ dh_md5sums -p$(p_l64gcc)
+ dh_builddeb -p$(p_l64gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+
+$(binary_stamp)-lib32gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32gcc)
+ dh_installdirs -p$(p_l32gcc) \
+ $(docdir)/$(p_l32gcc) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib32
+
+ifeq ($(with_shared_libgcc),yes)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/libgcc_s.so.$(GCC_SONAME) $(d_l32gcc)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/.
+endif
+
+ dh_installdocs -p$(p_l32gcc)
+ dh_installchangelogs -p$(p_l32gcc)
+
+ debian/dh_rmemptydirs -p$(p_l32gcc)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_l32gcc)
+ dh_compress -p$(p_l32gcc)
+ dh_fixperms -p$(p_l32gcc)
+ifeq ($(with_shared_libgcc),yes)
+ dh_makeshlibs -p$(p_l32gcc) \
+ -V '$(p_l32gcc) (>= $(DEB_LIBGCC_SOVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_l32gcc)/DEBIAN/shlibs > debian/$(p_l32gcc)/DEBIAN/shlibs.fixed
+ mv debian/$(p_l32gcc)/DEBIAN/shlibs.fixed debian/$(p_l32gcc)/DEBIAN/shlibs
+ cat debian/$(p_l32gcc)/DEBIAN/shlibs >> debian/shlibs.local
+endif
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_l32gcc)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_l32gcc).substvars > debian/$(p_l32gcc).substvars.new
+ mv debian/$(p_l32gcc).substvars.new debian/$(p_l32gcc).substvars
+ dh_gencontrol -p$(p_l32gcc) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ b=libgcc; v=$(GCC_SONAME); \
+ for ext in preinst postinst prerm postrm; do \
+ if [ -f debian/$$b$$t.$$ext ]; then \
+ cp -pf debian/$$b$$t.$$ext debian/$$b$$v$$t.$$ext; \
+ fi; \
+ done
+ dh_installdeb -p$(p_l32gcc)
+ dh_md5sums -p$(p_l32gcc)
+ dh_builddeb -p$(p_l32gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-fortran.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-fortran.mk
@@ -0,0 +1,244 @@
+ifeq ($(with_libfortran),yes)
+ arch_binaries := $(arch_binaries) libfortran
+endif
+ifeq ($(with_lib64fortran),yes)
+ arch_binaries := $(arch_binaries) lib64fortran
+endif
+ifeq ($(with_lib32fortran),yes)
+ arch_binaries := $(arch_binaries) lib32fortran
+endif
+
+ifeq ($(with_fdev),yes)
+ ifneq (,$(filter yes, $(biarch) $(biarch32)))
+ arch_binaries := $(arch_binaries) fdev-multi
+ endif
+ arch_binaries := $(arch_binaries) fdev
+ ifneq ($(GFDL_INVARIANT_FREE),yes)
+ indep_binaries := $(indep_binaries) fortran-doc
+ endif
+endif
+
+p_g95 = gfortran$(pkg_ver)
+p_g95_m = gfortran$(pkg_ver)-multilib
+p_g95d = gfortran$(pkg_ver)-doc
+p_flib = libgfortran$(FORTRAN_SONAME)
+p_f32lib= lib32gfortran$(FORTRAN_SONAME)
+p_f64lib= lib64gfortran$(FORTRAN_SONAME)
+
+d_g95 = debian/$(p_g95)
+d_g95_m = debian/$(p_g95_m)
+d_g95d = debian/$(p_g95d)
+d_flib = debian/$(p_flib)
+d_f32lib= debian/$(p_f32lib)
+d_f64lib= debian/$(p_f64lib)
+
+dirs_g95 = \
+ $(docdir)/$(p_base)/fortran \
+ $(PF)/bin \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)/include \
+ $(PF)/include \
+ $(PF)/share/man/man1
+files_g95 = \
+ $(PF)/bin/gfortran$(pkg_ver) \
+ $(gcc_lexec_dir)/f951
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_g95 += \
+ $(PF)/share/man/man1/gfortran$(pkg_ver).1
+endif
+
+dirs_flib = \
+ $(docdir)/$(p_base)/fortran \
+ $(PF)/$(libdir) \
+
+files_flib = \
+ $(PF)/$(libdir)/libgfortran.so.*
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libfortran: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_flib)
+ dh_installdirs -p$(p_flib) $(dirs_flib)
+ DH_COMPAT=2 dh_movefiles -p$(p_flib) $(files_flib)
+ debian/dh_doclink -p$(p_flib) $(p_base)
+
+ dh_strip -p$(p_flib)
+ dh_compress -p$(p_flib)
+ dh_fixperms -p$(p_flib)
+ dh_makeshlibs -p$(p_flib) -V '$(p_flib) (>= $(DEB_SOVERSION))'
+ dh_shlibdeps -p$(p_flib)
+ dh_gencontrol -p$(p_flib) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_flib)
+ dh_md5sums -p$(p_flib)
+ dh_builddeb -p$(p_flib)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64fortran: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_f64lib)
+ dh_installdirs -p$(p_f64lib) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_f64lib) \
+ $(PF)/lib64/libgfortran.so.*
+
+ debian/dh_doclink -p$(p_f64lib) $(p_base)
+
+ dh_strip -p$(p_f64lib)
+ dh_compress -p$(p_f64lib)
+ dh_fixperms -p$(p_f64lib)
+ dh_makeshlibs -p$(p_f64lib) -V '$(p_f64lib) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_f64lib)
+ dh_gencontrol -p$(p_f64lib) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_f64lib)
+ dh_md5sums -p$(p_f64lib)
+ dh_builddeb -p$(p_f64lib)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32fortran: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_f32lib)
+ dh_installdirs -p$(p_f32lib) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_f32lib) \
+ $(lib32)/libgfortran.so.*
+
+ debian/dh_doclink -p$(p_f32lib) $(p_base)
+
+ dh_strip -p$(p_f32lib)
+ dh_compress -p$(p_f32lib)
+ dh_fixperms -p$(p_f32lib)
+ dh_makeshlibs -p$(p_f32lib) -V '$(p_f32lib) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_f32lib)
+ dh_gencontrol -p$(p_f32lib) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_f32lib)
+ dh_md5sums -p$(p_f32lib)
+ dh_builddeb -p$(p_f32lib)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-fdev: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_g95)
+ dh_installdirs -p$(p_g95) $(dirs_g95)
+
+ rm -f $(d)/$(gcc_lib_dir)/libgfortranbegin.la
+ rm -f $(d)/$(gcc_lib_dir)/$(biarchsubdir)/libgfortranbegin.la
+
+ DH_COMPAT=2 dh_movefiles -p$(p_g95) $(files_g95)
+
+ rm -f $(d)/$(PF)/lib/libgfortran*.{la,so}
+ mv $(d)/$(PF)/lib/libgfortran*.a $(d_g95)/$(gcc_lib_dir)/
+
+ ln -sf gfortran$(pkg_ver) \
+ $(d_g95)/$(PF)/bin/$(DEB_TARGET_GNU_TYPE)-gfortran$(pkg_ver)
+ ln -sf gfortran$(pkg_ver) \
+ $(d_g95)/$(PF)/bin/$(TARGET_ALIAS)-gfortran$(pkg_ver)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ ln -sf gfortran$(pkg_ver).1 \
+ $(d_g95)/$(PF)/share/man/man1/$(DEB_TARGET_GNU_TYPE)-gfortran$(pkg_ver).1
+ ln -sf gfortran$(pkg_ver).1 \
+ $(d_g95)/$(PF)/share/man/man1/$(TARGET_ALIAS)-gfortran$(pkg_ver).1
+endif
+
+ debian/dh_doclink -p$(p_g95) $(p_base)
+
+ cp -p $(srcdir)/gcc/fortran/ChangeLog \
+ $(d_g95)/$(docdir)/$(p_base)/fortran/changelog
+ debian/dh_rmemptydirs -p$(p_g95)
+
+ dh_strip -p$(p_g95)
+ dh_compress -p$(p_g95)
+ dh_fixperms -p$(p_g95)
+ dh_shlibdeps -p$(p_g95)
+ dh_gencontrol -p$(p_g95) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_g95)
+ dh_md5sums -p$(p_g95)
+ dh_builddeb -p$(p_g95)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-fdev-multi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_g95_m)
+ dh_installdirs -p$(p_g95_m) \
+ $(docdir) \
+ $(gcc_lib_dir)/$(biarchsubdir)
+
+ifeq ($(with_lib64fortran),yes)
+ rm -f $(d)/$(PF)/lib64/libgfortran*.{la,so}
+ mkdir -p $(d_g95_m)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(PF)/lib64/libgfortran*.a $(d_g95_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_g95_m) \
+ /$(PF)/lib64/libgfortran.so.$(FORTRAN_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgfortran.so
+endif
+ifeq ($(with_lib32fortran),yes)
+ rm -f $(d)/$(lib32)/libgfortran*.{la,so}
+ mkdir -p $(d_g95_m)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(lib32)/libgfortran*.a $(d_g95_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_g95_m) \
+ /$(lib32)/libgfortran.so.$(FORTRAN_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgfortran.so
+endif
+
+ debian/dh_doclink -p$(p_g95_m) $(p_base)
+ debian/dh_rmemptydirs -p$(p_g95_m)
+ dh_strip -p$(p_g95_m)
+ dh_compress -p$(p_g95_m)
+ dh_fixperms -p$(p_g95_m)
+ dh_shlibdeps -p$(p_g95_m)
+ dh_gencontrol -p$(p_g95_m) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_g95_m)
+ dh_md5sums -p$(p_g95_m)
+ dh_builddeb -p$(p_g95_m)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-fortran-doc: $(build_html_stamp) $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_g95d)
+ dh_installdirs -p$(p_g95d) \
+ $(docdir)/$(p_base)/fortran \
+ $(PF)/share/info
+ DH_COMPAT=2 dh_movefiles -p$(p_g95d) \
+ $(PF)/share/info/gfortran*
+
+ debian/dh_doclink -p$(p_g95d) $(p_base)
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ dh_installdocs -p$(p_g95d)
+ rm -f $(d_g95d)/$(docdir)/$(p_base)/copyright
+ cp -p html/gfortran.html $(d_g95d)/$(docdir)/$(p_base)/fortran/
+endif
+
+ dh_compress -p$(p_g95d)
+ dh_fixperms -p$(p_g95d)
+ dh_installdeb -p$(p_g95d)
+ dh_gencontrol -p$(p_g95d) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_md5sums -p$(p_g95d)
+ dh_builddeb -p$(p_g95d)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-objc.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-objc.mk
@@ -0,0 +1,96 @@
+ifneq (,$(filter yes, $(biarch) $(biarch32)))
+ arch_binaries := $(arch_binaries) objc-multi
+endif
+arch_binaries := $(arch_binaries) objc
+
+p_objc = gobjc$(pkg_ver)
+d_objc = debian/$(p_objc)
+
+p_objc_m= gobjc$(pkg_ver)-multilib
+d_objc_m= debian/$(p_objc_m)
+
+dirs_objc = \
+ $(docdir)/$(p_base)/ObjC \
+ $(gcc_lexec_dir) \
+ $(gcc_lib_dir)/include
+
+files_objc = \
+ $(gcc_lexec_dir)/cc1obj \
+ $(gcc_lib_dir)/include/objc \
+ $(gcc_lib_dir)/{libobjc*.a,libobjc*.la}
+
+$(binary_stamp)-objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ mv $(d)/$(PF)/$(libdir)/libobjc*.{a,la} $(d)/$(gcc_lib_dir)/
+
+ rm -rf $(d_objc)
+ dh_installdirs -p$(p_objc) $(dirs_objc)
+ DH_COMPAT=2 dh_movefiles -p$(p_objc) $(files_objc)
+
+ dh_link -p$(p_objc) \
+ /$(PF)/$(libdir)/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/libobjc.so
+ifeq ($(with_objc_gc),yes)
+ dh_link -p$(p_objc) \
+ /$(PF)/$(libdir)/libobjc_gc.so.$(OBJC_SONAME) \
+ /$(gcc_lib_dir)/libobjc_gc.so
+endif
+
+ debian/dh_doclink -p$(p_objc) $(p_base)
+ cp -p $(srcdir)/libobjc/{README*,THREADS*} \
+ $(d_objc)/$(docdir)/$(p_base)/ObjC/.
+
+ debian/dh_rmemptydirs -p$(p_objc)
+
+ dh_strip -p$(p_objc)
+ dh_compress -p$(p_objc)
+
+ dh_fixperms -p$(p_objc)
+ dh_shlibdeps -p$(p_objc)
+ dh_gencontrol -p$(p_objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objc)
+ dh_md5sums -p$(p_objc)
+ dh_builddeb -p$(p_objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+$(binary_stamp)-objc-multi: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_objc_m)
+ dh_installdirs -p$(p_objc_m) \
+ $(docdir) \
+ $(gcc_lib_dir)/$(biarchsubdir)
+
+ifeq ($(with_lib64objc),yes)
+ rm -f $(d)/$(PF)/lib64/libobjc*.{la,so}
+ mkdir -p $(d_objc_m)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(PF)/lib64/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_objc_m) \
+ /$(PF)/lib64/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libobjc.so
+endif
+ifeq ($(with_lib32objc),yes)
+ rm -f $(d)/$(lib32)/libobjc*.{la,so}
+ mkdir -p $(d_objc_m)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(lib32)/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_objc_m) \
+ /$(lib32)/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libobjc.so
+endif
+
+ debian/dh_doclink -p$(p_objc_m) $(p_base)
+
+ dh_strip -p$(p_objc_m)
+ dh_compress -p$(p_objc_m)
+
+ dh_fixperms -p$(p_objc_m)
+ dh_shlibdeps -p$(p_objc_m)
+ dh_gencontrol -p$(p_objc_m) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objc_m)
+ dh_md5sums -p$(p_objc_m)
+ dh_builddeb -p$(p_objc_m)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-nof.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-nof.mk
@@ -0,0 +1,56 @@
+arch_binaries := $(arch_binaries) nof
+
+p_nof = gcc$(pkg_ver)-nof
+d_nof = debian/$(p_nof)
+
+dirs_nof = \
+ $(docdir) \
+ $(PF)/$(libdir)/nof
+ifeq ($(with_cdev),yes)
+ dirs_nof += \
+ $(gcc_lib_dir)/nof
+endif
+
+ifeq ($(with_cdev),yes)
+ files_nof = \
+ $(libdir)/libgcc_s_nof.so.$(GCC_SONAME) \
+ $(gcc_lib_dir)/libgcc_s_nof.so \
+ $(PF)/$(libdir)/nof \
+ $(gcc_lib_dir)/nof
+else
+ files_nof = \
+ $(libdir)/libgcc_s_nof.so.$(GCC_SONAME)
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-nof: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ mv $(d)/$(PF)/$(libdir)/libgcc_s_nof.so.$(GCC_SONAME) $(d)/$(libdir)/.
+ rm -f $(d)/$(PF)/$(libdir)/libgcc_s_nof.so
+ ln -sf /$(libdir)/libgcc_s_nof.so.$(GCC_SONAME) \
+ $(d)/$(gcc_lib_dir)/libgcc_s_nof.so
+
+ rm -rf $(d_nof)
+ dh_installdirs -p$(p_nof) $(dirs_nof)
+ DH_COMPAT=2 dh_movefiles -p$(p_nof) $(files_nof)
+ debian/dh_doclink -p$(p_nof) $(p_base)
+ dh_strip -p$(p_nof)
+ dh_compress -p$(p_nof)
+ dh_fixperms -p$(p_nof)
+ dh_shlibdeps -p$(p_nof)
+
+ dh_makeshlibs -p$(p_nof)
+ : # Only keep the shlibs file for the libgcc_s_nof library
+ fgrep libgcc_s_nof debian/$(p_nof)/DEBIAN/shlibs \
+ > debian/$(p_nof)/DEBIAN/shlibs.tmp
+ mv -f debian/$(p_nof)/DEBIAN/shlibs.tmp debian/$(p_nof)/DEBIAN/shlibs
+
+ dh_gencontrol -p$(p_nof) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_nof)
+ dh_md5sums -p$(p_nof)
+ dh_builddeb -p$(p_nof)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libgcc.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libgcc.mk
@@ -0,0 +1,157 @@
+ifeq ($(with_libgcc),yes)
+ arch_binaries := $(arch_binaries) libgcc
+endif
+ifeq ($(with_lib64gcc),yes)
+ arch_binaries := $(arch_binaries) lib64gcc
+endif
+ifeq ($(biarch32),yes)
+ arch_binaries := $(arch_binaries) lib32gcc
+endif
+
+p_lgcc = libgcc$(GCC_SONAME)
+d_lgcc = debian/$(p_lgcc)
+
+p_l32gcc = lib32gcc$(GCC_SONAME)
+d_l32gcc = debian/$(p_l32gcc)
+
+p_l64gcc = lib64gcc$(GCC_SONAME)
+d_l64gcc = debian/$(p_l64gcc)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lgcc)
+ dh_installdirs -p$(p_lgcc) \
+ $(docdir)/$(p_lgcc) \
+ $(libdir)
+
+ifeq ($(with_shared_libgcc),yes)
+ mv $(d)/$(PF)/lib/libgcc_s.so.$(GCC_SONAME) $(d_lgcc)/$(libdir)/.
+endif
+
+ifeq ($(with_standalone_gcj)-$(DEB_TARGET_ARCH),yes-hppa)
+ debian/dh_doclink -p$(p_lgcc) $(p_jbase)
+else
+ debian/dh_doclink -p$(p_lgcc) $(p_base)
+endif
+ debian/dh_rmemptydirs -p$(p_lgcc)
+ dh_strip -p$(p_lgcc)
+ dh_compress -p$(p_lgcc)
+ dh_fixperms -p$(p_lgcc)
+ifeq ($(with_shared_libgcc),yes)
+ dh_makeshlibs -p$(p_lgcc) -V '$(p_lgcc) (>= $(DEB_LIBGCC_SOVERSION))'
+ cat debian/$(p_lgcc)/DEBIAN/shlibs >> debian/shlibs.local
+endif
+ dh_shlibdeps -p$(p_lgcc)
+ dh_gencontrol -p$(p_lgcc) \
+ -- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
+
+ mkdir -p $(d_lgcc)/usr/share/lintian/overrides
+ echo '$(p_lgcc): package-name-doesnt-match-sonames' \
+ > $(d_lgcc)/usr/share/lintian/overrides/$(p_lgcc)
+
+ dh_installdeb -p$(p_lgcc)
+ dh_md5sums -p$(p_lgcc)
+ dh_builddeb -p$(p_lgcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64gcc)
+ dh_installdirs -p$(p_l64gcc) \
+ $(docdir)/$(p_l64gcc) \
+ lib64
+
+ifeq ($(with_shared_libgcc),yes)
+ mv $(d)/$(PF)/lib64/libgcc_s.so.$(GCC_SONAME) $(d_l64gcc)/lib64/.
+endif
+
+ debian/dh_doclink -p$(p_l64gcc) $(p_base)
+ debian/dh_rmemptydirs -p$(p_l64gcc)
+ dh_strip -p$(p_l64gcc)
+ dh_compress -p$(p_l64gcc)
+ dh_fixperms -p$(p_l64gcc)
+ifeq ($(with_shared_libgcc),yes)
+ dh_makeshlibs -p$(p_l64gcc) \
+ -V '$(p_l64gcc) (>= $(DEB_LIBGCC_SOVERSION))'
+# this does not work ... shlibs.local doesn't distinguish 32/64 bit libs
+# cat debian/$(p_l64gcc)/DEBIAN/shlibs >> debian/shlibs.local
+endif
+# dh_shlibdeps -p$(p_l64gcc)
+#/usr/bin/ldd: line 1: /lib/ld64.so.1: cannot execute binary file
+#dpkg-shlibdeps: failure: ldd on `debian/lib64gcc1/lib64/libgcc_s.so.1' gave error exit status 1
+ifeq ($(DEB_TARGET_ARCH),s390)
+ echo 'shlibs:Depends=libc6-s390x (>= 2.3.1-1)' \
+ > debian/$(p_l64gcc).substvars
+endif
+ifeq ($(DEB_TARGET_ARCH),i386)
+ echo 'shlibs:Depends=libc6-amd64' \
+ > debian/$(p_l64gcc).substvars
+endif
+ifeq ($(DEB_TARGET_ARCH),sparc)
+ echo 'shlibs:Depends=libc6-sparc64 (>= 2.3.1-1)' \
+ > debian/$(p_l64gcc).substvars
+endif
+ifeq ($(DEB_TARGET_ARCH),powerpc)
+ # FIXME change dependency when lib64c6 exists
+ echo 'shlibs:Depends=libc6 (>= 0.1)' \
+ > debian/$(p_l64gcc).substvars
+endif
+ dh_gencontrol -p$(p_l64gcc) \
+ -- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l64gcc)
+ dh_md5sums -p$(p_l64gcc)
+ dh_builddeb -p$(p_l64gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+
+$(binary_stamp)-lib32gcc: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32gcc)
+
+ dh_installdirs -p$(p_l32gcc) \
+ $(docdir)/$(p_l32gcc) \
+ $(lib32)
+ mv $(d)/$(lib32)/libgcc_s.so.$(GCC_SONAME) \
+ $(d_l32gcc)/$(lib32)/.
+
+ debian/dh_doclink -p$(p_l32gcc) $(p_base)
+ debian/dh_rmemptydirs -p$(p_l32gcc)
+ dh_strip -p$(p_l32gcc)
+
+ dh_makeshlibs -p$(p_l32gcc) \
+ -V '$(p_l32gcc) (>= $(DEB_LIBGCC_SOVERSION))'
+ifeq ($(DEB_TARGET_ARCH),amd64)
+ echo 'shlibs:Depends=libc6-i386 | ia32-libs' \
+ > debian/$(p_l32gcc).substvars
+endif
+ifeq ($(DEB_TARGET_ARCH),ppc64)
+ echo 'shlibs:Depends=libc6-powerpc' \
+ > debian/$(p_l32gcc).substvars
+endif
+
+ dh_compress -p$(p_l32gcc)
+ dh_fixperms -p$(p_l32gcc)
+ dh_gencontrol -p$(p_l32gcc) \
+ -- -v$(DEB_LIBGCC_VERSION) $(common_substvars)
+ifeq (,$(findstring emul, $(lib32)))
+ rm -f debian/lib32gcc1.preinst
+endif
+ dh_installdeb -p$(p_l32gcc)
+ dh_md5sums -p$(p_l32gcc)
+ dh_builddeb -p$(p_l32gcc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libstdcxx-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libstdcxx-cross.mk
@@ -0,0 +1,325 @@
+ifeq ($(with_libcxx),yes)
+ arch_binaries := $(arch_binaries) libstdcxx
+endif
+ifeq ($(with_lib64cxx),yes)
+ arch_binaries := $(arch_binaries) lib64stdcxx
+endif
+ifeq ($(biarch32),yes)
+ arch_binaries := $(arch_binaries) lib32stdcxx
+endif
+
+ifeq ($(with_cxxdev),yes)
+ arch_binaries := $(arch_binaries) libstdcxx-dev
+endif
+
+libstdc_ext = -$(BASE_VERSION)
+
+p_lib = libstdc++$(CXX_SONAME)$(cross_lib_arch)
+p_lib64 = lib64stdc++$(CXX_SONAME)$(cross_lib_arch)
+p_lib32 = lib32stdc++$(CXX_SONAME)$(cross_lib_arch)
+p_dev = libstdc++$(CXX_SONAME)$(libstdc_ext)-dev$(cross_lib_arch)
+p_pic = libstdc++$(CXX_SONAME)$(libstdc_ext)-pic$(cross_lib_arch)
+p_dbg = libstdc++$(CXX_SONAME)$(libstdc_ext)-dbg$(cross_lib_arch)
+p_dbg64 = lib64stdc++$(CXX_SONAME)$(libstdc_ext)-dbg$(cross_lib_arch)
+p_dbg32 = lib32stdc++$(CXX_SONAME)$(libstdc_ext)-dbg$(cross_lib_arch)
+
+d_lib = debian/$(p_lib)
+d_lib64 = debian/$(p_lib64)
+d_lib32 = debian/$(p_lib32)
+d_dev = debian/$(p_dev)
+d_pic = debian/$(p_pic)
+d_dbg = debian/$(p_dbg)
+d_dbg64 = debian/$(p_dbg64)
+d_dbg32 = debian/$(p_dbg32)
+
+dirs_lib = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib
+
+dirs_lib64 = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib64
+
+files_lib = \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libstdc++.so.*
+
+files_lib64 = \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/libstdc++.so.*
+
+dirs_dev = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib \
+ $(gcc_lib_dir)/include \
+ $(cxx_inc_dir)
+
+files_dev = \
+ $(cxx_inc_dir)/ \
+ $(gcc_lib_dir)/libstdc++.{a,so} \
+ $(gcc_lib_dir)/libsupc++.a
+# Not yet...
+# $(PF)/$(libdir)/lib{supc,stdc}++.la
+
+dirs_dbg = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/debug \
+ $(gcc_lib_dir)
+files_dbg = \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib/debug/libstdc++.*
+
+dirs_pic = \
+ $(docdir) \
+ $(gcc_lib_dir)
+files_pic = \
+ $(gcc_lib_dir)/libstdc++_pic.a
+
+ifeq ($(biarch),yes)
+ dirs_dev += $(gcc_lib_dir)/$(biarchsubdir)/
+ files_dev += $(gcc_lib_dir)/$(biarchsubdir)/libstdc++.{a,so} \
+ $(gcc_lib_dir)/$(biarchsubdir)/libsupc++.a
+ dirs_pic += $(gcc_lib_dir)
+ files_pic += $(gcc_lib_dir)/$(biarchsubdir)/libstdc++_pic.a
+endif
+ifeq ($(biarch32),yes)
+ dirs_dev += $(gcc_lib_dir)/$(biarchsubdir)/
+ files_dev += $(gcc_lib_dir)/$(biarchsubdir)/libstdc++.{a,so} \
+ $(gcc_lib_dir)/$(biarchsubdir)/libsupc++.a
+ dirs_pic += $(gcc_lib_dir)
+ files_pic += $(gcc_lib_dir)/$(biarchsubdir)/libstdc++_pic.a
+endif
+
+# ----------------------------------------------------------------------
+
+$(binary_stamp)-libstdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib)
+ dh_installdirs -p$(p_lib) $(dirs_lib)
+ DH_COMPAT=2 dh_movefiles -p$(p_lib) $(files_lib)
+
+ dh_installdocs -p$(p_lib)
+ echo "See /$(docdir)/$(p_base) for more information" \
+ > $(d_lib)/$(docdir)/$(p_lib)/README.Debian
+
+ dh_installchangelogs -p$(p_lib)
+ debian/dh_rmemptydirs -p$(p_lib)
+
+ mkdir -p $(d_dbg)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_lib) --keep-debug
+ # The above line puts debugging information into some strange location
+ # that is hardcoded into dh_strip. Move it from there.
+ mkdir -p $(d_lib)/usr/$(DEB_TARGET_GNU_TYPE)/lib/debug
+ mv $(d_lib)/usr/lib/debug/usr/$(DEB_TARGET_GNU_TYPE)/lib/* $(d_lib)/usr/$(DEB_TARGET_GNU_TYPE)/lib/debug/
+ rm -rf $(d_lib)/usr/lib
+ # End workaround
+ find $(d_dbg)
+ tar -C $(d_lib) -c -f - usr/$(DEB_TARGET_GNU_TYPE)/lib/debug | tar -v -C $(d_dbg) -x -f -
+ rm -rf $(d_lib)/usr/$(DEB_TARGET_GNU_TYPE)/lib/debug
+
+ dh_compress -p$(p_lib)
+ dh_fixperms -p$(p_lib)
+ dh_makeshlibs -p$(p_lib) -V '$(p_lib) (>= $(DEB_STDCXX_SOVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_lib)/DEBIAN/shlibs > debian/$(p_lib)/DEBIAN/shlibs.fixed
+ mv debian/$(p_lib)/DEBIAN/shlibs.fixed debian/$(p_lib)/DEBIAN/shlibs
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lib)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lib).substvars > debian/$(p_lib).substvars.new
+ mv debian/$(p_lib).substvars.new debian/$(p_lib).substvars
+ dh_gencontrol -p$(p_lib) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib)
+ dh_md5sums -p$(p_lib)
+ dh_builddeb -p$(p_lib)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+
+$(binary_stamp)-lib64stdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib64)
+ dh_installdirs -p$(p_lib64) $(dirs_lib64)
+ DH_COMPAT=2 dh_movefiles -p$(p_lib64) $(files_lib64)
+
+ dh_installdirs -p$(p_dbg64) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib64
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/debug $(d_dbg64)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/.
+
+ mkdir -p $(d_dbg64)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_lib64) --keep-debug
+ # The above line puts debugging information into some strange location
+ # that is hardcoded into dh_strip. Move it from there.
+ mkdir -p $(d_lib64)/usr/$(DEB_TARGET_GNU_TYPE)/lib64/debug
+ mv $(d_lib64)/usr/lib/debug/usr/$(DEB_TARGET_GNU_TYPE)/lib64/* $(d_lib64)/usr/$(DEB_TARGET_GNU_TYPE)/lib64/debug/
+ rm -rf $(d_lib64)/usr/lib64
+ # End workaround
+ find $(d_lib64)
+ tar -C $(d_lib64) -c -f - usr/$(DEB_TARGET_GNU_TYPE)/lib64/debug | tar -v -C $(d_dbg64) -x -f -
+ rm -rf $(d_lib64)/usr/$(DEB_TARGET_GNU_TYPE)/lib64/debug
+
+ dh_installdocs -p$(p_lib64)
+ echo "See /$(docdir)/$(p_base) for more information" \
+ > $(d_lib64)/$(docdir)/$(p_lib64)/README.Debian
+ dh_installchangelogs -p$(p_lib64)
+ debian/dh_doclink -p$(p_dbg64) $(p_lib64)
+
+ debian/dh_rmemptydirs -p$(p_lib64)
+ dh_compress -p$(p_lib64)
+ dh_fixperms -p$(p_lib64)
+ dh_makeshlibs -p$(p_lib64) -V '$(p_lib64) (>= $(DEB_STDCXX_SOVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_lib64)/DEBIAN/shlibs > debian/$(p_lib64)/DEBIAN/shlibs.fixed
+ mv debian/$(p_lib64)/DEBIAN/shlibs.fixed debian/$(p_lib64)/DEBIAN/shlibs
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lib64)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lib64).substvars > debian/$(p_lib64).substvars.new
+ mv debian/$(p_lib64).substvars.new debian/$(p_lib64).substvars
+ dh_gencontrol -p$(p_lib64) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_gencontrol -p$(p_dbg64) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib64)
+ dh_md5sums -p$(p_lib64)
+ dh_builddeb -p$(p_lib64)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+
+$(binary_stamp)-lib32stdcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lib32)
+ dh_installdirs -p$(p_lib32) $(dirs_lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_lib32) $(files_lib32)
+
+ dh_installdirs -p$(p_dbg32) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/lib32
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/debug $(d_dbg32)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/.
+
+ mkdir -p $(d_dbg32)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_lib32) --keep-debug
+ # The above line puts debugging information into some strange location
+ # that is hardcoded into dh_strip. Move it from there.
+ mkdir -p $(d_lib32)/usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug
+ mv $(d_lib32)/usr/lib/debug/usr/$(DEB_TARGET_GNU_TYPE)/lib32/* $(d_lib32)/usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug/
+ rm -rf $(d_lib32)/usr/lib32
+ # End workaround
+ find $(d_lib32)
+ tar -C $(d_lib32) -c -f - usr/$(DEB_TARGET_GNU_TYPE)/lib/debug | tar -v -C $(d_dbg32) -x -f -
+ rm -rf $(d_lib32)/usr/$(DEB_TARGET_GNU_TYPE)/lib/debug
+
+ dh_installdocs -p$(p_lib32)
+ echo "See /$(docdir)/$(p_base) for more information" \
+ > $(d_lib32)/$(docdir)/$(p_lib32)/README.Debian
+ dh_installchangelogs -p$(p_lib32)
+ debian/dh_doclink -p$(p_dbg32) $(p_lib32)
+
+ debian/dh_rmemptydirs -p$(p_lib32)
+ dh_compress -p$(p_lib32)
+ dh_fixperms -p$(p_lib32)
+
+ sed s/$(cross_lib_arch)//g < debian/$(p_lib32)/DEBIAN/shlibs > debian/$(p_lib32)/DEBIAN/shlibs.fixed
+ mv debian/$(p_lib32)/DEBIAN/shlibs.fixed debian/$(p_lib32)/DEBIAN/shlibs
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lib32)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lib32).substvars > debian/$(p_lib32).substvars.new
+ mv debian/$(p_lib32).substvars.new debian/$(p_lib32).substvars
+ dh_gencontrol -p$(p_lib32) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_gencontrol -p$(p_dbg32) -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_lib32)
+ dh_md5sums -p$(p_lib32)
+ dh_builddeb -p$(p_lib32)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+libcxxdev_deps = $(install_stamp)
+ifeq ($(with_libcxx),yes)
+ libcxxdev_deps += $(binary_stamp)-libstdcxx
+endif
+$(binary_stamp)-libstdcxx-dev: $(libcxxdev_deps) \
+ $(binary_stamp)-libstdcxx
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_dev) $(d_pic)
+ dh_installdirs -p$(p_dev) $(dirs_dev)
+ dh_installdirs -p$(p_pic) $(dirs_pic)
+ dh_installdirs -p$(p_dbg) $(dirs_dbg)
+
+ : # - correct libstdc++-v3 file locations
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libsupc++.a $(d)/$(gcc_lib_dir)/
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libstdc++.{a,so} $(d)/$(gcc_lib_dir)/
+ ln -sf ../../../../$(DEB_TARGET_GNU_TYPE)/lib/libstdc++.so.$(CXX_SONAME) $(d)/$(gcc_lib_dir)/libstdc++.so
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/libstdc++_pic.a \
+ $(d)/$(gcc_lib_dir)/
+
+ rm -f $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib/debug/libstdc++_pic.a
+ rm -f $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/debug/libstdc++_pic.a
+
+ : # remove precompiled headers
+ -find $(d) -type d -name '*.gch' | xargs rm -rf
+
+ifeq ($(biarch),yes)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/.
+ ln -sf ../../../../../lib64/libstdc++.so.$(CXX_SONAME) \
+ $(d)/$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+ifeq ($(biarch32),yes)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/lib*c++*.a $(d)/$(gcc_lib_dir)/$(biarchsubdir)/.
+ ln -sf ../../../../../lib64/libstdc++.so.$(CXX_SONAME) \
+ $(d)/$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+
+ for i in $(d)/$(PF)/include/c++/$(GCC_VERSION)/*-linux; do \
+ if [ -d $$i ]; then mv $$i $$i-gnu; fi; \
+ done
+
+ DH_COMPAT=2 dh_movefiles -p$(p_dev) $(files_dev)
+ DH_COMPAT=2 dh_movefiles -p$(p_pic) $(files_pic)
+ DH_COMPAT=2 dh_movefiles -p$(p_dbg) $(files_dbg)
+
+ dh_link -p$(p_dev) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/libstdc++.so \
+ /$(cxx_inc_dir) /$(PF)/$(DEB_TARGET_GNU_TYPE)/include/c++/$(BASE_VERSION)
+
+ifeq ($(biarch),yes)
+ dh_link -p$(p_dev) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+ifeq ($(biarch32),yes)
+ dh_link -p$(p_dev) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/libstdc++.so.$(CXX_SONAME) \
+ /$(gcc_lib_dir)/$(biarchsubdir)/libstdc++.so
+endif
+
+ debian/dh_doclink -p$(p_dev) $(p_lib)
+ debian/dh_doclink -p$(p_pic) $(p_lib)
+ debian/dh_doclink -p$(p_dbg) $(p_lib)
+ cp -p $(srcdir)/libstdc++-v3/config/linker-map.gnu \
+ $(d_pic)/$(gcc_lib_dir)/libstdc++_pic.map
+
+ifeq ($(with_cxxdev),yes)
+ debian/dh_rmemptydirs -p$(p_dev)
+ debian/dh_rmemptydirs -p$(p_pic)
+ debian/dh_rmemptydirs -p$(p_dbg)
+endif
+
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_dev) --dbg-package=$(p_lib)
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_pic)
+ dh_compress -p$(p_dev) -p$(p_pic) -p$(p_dbg) -X.txt
+ dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ dh_md5sums -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+ dh_builddeb -p$(p_dev) -p$(p_pic) -p$(p_dbg)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-java.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-java.mk
@@ -0,0 +1,690 @@
+ifeq ($(with_separate_libgcj),yes)
+ ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
+ arch_binaries := $(arch_binaries) jbase
+ endif
+else
+ arch_binaries := $(arch_binaries) jbase
+endif
+
+ifeq ($(with_gcj),yes)
+ arch_binaries := $(arch_binaries) gcj
+endif
+
+ifeq ($(with_libgcj),yes)
+ ifeq ($(with_java),yes)
+ arch_binaries := $(arch_binaries) java gcjapplet
+ indep_binaries := $(indep_binaries) libgcjjar
+ endif
+
+ ifeq ($(with_javadev),yes)
+ arch_binaries := $(arch_binaries) libgcjdev libgcjdbg
+ indep_binaries := $(indep_binaries) libgcjsrc
+ ifeq ($(with_libgcj_doc),yes)
+ indep_binaries := $(indep_binaries) libgcjdoc
+ endif
+ endif
+
+ ifeq ($(with_java32),yes)
+ arch_binaries := $(arch_binaries) java32
+ endif
+endif
+
+p_jbase = gcj$(pkg_ver)-base
+p_gcj = gcj$(pkg_ver)
+p_gij = gij$(pkg_ver)
+p_jlib = libgcj$(PKG_LIBGCJ_EXT)
+p_jdbg = libgcj$(PKG_GCJ_EXT)-dbg
+p_jar = libgcj$(PKG_GCJ_EXT)-jar
+p_jlibx = libgcj$(PKG_LIBGCJ_EXT)-awt
+p_jdev = libgcj$(PKG_GCJ_EXT)-dev
+p_jsrc = libgcj$(PKG_GCJ_EXT)-src
+p_view = gappletviewer$(pkg_ver)
+p_plug = gcjwebplugin$(pkg_ver)
+p_jdoc = libgcj-doc
+p_j32lib= lib32gcj$(PKG_LIBGCJ_EXT)
+p_j32dev= lib32gcj$(PKG_GCJ_EXT)-dev
+p_j32dbg= lib32gcj$(PKG_GCJ_EXT)-dbg
+
+d_jbase = debian/$(p_jbase)
+d_gcj = debian/$(p_gcj)
+d_gij = debian/$(p_gij)
+d_jlib = debian/$(p_jlib)
+d_jdbg = debian/$(p_jdbg)
+d_jar = debian/$(p_jar)
+d_jlibx = debian/$(p_jlibx)
+d_jdev = debian/$(p_jdev)
+d_jsrc = debian/$(p_jsrc)
+d_jdoc = debian/$(p_jdoc)
+d_view = debian/$(p_view)
+d_plug = debian/$(p_plug)
+d_j32lib= debian/$(p_j32lib)
+d_j32dev= debian/$(p_j32dev)
+d_j32dbg= debian/$(p_j32dbg)
+
+gcj_vlibdir = $(PF)/$(libdir)/gcj-$(BASE_VERSION)-$(GCJ_SONAME)
+gcj_vlib32dir = $(lib32)/gcj-$(BASE_VERSION)-$(GCJ_SONAME)
+gcj_vlib64dir = $(PF)/$(lib64)/gcj-$(BASE_VERSION)-$(GCJ_SONAME)
+
+dirs_gcj = \
+ $(docdir)/$(p_jbase) \
+ $(PF)/bin \
+ $(PF)/share/man/man1 \
+ $(PF)/share/info \
+ $(gcc_lexec_dir)
+files_gcj = \
+ $(PF)/bin/{gcj,gjar,gjarsigner,gcjh,gjavah,gnative2ascii,grmic,gtnameserv,jv-convert,jcf-dump}$(pkg_ver) \
+ $(PF)/share/man/man1/{gjar,gjarsigner,gcjh,gjavah,gnative2ascii,grmic,gtnameserv}$(pkg_ver).1 \
+ $(gcc_lexec_dir)/{ecj1,jc1,jvgenmain}
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_gcj += \
+ $(PF)/share/info/gcj* \
+ $(PF)/share/man/man1/{gcj,jv-convert,jcf-dump}$(pkg_ver).1
+endif
+
+dirs_gij = \
+ $(docdir)/$(p_jbase) \
+ $(PF)/bin \
+ $(PF)/share/man/man1 \
+ var/lib/gcj$(pkg_ver)
+
+files_gij = \
+ $(PF)/bin/{gij,gcj-dbtool,gorbd,grmid,grmiregistry,gkeytool,gserialver}$(pkg_ver) \
+ $(PF)/share/man/man1/{gorbd,grmid,grmiregistry,gkeytool,gserialver}$(pkg_ver).1
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_gij += \
+ $(PF)/share/man/man1/{gij,gcj-dbtool}$(pkg_ver).1
+endif
+
+dirs_jlib = \
+ $(docdir)/$(p_jbase) \
+ $(gcj_vlibdir) \
+ $(PF)/$(libdir)
+
+files_jlib = \
+ $(PF)/$(libdir)/libgij.so.* \
+ $(PF)/$(libdir)/libgcj-tools.so.* \
+ $(PF)/$(libdir)/libgcj.so.* \
+ $(gcj_vlibdir)/libjvm.so \
+
+# $(gcj_vlibdir)/libgconfpeer.so
+
+ifeq ($(with_java_alsa),yes)
+ files_jlib += \
+ $(gcj_vlibdir)/libgjsmalsa.so
+endif
+
+dirs_jar = \
+ $(PF)/share/java
+
+dirs_jlibx = \
+ $(PF)/$(libdir) \
+ $(gcj_vlibdir) \
+ $(PF)/share/java
+
+files_jlibx = \
+ $(gcj_vlibdir)/libjawt.so \
+ $(gcj_vlibdir)/libgtkpeer.so
+
+dirs_jdev = \
+ $(docdir)/$(p_jbase)/examples \
+ $(PF)/{include,lib} \
+ $(gcc_lib_dir)/include/gcj
+
+files_jdev = \
+ $(cxx_inc_dir)/{org,gcj,java,javax} \
+ $(cxx_inc_dir)/gnu/{awt,classpath,gcj,java,javax} \
+ $(gcc_lib_dir)/include/{jni.h,jni_md.h,jvmpi.h} \
+ $(gcc_lib_dir)/include/{jawt.h,jawt_md.h} \
+ $(gcc_lib_dir)/include/gcj/libgcj-config.h \
+ $(PF)/$(libdir)/libgij.so \
+ $(PF)/$(libdir)/libgcj.{so,spec} \
+ $(PF)/$(libdir)/libgcj-tools.so \
+ $(PF)/$(libdir)/pkgconfig/libgcj-$(BASE_VERSION).pc
+
+ifeq ($(with_static_java),yes)
+ files_jdev += \
+ $(PF)/$(libdir)/libgij.a \
+ $(PF)/$(libdir)/libgcj.a \
+ $(PF)/$(libdir)/libgcj-tools.a
+endif
+
+ifeq ($(with_lib64gcj),yes)
+ dirs_jlib += $(gcj_vlib64dir)
+ files_jlib += \
+ $(gcj_vlib64dir)/libjawt.so \
+ $(gcj_vlib64dir)/lib*peer.so
+endif
+
+ifeq ($(with_standalone_gcj),yes)
+
+ dirs_gcj += \
+ $(gcc_lib_dir)/include \
+ $(PF)/share/man/man1
+
+ files_gcj += \
+ $(PF)/bin/{cpp,gcc,gcov}$(pkg_ver) \
+ $(gcc_lexec_dir)/cc1 \
+ $(gcc_lexec_dir)/collect2 \
+ $(gcc_lib_dir)/{libgcc*,libgcov.a,*.o} \
+ $(gcc_lib_dir)/include/README \
+ $(gcc_lib_dir)/include/{float,iso646,limits,std*,syslimits,unwind,varargs}.h \
+ $(shell for d in asm bits gnu linux; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$d \
+ && echo $(gcc_lib_dir)/include/$$d; \
+ done) \
+ $(shell test -e $(d)/$(gcc_lib_dir)/SYSCALLS.c.X \
+ && echo $(gcc_lib_dir)/SYSCALLS.c.X) \
+ $(shell for h in {,e,p,x}mmintrin.h mm3dnow.h mm_malloc.h; do \
+ test -e $(d)/$(gcc_lib_dir)/include/$$h \
+ && echo $(gcc_lib_dir)/include/$$h; \
+ done) \
+
+ ifneq ($(GFDL_INVARIANT_FREE),yes)
+ files_gcj += \
+ $(PF)/share/man/man1/{cpp,gcc,gcov}$(pkg_ver).1
+ endif
+
+ ifeq ($(biarch),yes)
+ files_gcj += $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,libgcov.a,*.o}
+ endif
+ ifeq ($(biarch32),yes)
+ files_gcj += $(gcc_lib_dir)/$(biarchsubdir)/{libgcc*,*.o}
+ endif
+
+ ifeq ($(DEB_HOST_ARCH),ia64)
+ files_gcj += $(gcc_lib_dir)/include/ia64intrin.h
+ endif
+
+ ifeq ($(DEB_HOST_ARCH),m68k)
+ files_gcj += $(gcc_lib_dir)/include/math-68881.h
+ endif
+
+ ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),powerpc ppc64))
+ files_gcj += $(gcc_lib_dir)/include/{altivec.h,ppc-asm.h,spe.h}
+ endif
+
+endif
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-jbase: $(install_dependencies)
+ dh_testdir
+ dh_testroot
+ rm -rf $(d_jbase)
+ dh_installdirs -p$(p_jbase)
+ dh_installdocs -p$(p_jbase)
+ dh_installchangelogs -p$(p_jbase)
+ dh_compress -p$(p_jbase)
+ dh_fixperms -p$(p_jbase)
+ dh_gencontrol -p$(p_jbase) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jbase)
+ dh_md5sums -p$(p_jbase)
+ dh_builddeb -p$(p_jbase)
+ touch $@
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcjjar: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ dh_installdirs -p$(p_jar) $(dirs_jar)
+ mv $(d)/$(PF)/share/java/libgcj-$(BASE_VERSION).jar \
+ $(d_jar)/$(PF)/share/java/
+ mv $(d)/$(PF)/share/java/libgcj-tools-$(BASE_VERSION).jar \
+ $(d_jar)/$(PF)/share/java/
+
+ debian/dh_doclink -p$(p_jar) $(p_jbase)
+ debian/dh_rmemptydirs -p$(p_jar)
+ dh_compress -p$(p_jar)
+ dh_fixperms -p$(p_jar)
+ dh_gencontrol -p$(p_jar) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jar)
+ dh_md5sums -p$(p_jar)
+ dh_builddeb -p$(p_jar)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcjsrc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+
+ $(MAKE) -C $(buildlibdir)/libjava \
+ DESTDIR=$(PWD)/$(d) install-src.zip
+ mkdir -p $(d_jsrc)/$(PF)/share/java
+ mv $(d)/$(PF)/share/java/src-$(BASE_VERSION).zip \
+ $(d_jsrc)/$(PF)/share/java/libgcj-src-$(BASE_VERSION).zip
+
+ : # add files for the classpath examples
+ cd $(srcdir)/libjava/classpath/examples && \
+ find ! -type d ! -name 'Makefile.??' ! -name '*.java' \
+ | $(builddir)/fastjar/fastjar -uvfM@ \
+ $(PWD)/$(d_jsrc)/$(PF)/share/java/libgcj-src-$(BASE_VERSION).zip
+
+ debian/dh_doclink -p$(p_jsrc) $(p_jbase)
+ debian/dh_rmemptydirs -p$(p_jsrc)
+ dh_compress -p$(p_jsrc)
+ dh_fixperms -p$(p_jsrc)
+ dh_gencontrol -p$(p_jsrc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jsrc)
+ dh_md5sums -p$(p_jsrc)
+ dh_builddeb -p$(p_jsrc)
+
+ touch $@
+
+# ----------------------------------------------------------------------
+libgcj_version = $(shell $(builddir)/gcc/xgcc --version \
+ | sed -n '/GCC/s/.*(GCC) *//p')
+libgcj_title = LibGCJ Classpath
+libgcjhbox_href = http://gcc.gnu.org/java
+libgcjhbox = $(title) ($(libgcj_version))
+
+$(build_javadoc_stamp): $(build_stamp)
+ mkdir -p $(builddir)/java-src
+ cd $(builddir)/java-src && $(builddir)/fastjar/fastjar -xf \
+ $(buildlibdir)/libjava/src.zip
+
+ mkdir -p $(builddir)/html
+ gjdoc \
+ -use \
+ -sourcepath "$(builddir)/java-src" \
+ -encoding UTF-8 \
+ -breakiterator \
+ -licensetext \
+ -linksource \
+ -splitindex \
+ -d $(builddir)/html \
+ -doctitle "$(title) $(libgcj_version)" \
+ -windowtitle "$(title) $(libgcj_version) Documentation" \
+ -header "$(classpathbox)" \
+ -footer "$(classpathbox)" \
+ -subpackages gnu:java:javax:org
+
+ $(MAKE) -C $(buildlibdir)/libjava/classpath/examples
+
+ touch $@
+
+
+$(binary_stamp)-libgcjdoc: $(install_stamp) #$(build_javadoc_stamp)
+ dh_testdir
+ dh_testroot
+
+ $(MAKE) -C $(buildlibdir)/libjava/classpath/examples \
+ GLIBJ_CLASSPATH="$(buildlibdir)/libjava/libgcj-$(BASE_VERSION).jar:$(buildlibdir)/libjava/libgcj-tools-$(BASE_VERSION).jar" \
+ DESTDIR=$(PWD)/$(d_jdoc) \
+ pkgdatadir=/usr/share/doc/$(p_jbase) \
+ install
+
+ dh_installdocs -p$(p_jdoc)
+ dh_installchangelogs -p$(p_jdoc)
+ mkdir -p $(d_jdoc)/usr/share/doc/$(p_jbase)
+# cp -al $(builddir)/html $(d_jdoc)/usr/share/doc/$(p_jbase)/
+# ln -sf ../$(p_jbase)/html $(d_jdoc)/usr/share/doc/$(p_jdoc)/html
+ dh_compress -p$(p_jdoc) -X.java -X.c
+ dh_fixperms -p$(p_jdoc)
+ dh_gencontrol -p$(p_jdoc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jdoc)
+ dh_md5sums -p$(p_jdoc)
+ dh_builddeb -p$(p_jdoc)
+
+ touch $@
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-java: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ if [ -d $(d)/$(PF)/$(libdir)/gcj-$(GCC_VERSION) ]; then \
+ ls -l $(d)/$(PF)/$(libdir)/gcj-$(GCC_VERSION); \
+ mv $(d)/$(PF)/$(libdir)/gcj-$(GCC_VERSION)/* $(d)/$(gcj_vlibdir)/; \
+ fi
+
+ dh_installdirs -p$(p_gij) $(dirs_gij)
+ dh_installdirs -p$(p_jlib) $(dirs_jlib)
+ dh_installdirs -p$(p_jlibx) $(dirs_jlibx)
+
+ DH_COMPAT=2 dh_movefiles -p$(p_gij) $(files_gij)
+ DH_COMPAT=2 dh_movefiles -p$(p_jlib) $(files_jlib)
+ DH_COMPAT=2 dh_movefiles -p$(p_jlibx) $(files_jlibx)
+
+ifeq ($(DEB_HOST_ARCH),hppa)
+ mv $(d_gij)/$(PF)/bin/gij$(pkg_ver) \
+ $(d_gij)/$(PF)/bin/gij$(pkg_ver).bin
+ install -m755 debian/gij-hppa $(d_gij)/$(PF)/bin/gij$(pkg_ver)
+endif
+
+ ln -s ../libgcj.so.$(GCJ_SONAME) \
+ $(d_jlib)/$(gcj_vlibdir)/libgcj_bc.so.1
+
+ cp -p $(srcdir)/libjava/{NEWS,README,THANKS} \
+ $(d_gij)/usr/share/doc/$(p_jbase)/
+
+ debian/dh_doclink -p$(p_gij) $(p_jbase)
+ debian/dh_doclink -p$(p_jlib) $(p_jbase)
+ debian/dh_doclink -p$(p_jlibx) $(p_jbase)
+
+ifeq ($(with_separate_libgcj),yes)
+ ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION))
+ ifeq ($(with_check),yes)
+ cp -p test-summary $(d_gij)/usr/share/doc/$(p_jbase)/test-summary
+ endif
+ endif
+endif
+ debian/dh_rmemptydirs -p$(p_gij)
+ debian/dh_rmemptydirs -p$(p_jlib)
+ debian/dh_rmemptydirs -p$(p_jlibx)
+
+ mkdir -p $(d_gij)/var/lib/gcj$(pkg_ver)
+
+ dh_makeshlibs -p$(p_jlib) -V '$(p_jlib) (>= $(DEB_GCJ_SOVERSION))'
+ cat debian/$(p_jlib)/DEBIAN/shlibs >> debian/shlibs.local
+
+ dh_makeshlibs -p$(p_jlibx) -V '$(p_jlibx) (>= $(DEB_GCJ_SOVERSION))'
+
+ -cd $(d_jlibx)/$(PF)/lib/gcj$(pkg_ver) \
+ && ldd libjawt.so libgtkpeer.so
+ DH_COMPAT=5 dh_strip \
+ -p$(p_gij) -p$(p_jlib) -p$(p_jlibx) --dbg-package=$(p_jdbg)
+ -cd $(d_jlibx)/$(PF)/lib/gcj$(pkg_ver) \
+ && ldd libjawt.so libgtkpeer.so
+
+ dh_compress -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+ dh_fixperms -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+# the libstdc++ binary packages aren't built yet ...
+ echo 'libstdc++ $(CXX_SONAME) libstdc++$(CXX_SONAME) (>= $(DEB_STDCXX_SOVERSION))' \
+ >> debian/shlibs.local
+ -[ -d $(d_l64gcc) ] && mv $(d_l64gcc) $(d_l64gcc).saved
+ dh_shlibdeps \
+ -L$(p_lgcc) \
+ -L$(p_jlib) \
+ -l:$(d)/$(PF)/$(libdir):$(d_lib)/$(PF)/$(libdir):$(d_jlib)/$(PF)/$(libdir):$(d_lgcc)/lib \
+ -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+ -[ -d $(d_l64gcc).saved ] && mv $(d_l64gcc).saved $(d_l64gcc)
+ sed -e 's/$(p_jlib)[^,]*//' -e 's/, *,/,/' debian/$(p_jlib).substvars \
+ >> debian/$(p_jlib).substvars.tmp \
+ && mv -f debian/$(p_jlib).substvars.tmp debian/$(p_jlib).substvars
+ dh_gencontrol \
+ -p$(p_gij) -p$(p_jlib) -p$(p_jlibx) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+
+ dh_installdeb -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+ dh_md5sums -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+ dh_builddeb -p$(p_gij) -p$(p_jlib) -p$(p_jlibx)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcj: $(build_html_stamp) $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_gcj)
+ dh_installdirs -p$(p_gcj) $(dirs_gcj)
+
+ mkdir -p $(d_gcj)/usr/share/lintian/overrides
+ cp -p debian/$(p_gcj).overrides \
+ $(d_gcj)/usr/share/lintian/overrides/$(p_gcj)
+ cp -p $(srcdir)/gcc/java/ChangeLog \
+ $(d_gcj)/usr/share/doc/$(p_jbase)/changelog.gcj
+ cp -p $(srcdir)/libjava/ChangeLog \
+ $(d_gcj)/usr/share/doc/$(p_jbase)/changelog.libjava
+
+ifeq ($(with_standalone_gcj),yes)
+ rm -f $(d)/$(PF)/$(libdir)/libgcc_s.so
+ ln -sf /$(libdir)/libgcc_s.so.$(GCC_SONAME) $(d)/$(gcc_lib_dir)/libgcc_s.so
+ ifeq ($(biarch),yes)
+ rm -f $(d)/$(PF)/$(lib64)/libgcc_s.so
+ dh_link -p$(p_gcj) \
+ /$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_64.so \
+ /$(lib64)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+ endif
+ ifeq ($(biarch32),yes)
+ mkdir -p $(d_gcj)/$(gcc_lib_dir)
+ mv $(d)/$(gcc_lib_dir)/$(biarchsubdir) $(d_gcj)/$(gcc_lib_dir)/
+ dh_link -p$(p_gcj) \
+ /$(lib32)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/libgcc_s_32.so \
+ /$(lib32)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s_32.so \
+ /$(lib32)/libgcc_s.so.$(GCC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libgcc_s.so
+ endif
+endif
+ DH_COMPAT=2 dh_movefiles -p$(p_gcj) $(files_gcj)
+
+ ln -sf gcj$(pkg_ver) \
+ $(d_gcj)/$(PF)/bin/$(TARGET_ALIAS)-gcj$(pkg_ver)
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+ ln -sf gcj$(pkg_ver).1 \
+ $(d_gcj)/$(PF)/share/man/man1/$(TARGET_ALIAS)-gcj$(pkg_ver).1
+ cp -p html/gcj.html $(d_gcj)/$(docdir)/$(p_jbase)/
+endif
+ debian/dh_doclink -p$(p_gcj) $(p_jbase)
+
+ cp -p debian/FAQ.gcj $(d_gcj)/$(docdir)/$(p_jbase)/
+
+ cp -p debian/gcj-wrapper$(pkg_ver) $(d_gcj)/$(PF)/bin/
+ chmod 755 $(d_gcj)/$(PF)/bin/gcj-wrapper$(pkg_ver)
+ cp -p debian/gcj-wrapper$(pkg_ver).1 $(d_gcj)/$(PF)/share/man/man1/
+
+ debian/dh_rmemptydirs -p$(p_gcj)
+
+ dh_strip -p$(p_gcj)
+ dh_compress -p$(p_gcj) -X.java
+ dh_fixperms -p$(p_gcj)
+ dh_shlibdeps -p$(p_gcj)
+ dh_gencontrol -p$(p_gcj) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_gcj)
+ dh_md5sums -p$(p_gcj)
+ dh_builddeb -p$(p_gcj)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcjdev: $(build_html_stamp) $(install_stamp) $(binary_stamp)-java
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ dh_installdirs -p$(p_jdev) $(dirs_jdev)
+
+ DH_COMPAT=2 dh_movefiles -p$(p_jdev) $(files_jdev)
+
+ for i in libgij libgcj libgcj-tools; do \
+ dh_link -p$(p_jdev) /$(PF)/$(libdir)/$$i.so.$(GCJ_SONAME) \
+ $(gcc_lib_dir)/$$i.so; \
+ rm -f $(d_jdev)/$(PF)/$(libdir)/$$i.{la,so}; \
+ done
+ifeq ($(with_static_java),yes)
+ for i in libgij libgcj libgcj-tools; do \
+ mv $(d_jdev)/$(PF)/$(libdir)/$$i.a $(d_jdev)/$(gcc_lib_dir)/; \
+ done
+endif
+
+ ln -sf libgcj-$(BASE_VERSION).pc \
+ $(d_jdev)/$(PF)/$(libdir)/pkgconfig/libgcj$(PKG_GCJ_EXT).pc
+
+ mv $(d_jdev)/$(PF)/$(libdir)/libgcj.spec $(d_jdev)/$(gcc_lib_dir)/
+
+ install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
+ $(d_jdev)/$(gcc_lib_dir)/libgcj_bc.so
+
+ debian/dh_doclink -p$(p_jdev) $(p_jbase)
+
+ debian/dh_rmemptydirs -p$(p_jdev)
+
+ mkdir -p $(d_jdev)/usr/share/lintian/overrides
+ cp -p debian/$(p_jdev).overrides \
+ $(d_jdev)/usr/share/lintian/overrides/$(p_jdev)
+
+ DH_COMPAT=5 dh_strip -p$(p_jdev) --dbg-package=$(p_jdbg)
+ dh_compress -p$(p_jdev) -X.java
+ dh_fixperms -p$(p_jdev)
+ dh_shlibdeps \
+ -L$(p_lgcc) \
+ -l:$(d)/$(PF)/$(libdir):$(d_lib)/$(PF)/$(libdir):$(d_jlib)/$(PF)/$(libdir):$(d_lgcc)/lib \
+ -p$(p_jdev)
+ dh_gencontrol -p$(p_jdev) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jdev)
+ dh_md5sums -p$(p_jdev)
+ dh_builddeb -p$(p_jdev)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-libgcjdbg: $(install_stamp) $(binary_stamp)-java $(binary_stamp)-libgcjdev $(binary_stamp)-gcjapplet
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ debian/dh_doclink -p$(p_jdbg) $(p_jbase)
+
+ for i in libgij libgcj libgcj-tools; do \
+ if [ -f $(d_jdbg)/usr/lib/debug/usr/lib/$$i.so.$(GCJ_SONAME).0.0 ]; then \
+ ln -sf $$i.so.$(GCJ_SONAME).0.0 \
+ $(d_jdbg)/usr/lib/debug/usr/lib/$$i.so.$(GCJ_SONAME); \
+ fi; \
+ done
+
+ dh_compress -p$(p_jdbg)
+ dh_fixperms -p$(p_jdbg)
+ dh_gencontrol -p$(p_jdbg) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_jdbg)
+ dh_md5sums -p$(p_jdbg)
+ dh_builddeb -p$(p_jdbg)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-gcjapplet: $(install_stamp) $(binary_stamp)-java
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ dh_installdirs -p$(p_view) \
+ usr/bin
+ DH_COMPAT=2 dh_movefiles -p$(p_view) \
+ $(PF)/bin/gappletviewer$(pkg_ver)
+
+ifneq ($(GFDL_INVARIANT_FREE),yes)
+# DH_COMPAT=2 dh_movefiles -p$(p_view) \
+# $(PF)/share/man/man1/gappletviewer$(pkg_ver).1
+endif
+
+ifeq ($(with_pkg_plugin),yes)
+ dh_installdirs -p$(p_plug) \
+ $(gcj_vlibdir) \
+ usr/lib/mozilla/plugins \
+ usr/lib/mozilla-firefox/plugins \
+ usr/lib/mozilla-snapshot/plugins
+ DH_COMPAT=2 dh_movefiles -p$(p_plug) \
+ $(gcj_vlibdir)/libgcjwebplugin.so
+else
+ DH_COMPAT=2 dh_movefiles -p$(p_view) \
+ $(gcj_vlibdir)/libgcjwebplugin.so
+endif
+ rm -f $(d)/$(gcj_vlibdir)/libgcjwebplugin.*a
+
+ debian/dh_doclink -p$(p_view) $(p_jbase)
+
+ DH_COMPAT=5 dh_strip -p$(p_view) --dbg-package=$(p_jdbg)
+ dh_compress -p$(p_view)
+ dh_fixperms -p$(p_view)
+ dh_gencontrol -p$(p_view) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_view)
+ dh_md5sums -p$(p_view)
+ dh_builddeb -p$(p_view)
+
+ifeq ($(with_pkg_plugin),yes)
+ debian/dh_doclink -p$(p_plug) $(p_jbase)
+
+ DH_COMPAT=5 dh_strip -p$(p_plug) --dbg-package=$(p_jdbg)
+ dh_compress -p$(p_plug)
+ dh_fixperms -p$(p_plug)
+ dh_gencontrol -p$(p_plug) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_plug)
+ dh_md5sums -p$(p_plug)
+ dh_builddeb -p$(p_plug)
+endif
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-java32: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ if [ -d $(d)/$(lib32)/gcj-$(GCC_VERSION) ]; then \
+ mv $(d)/$(lib32)/gcj-$(GCC_VERSION)/* $(d)/$(gcj_vlib32dir)/; \
+ fi
+ rm -f $(d)/$(gcj_vlib32dir)/classmap.db
+
+ dh_installdirs -p$(p_j32lib) \
+ $(PF)/bin \
+ $(gcj_vlib32dir)
+ dh_installdirs -p$(p_j32dev) \
+ $(gcc_lib_dir)/$(biarchsubdir) \
+ $(gcj_vlib32dir)
+
+ for i in gij gcj-dbtool grmiregistry; do \
+ install -m755 debian/tmp32/usr/bin/$$i$(pkg_ver) \
+ $(d_j32lib)/$(PF)/bin/ia32-$$i$(pkg_ver); \
+ done
+
+ mv $(d)/$(lib32)/lib{gij,gcj,gcj-tools}.so.* \
+ $(d_j32lib)/$(lib32)/.
+ mv $(d)/$(gcj_vlib32dir)/lib*.so \
+ $(d_j32lib)/$(gcj_vlib32dir)/.
+
+ ln -s ../libgcj.so.$(GCJ_SONAME) \
+ $(d_j32lib)/$(gcj_vlib32dir)/libgcj_bc.so.1
+
+ for i in libgij libgcj libgcj-tools; do \
+ dh_link -p$(p_j32dev) /$(lib32)/$$i.so.$(GCJ_SONAME) \
+ $(gcc_lib_dir)/$(biarchsubdir)/$$i.so; \
+ rm -f $(d_j32dev)/$(lib32)/$$i.{la,so}; \
+ done
+ifeq ($(with_static_java),yes)
+ for i in libgij libgcj libgcj-tools; do \
+ mv $(d)/$(lib32)/$$i.a $(d_j32dev)/$(gcc_lib_dir)/$(biarchsubdir)/; \
+ done
+endif
+
+ install -m 755 $(d)/$(PF)/lib/libgcj_bc.so.1 \
+ $(d_j32dev)/$(gcc_lib_dir)/$(biarchsubdir)/libgcj_bc.so
+
+ debian/dh_doclink -p$(p_j32lib) $(p_jbase)
+ debian/dh_doclink -p$(p_j32dev) $(p_jbase)
+ debian/dh_doclink -p$(p_j32dbg) $(p_jbase)
+
+ DH_COMPAT=5 dh_strip \
+ -p$(p_j32lib) -p$(p_j32dev) --dbg-package=$(p_j32dbg)
+
+ for i in libgij libgcj libgcj-tools; do \
+ if [ -f $(d_j32dbg)/usr/lib/debug/$(lib32)/$$i.so.$(GCJ_SONAME).0.0 ]; then \
+ ln -sf $$i.so.$(GCJ_SONAME).0.0 \
+ $(d_j32dbg)/usr/lib/debug/$(lib32)/$$i.so.$(GCJ_SONAME); \
+ fi; \
+ done
+
+ rm -f $(gcj_vlib32dir)/classmap.db
+ mv $(d)/$(gcj_vlib32dir)/* \
+ $(d_j32dev)/$(gcj_vlib32dir)/.
+
+ debian/dh_rmemptydirs -p$(p_j32lib)
+ debian/dh_rmemptydirs -p$(p_j32dev)
+ debian/dh_rmemptydirs -p$(p_j32dbg)
+
+ dh_compress -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+ dh_fixperms -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+ dh_shlibdeps -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+ dh_gencontrol -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg) \
+ -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+ dh_md5sums -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+ dh_builddeb -p$(p_j32lib) -p$(p_j32dev) -p$(p_j32dbg)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-libobjc-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-libobjc-cross.mk
@@ -0,0 +1,117 @@
+ifeq ($(with_objcdev),yes)
+ arch_binaries := $(arch_binaries) libobjc
+endif
+ifeq ($(with_lib64objc),yes)
+ arch_binaries := $(arch_binaries) lib64objc
+endif
+ifeq ($(with_lib32objc),yes)
+ arch_binaries := $(arch_binaries) lib32objc
+endif
+
+p_lobjc = libobjc$(OBJC_SONAME)$(cross_lib_arch)
+p_l32objc = lib32objc$(OBJC_SONAME)$(cross_lib_arch)
+p_l64objc = lib64objc$(OBJC_SONAME)$(cross_lib_arch)
+
+d_lobjc = debian/$(p_lobjc)
+d_l32objc = debian/$(p_l32objc)
+d_l64objc = debian/$(p_l64objc)
+
+dirs_lobjc = \
+ $(docdir) \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)
+files_lobjc = \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libobjc.so.*
+ifeq ($(with_objc_gc),yes)
+ files_lobjc += \
+ $(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libobjc_gc.so.*
+endif
+
+
+$(binary_stamp)-libobjc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_lobjc)
+ dh_installdirs -p$(p_lobjc) $(dirs_lobjc)
+# mv $(d)/$(gcc_lib_dir)/libobjc.so.* $(d)/$(PF)/$(libdir)/.
+#ifeq ($(with_objc_gc),yes)
+# mv $(d)/$(gcc_lib_dir)/libobjc_gc.so.* $(d)/$(PF)/$(libdir)/.
+#endif
+ DH_COMPAT=2 dh_movefiles -p$(p_lobjc) $(files_lobjc)
+
+ dh_installdocs -p$(p_lobjc)
+ echo "See /$(docdir)/$(p_base) for more information" \
+ > $(d_lobjc)/$(docdir)/$(p_lobjc)/README.Debian
+ dh_installchangelogs -p$(p_lobjc)
+
+ debian/dh_rmemptydirs -p$(p_lobjc)
+
+ PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_lobjc)
+ dh_compress -p$(p_lobjc)
+
+ dh_fixperms -p$(p_lobjc)
+ dh_makeshlibs -p$(p_lobjc) -V '$(p_lobjc) (>= $(DEB_SOEVERSION))' -n
+ sed s/$(cross_lib_arch)//g < debian/$(p_lobjc)/DEBIAN/shlibs > debian/$(p_lobjc)/DEBIAN/shlibs.fixed
+ mv debian/$(p_lobjc)/DEBIAN/shlibs.fixed debian/$(p_lobjc)/DEBIAN/shlibs
+ ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_lobjc)
+ sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_lobjc).substvars > debian/$(p_lobjc).substvars.new
+ mv debian/$(p_lobjc).substvars.new debian/$(p_lobjc).substvars
+ dh_gencontrol -p$(p_lobjc) -- -v$(DEB_EVERSION) $(common_substvars)
+ dh_installdeb -p$(p_lobjc)
+ dh_md5sums -p$(p_lobjc)
+ dh_builddeb -p$(p_lobjc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib64objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l64objc)
+ dh_installdirs -p$(p_l64objc) \
+ $(PF)/lib64
+ DH_COMPAT=2 dh_movefiles -p$(p_l64objc) \
+ $(PF)/lib64/libobjc.so.*
+
+ debian/dh_doclink -p$(p_l64objc) $(p_base)
+
+ dh_strip -p$(p_l64objc)
+ dh_compress -p$(p_l64objc)
+ dh_fixperms -p$(p_l64objc)
+ dh_makeshlibs -p$(p_l64objc) -V '$(p_l64objc) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l64objc)
+ dh_gencontrol -p$(p_l64objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l64objc)
+ dh_md5sums -p$(p_l64objc)
+ dh_builddeb -p$(p_l64objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
+
+# ----------------------------------------------------------------------
+$(binary_stamp)-lib32objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_l32objc)
+ dh_installdirs -p$(p_l32objc) \
+ $(lib32)
+ DH_COMPAT=2 dh_movefiles -p$(p_l32objc) \
+ $(lib32)/libobjc.so.*
+
+ debian/dh_doclink -p$(p_l32objc) $(p_base)
+
+ dh_strip -p$(p_l32objc)
+ dh_compress -p$(p_l32objc)
+ dh_fixperms -p$(p_l32objc)
+ dh_makeshlibs -p$(p_l32objc) -V '$(p_l32objc) (>= $(DEB_SOVERSION))'
+# dh_shlibdeps -p$(p_l32objc)
+ dh_gencontrol -p$(p_l32objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_l32objc)
+ dh_md5sums -p$(p_l32objc)
+ dh_builddeb -p$(p_l32objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-objc-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-objc-cross.mk
@@ -0,0 +1,60 @@
+arch_binaries := $(arch_binaries) objc
+
+p_objc = gobjc$(pkg_ver)$(cross_bin_arch)
+d_objc = debian/$(p_objc)
+
+dirs_objc = \
+ $(docdir) \
+ $(gcc_lib_dir)
+
+files_objc = \
+ $(gcc_lib_dir)/cc1obj \
+ $(gcc_lib_dir)/include/objc \
+ $(gcc_lib_dir)/{libobjc*.a,libobjc*.la}
+
+$(binary_stamp)-objc: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libobjc*.{a,la} $(d)/$(gcc_lib_dir)/
+
+ rm -rf $(d_objc)
+ dh_installdirs -p$(p_objc) $(dirs_objc)
+ DH_COMPAT=2 dh_movefiles -p$(p_objc) $(files_objc)
+
+ifeq ($(with_lib64objc),yes)
+ mkdir -p $(d_objc)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/libobjc*.{a,la} $(d_objc)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_objc) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/lib64/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libobjc.so
+endif
+ifeq ($(with_lib32objc),yes)
+ mkdir -p $(d_objc)/$(gcc_lib_dir)/$(biarchsubdir)
+ mv $(d)/$(DEB_TARGET_GNU_TYPE)/$(lib32)/libobjc*.{a,la} $(d_objc)/$(gcc_lib_dir)/$(biarchsubdir)/
+ dh_link -p$(p_objc) \
+ /$(lib32)/$(DEB_TARGET_GNU_TYPE)/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarchsubdir)/libobjc.so
+endif
+
+ dh_link -p$(p_objc) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/libobjc.so
+ifeq ($(with_objc_gc),yes)
+ dh_link -p$(p_objc) \
+ /$(PF)/$(DEB_TARGET_GNU_TYPE)/$(libdir)/libobjc_gc.so.$(OBJC_SONAME) \
+ /$(gcc_lib_dir)/libobjc_gc.so
+endif
+
+ debian/dh_doclink -p$(p_objc) $(p_base)
+ debian/dh_rmemptydirs -p$(p_objc)
+
+ dh_strip -p$(p_objc)
+ dh_compress -p$(p_objc)
+
+ dh_fixperms -p$(p_objc)
+ dh_shlibdeps -p$(p_objc)
+ dh_gencontrol -p$(p_objc) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objc)
+ dh_md5sums -p$(p_objc)
+ dh_builddeb -p$(p_objc)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/rules.d/binary-objcxx-cross.mk
+++ gcc-4.1-4.1.2/debian/rules.d/binary-objcxx-cross.mk
@@ -0,0 +1,35 @@
+arch_binaries := $(arch_binaries) objcxx
+
+p_objcx = gobjc++$(pkg_ver)$(cross_bin_arch)
+d_objcx = debian/$(p_objcx)
+
+dirs_objcx = \
+ $(docdir) \
+ $(gcc_lib_dir)
+
+files_objcx = \
+ $(gcc_lib_dir)/cc1objplus
+
+$(binary_stamp)-objcxx: $(install_stamp)
+ dh_testdir
+ dh_testroot
+ mv $(install_stamp) $(install_stamp)-tmp
+
+ rm -rf $(d_objcx)
+ dh_installdirs -p$(p_objcx) $(dirs_objcx)
+ DH_COMPAT=2 dh_movefiles -p$(p_objcx) $(files_objcx)
+
+ debian/dh_doclink -p$(p_objcx) $(p_base)
+ debian/dh_rmemptydirs -p$(p_objcx)
+
+ dh_strip -p$(p_objcx)
+ dh_compress -p$(p_objcx)
+
+ dh_fixperms -p$(p_objcx)
+ dh_shlibdeps -p$(p_objcx)
+ dh_gencontrol -p$(p_objcx) -- -v$(DEB_VERSION) $(common_substvars)
+ dh_installdeb -p$(p_objcx)
+ dh_md5sums -p$(p_objcx)
+ dh_builddeb -p$(p_objcx)
+
+ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp)
--- gcc-4.1-4.1.2.orig/debian/patches/ppc64-ada.dpatch
+++ gcc-4.1-4.1.2/debian/patches/ppc64-ada.dpatch
@@ -0,0 +1,257 @@
+#! /bin/sh -e
+
+# DP: Add gcc/ada/system-linux-ppc64.ads and use it in gcc/ada/Makefile.in
+# DP:
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -urN src.orig/gcc/ada/Makefile.in src/gcc/ada/Makefile.in
+--- src.orig/gcc/ada/Makefile.in 2005-05-02 16:39:32.000000000 +0200
++++ src/gcc/ada/Makefile.in 2005-05-02 16:36:37.000000000 +0200
+@@ -1346,6 +1346,31 @@
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
++ifeq ($(strip $(filter-out powerpc64% linux%,$(arch) $(osys))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads" (Left, Right : Address) return Boolean;
++ function ">=" (Left, Right : Address) return Boolean;
++ function "=" (Left, Right : Address) return Boolean;
++
++ pragma Import (Intrinsic, "<");
++ pragma Import (Intrinsic, "<=");
++ pragma Import (Intrinsic, ">");
++ pragma Import (Intrinsic, ">=");
++ pragma Import (Intrinsic, "=");
++
++ -- Other System-Dependent Declarations
++
++ type Bit_Order is (High_Order_First, Low_Order_First);
++ Default_Bit_Order : constant Bit_Order := High_Order_First;
++
++ -- Priority-related Declarations (RM D.1)
++
++ Max_Priority : constant Positive := 30;
++ Max_Interrupt_Priority : constant Positive := 31;
++
++ subtype Any_Priority is Integer range 0 .. 31;
++ subtype Priority is Any_Priority range 0 .. 30;
++ subtype Interrupt_Priority is Any_Priority range 31 .. 31;
++
++ Default_Priority : constant Priority := 15;
++
++private
++
++ type Address is mod Memory_Size;
++ Null_Address : constant Address := 0;
++
++ --------------------------------------
++ -- System Implementation Parameters --
++ --------------------------------------
++
++ -- These parameters provide information about the target that is used
++ -- by the compiler. They are in the private part of System, where they
++ -- can be accessed using the special circuitry in the Targparm unit
++ -- whose source should be consulted for more detailed descriptions
++ -- of the individual switch values.
++
++ AAMP : constant Boolean := False;
++ Backend_Divide_Checks : constant Boolean := False;
++ Backend_Overflow_Checks : constant Boolean := False;
++ Command_Line_Args : constant Boolean := True;
++ Configurable_Run_Time : constant Boolean := False;
++ Denorm : constant Boolean := True;
++ Duration_32_Bits : constant Boolean := False;
++ Exit_Status_Supported : constant Boolean := True;
++ Fractional_Fixed_Ops : constant Boolean := False;
++ Frontend_Layout : constant Boolean := False;
++ Functions_Return_By_DSP : constant Boolean := False;
++ Machine_Overflows : constant Boolean := False;
++ Machine_Rounds : constant Boolean := True;
++ OpenVMS : constant Boolean := False;
++ Preallocated_Stacks : constant Boolean := False;
++ Signed_Zeros : constant Boolean := True;
++ Stack_Check_Default : constant Boolean := False;
++ Stack_Check_Probes : constant Boolean := False;
++ Support_64_Bit_Divides : constant Boolean := True;
++ Support_Aggregates : constant Boolean := True;
++ Support_Composite_Assign : constant Boolean := True;
++ Support_Composite_Compare : constant Boolean := True;
++ Support_Long_Shifts : constant Boolean := True;
++ Suppress_Standard_Library : constant Boolean := False;
++ Use_Ada_Main_Program_Name : constant Boolean := False;
++ ZCX_By_Default : constant Boolean := True;
++ GCC_ZCX_Support : constant Boolean := True;
++ Front_End_ZCX_Support : constant Boolean := False;
++
++ -- Obsolete entries, to be removed eventually (bootstrap issues!)
++
++ High_Integrity_Mode : constant Boolean := False;
++ Long_Shifts_Inlined : constant Boolean := True;
++
++end System;
+diff -urN tmp/gcc/ada/s-auxdec.ads src/gcc/ada/s-auxdec.ads
+--- tmp/gcc/ada/s-auxdec.ads 2004-06-11 12:47:36.000000000 +0200
++++ src/gcc/ada/s-auxdec.ads 2005-05-03 11:34:17.000000000 +0200
+@@ -108,13 +108,13 @@
+ pragma Warnings (Off);
+
+ type F_Float is digits 6;
+- pragma Float_Representation (VAX_Float, F_Float);
++-- pragma Float_Representation (VAX_Float, F_Float);
+
+ type D_Float is digits 9;
+- pragma Float_Representation (Vax_Float, D_Float);
++-- pragma Float_Representation (Vax_Float, D_Float);
+
+ type G_Float is digits 15;
+- pragma Float_Representation (Vax_Float, G_Float);
++-- pragma Float_Representation (Vax_Float, G_Float);
+
+ -- Floating point type declarations for IEEE floating point data types
+
+--- tmp/gcc/ada/s-vaflop.ads 2003-10-21 15:42:18.000000000 +0200
++++ src/gcc/ada/s-vaflop.ads 2005-05-03 15:24:24.000000000 +0200
+@@ -40,15 +40,15 @@
+ -- Suppress warnings if not on Alpha/VAX
+
+ type D is digits 9;
+- pragma Float_Representation (VAX_Float, D);
++-- pragma Float_Representation (VAX_Float, D);
+ -- D Float type on Vax
+
+ type G is digits 15;
+- pragma Float_Representation (VAX_Float, G);
++-- pragma Float_Representation (VAX_Float, G);
+ -- G Float type on Vax
+
+ type F is digits 6;
+- pragma Float_Representation (VAX_Float, F);
++-- pragma Float_Representation (VAX_Float, F);
+ -- F Float type on Vax
+
+ type S is digits 6;
--- gcc-4.1-4.1.2.orig/debian/patches/gpc-bison-2.2.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gpc-bison-2.2.dpatch
@@ -0,0 +1,153 @@
+#! /bin/sh -e
+
+# DP: Fix build error using bison-2.2
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2006-05-19 Frank Heckenbach
+
+ * gpc.h: correct conditional check for including "parse.h"
+ (recent Bison versions output tokens as enum values, not
+ as #defines anymore)
+
+ * parse.y: move most of the first section of C code below
+ the token declarations, so it doesn't appear in parse.h
+ with Bison 2.2, as it is parser-private stuff which would
+ cause some unused-warnings otherwise; correct "%expect-rr"
+ number as Bison 2.2 gives errors instead of warnings on
+ mismatch
+
+ * utils/mk-t-inc: minor portability fix (some sed versions
+ require ";" before "}")
+
+--- gcc/p/gpc.h.orig Sat May 20 02:09:15 2006
++++ gcc/p/gpc.h Sat May 20 02:12:07 2006
+@@ -887,7 +887,7 @@
+ #define YYLTYPE_IS_DECLARED
+
+ /* parse.c contains the same declarations again */
+-#ifndef LEX_ID
++#ifndef YYTOKENTYPE
+ #include "parse.h"
+ #endif
+
+--- gcc/p/parse.y.orig Fri Mar 24 02:47:15 2006
++++ gcc/p/parse.y Sat May 20 02:37:44 2006
+@@ -66,38 +66,6 @@
+ #ifdef GCC_4_0
+ #include "cgraph.h"
+ #endif
+-
+-/* A few keywords of some dialects can be parsed as regular identifiers
+- and checked from the parser actions => fewer special tokens. */
+-#define ASSERT_ID(id, location, pseudo_keyword) \
+- do if (!IDENTIFIER_IS_BUILT_IN (id, pseudo_keyword) || !PD_ACTIVE (IDENTIFIER_BUILT_IN_VALUE (id))) \
+- { yyerror_id (id, &location); YYERROR; } while (0)
+-
+-enum { od_none, od_uses, od_label, od_const, od_type, od_var, od_routine };
+-static int check_decl_order (int, int);
+-
+-extern int main_yyparse (void);
+-#define yyparse main_yyparse
+-
+-union yyGLRStackItem;
+-static void locations (YYLTYPE *, const union yyGLRStackItem *, int);
+-#define YYLLOC_DEFAULT(DEST, SRC, N) locations (&DEST, SRC, N)
+-#ifndef GCC_3_4
+-#define LOCATION_NOTE(LOC) if (current_function_decl) emit_line_note ((LOC).first_file, (LOC).first_line)
+-#else
+-#define LOCATION_NOTE(LOC) if (current_function_decl) \
+- { \
+- location_t loc_aux; \
+- loc_aux.file = (LOC).first_file; \
+- loc_aux.line = (LOC).first_line; \
+- emit_line_note (loc_aux); \
+- }
+-#endif
+-#define COPYLOC(D, S) /* @@ ? (* (YYLTYPE *) memcpy (&(D), &(S), sizeof (YYLTYPE))) */ (S)
+-
+-#define YYASSERT gcc_assert
+-#define YYMALLOC (void *) xmalloc
+-#define YYREALLOC (void *) xrealloc
+ %}
+
+ %debug
+@@ -106,7 +74,7 @@
+ %glr-parser
+ %no-default-prec
+ %expect 62
+-%expect-rr 24
++%expect-rr 25
+
+ /* The semantic values */
+ %union {
+@@ -206,6 +174,40 @@
+ array_index_list remote_directive operator_symbol string_constant variant_list
+ rest_of_variant new_pointer_type conformant_array enumerated_type id_list1 err
+ optional_rename attrib id_list id optional_formal_parameter_list0
++
++%{
++/* A few keywords of some dialects can be parsed as regular identifiers
++ and checked from the parser actions => fewer special tokens. */
++#define ASSERT_ID(id, location, pseudo_keyword) \
++ do if (!IDENTIFIER_IS_BUILT_IN (id, pseudo_keyword) || !PD_ACTIVE (IDENTIFIER_BUILT_IN_VALUE (id))) \
++ { yyerror_id (id, &location); YYERROR; } while (0)
++
++enum { od_none, od_uses, od_label, od_const, od_type, od_var, od_routine };
++static int check_decl_order (int, int);
++
++extern int main_yyparse (void);
++#define yyparse main_yyparse
++
++union yyGLRStackItem;
++static void locations (YYLTYPE *, const union yyGLRStackItem *, int);
++#define YYLLOC_DEFAULT(DEST, SRC, N) locations (&DEST, SRC, N)
++#ifndef GCC_3_4
++#define LOCATION_NOTE(LOC) if (current_function_decl) emit_line_note ((LOC).first_file, (LOC).first_line)
++#else
++#define LOCATION_NOTE(LOC) if (current_function_decl) \
++ { \
++ location_t loc_aux; \
++ loc_aux.file = (LOC).first_file; \
++ loc_aux.line = (LOC).first_line; \
++ emit_line_note (loc_aux); \
++ }
++#endif
++#define COPYLOC(D, S) /* @@ ? (* (YYLTYPE *) memcpy (&(D), &(S), sizeof (YYLTYPE))) */ (S)
++
++#define YYASSERT gcc_assert
++#define YYMALLOC (void *) xmalloc
++#define YYREALLOC (void *) xrealloc
++%}
+
+ %%
+
+--- gcc/p/utils/mk-t-inc.orig Sat May 20 02:48:14 2006
++++ gcc/p/utils/mk-t-inc Sat May 20 02:48:16 2006
+@@ -71,6 +71,6 @@
+ {
+ cat "$GCCDIR/tree.def"
+ echo 'DEFTREECODE (LAST_AND_UNUSED_C_TREE_CODE, "unused", '"'x', 0)"
+- sed -e '/#ifdef EGCS/,${/#ifdef EGCS/d;/#else/,/#endif/d}' "$GCCDIR/p/p-tree.def"
++ sed -e '/#ifdef EGCS/,${/#ifdef EGCS/d;/#else/,/#endif/d;}' "$GCCDIR/p/p-tree.def"
+ } | sed -ne ':loop;/\\$/{N;b loop};/^DEFTREECODE/{s,/\*.*\*/,,;s/["'"'"']x["'"'"'].*/'"'x', 0)/;p;};/^#/p"
+ } > "$2" || { rm -f "$2"; false; }
--- gcc-4.1-4.1.2.orig/debian/patches/link-libs.dpatch
+++ gcc-4.1-4.1.2/debian/patches/link-libs.dpatch
@@ -0,0 +1,157 @@
+#! /bin/sh -e
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/config/t-slibgcc-elf-ver.orig 2005-09-05 00:10:57.095357312 +0000
++++ gcc/config/t-slibgcc-elf-ver 2005-09-05 00:11:37.932149176 +0000
+@@ -14,6 +14,7 @@
+ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
+ -Wl,--soname=$(SHLIB_SONAME) \
+ -Wl,--version-script=$(SHLIB_MAP) \
++ -Wl,-O1 \
+ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+ $(SHLIB_OBJS) $(SHLIB_LC) && \
+ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+--- libobjc/Makefile.in.orig 2005-09-05 00:10:57.091357920 +0000
++++ libobjc/Makefile.in 2005-09-05 00:15:00.266389696 +0000
+@@ -273,11 +273,13 @@
+ libobjc$(libext).la: $(OBJS)
+ $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS) \
+ -rpath $(toolexeclibdir) \
++ -Wl,-O1 \
+ -version-info $(LIBOBJC_VERSION) $(extra_ldflags_libobjc)
+
+ libobjc_gc$(libext).la: $(OBJS_GC)
+ $(LIBTOOL_LINK) $(CC) -o $@ $(OBJS_GC) \
+ -rpath $(toolexeclibdir) \
++ -Wl,-O1 \
+ -version-info $(LIBOBJC_GC_VERSION) $(extra_ldflags_libobjc)
+
+ #
+--- libffi/Makefile.am.orig 2005-09-05 00:10:57.077360048 +0000
++++ libffi/Makefile.am 2005-09-05 00:11:37.877157536 +0000
+@@ -150,7 +150,7 @@
+
+ AM_CFLAGS = -Wall -g -fexceptions
+
+-libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
++libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
+
+ AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+--- libffi/Makefile.in.orig 2005-09-05 00:10:57.095357312 +0000
++++ libffi/Makefile.in 2005-09-05 00:11:37.932149176 +0000
+@@ -416,7 +416,7 @@
+ libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
+ nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
+ AM_CFLAGS = -Wall -g -fexceptions
+-libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
++libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
+ AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+ all: fficonfig.h
+--- libgfortran/Makefile.am.orig 2005-08-11 18:01:02.000000000 +0000
++++ libgfortran/Makefile.am 2005-09-05 00:17:34.659918312 +0000
+@@ -8,7 +8,7 @@
+
+ toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
+
+-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
++libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran) -Wl,-O1
+
+ ## This should really go in the compiler lib dir, not the system lib dir.
+ libgfortranbegin_la_SOURCES = fmain.c
+--- libgfortran/Makefile.in.orig 2005-09-03 09:44:48.000000000 +0000
++++ libgfortran/Makefile.in 2005-09-05 00:18:05.382247808 +0000
+@@ -309,7 +309,7 @@
+ ACLOCAL_AMFLAGS = -I ../config
+ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+ toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
+-libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran)
++libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lm $(extra_ldflags_libgfortran) -Wl,-O1
+ libgfortranbegin_la_SOURCES = fmain.c
+ libgfortranbegin_la_LDFLAGS = -static
+ AM_CPPFLAGS = -iquote$(srcdir)/io
+--- libjava/Makefile.am.orig 2005-09-05 00:10:57.078359896 +0000
++++ libjava/Makefile.am 2005-09-05 00:13:11.509923192 +0000
+@@ -96,7 +96,7 @@
+ GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \
+ $(LDFLAGS) -o $@
+ LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
+- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
++ $(LDFLAGS) $(extra_ldflags_libjava) -Wl,-O1 -o $@
+
+ GCC_UNWIND_INCLUDE = @GCC_UNWIND_INCLUDE@
+
+--- libjava/Makefile.in.orig 2005-09-05 00:10:57.089358224 +0000
++++ libjava/Makefile.in 2005-09-05 00:13:57.763891520 +0000
+@@ -647,7 +647,7 @@
+ $(LDFLAGS) -o $@
+
+ LIBLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXX) -L$(here) $(JC1FLAGS) \
+- $(LDFLAGS) $(extra_ldflags_libjava) -o $@
++ $(LDFLAGS) $(extra_ldflags_libjava) -Wl,-O1 -o $@
+
+ WARNINGS = -Wextra -Wall
+ AM_CXXFLAGS = \
+--- libmudflap/Makefile.am.orig 2005-06-15 00:47:03.000000000 +0000
++++ libmudflap/Makefile.am 2005-09-05 00:19:21.098737152 +0000
+@@ -32,7 +32,7 @@
+ mf-hooks2.c
+ libmudflap_la_LIBADD =
+ libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
+-libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
++libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
+
+ clean-local:
+ rm -f pth/*.o pth/*.lo
+--- libmudflap/Makefile.in.orig 2005-07-17 20:52:57.000000000 +0000
++++ libmudflap/Makefile.in 2005-09-05 00:19:42.890424312 +0000
+@@ -238,7 +238,7 @@
+
+ libmudflap_la_LIBADD =
+ libmudflap_la_DEPENDENCIES = $(libmudflap_la_LIBADD)
+-libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
++libmudflap_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -Wl,-O1
+ libmudflapth_la_SOURCES =
+ libmudflapth_la_LIBADD = \
+ pth/mf-runtime.lo \
+--- libstdc++-v3/src/Makefile.am.orig 2005-09-05 00:10:57.091357920 +0000
++++ libstdc++-v3/src/Makefile.am 2005-09-05 00:11:37.931149328 +0000
+@@ -167,6 +167,7 @@
+ libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
+
+ libstdc___la_LDFLAGS = \
++ -Wl,-O1 \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
+
+--- libstdc++-v3/src/Makefile.in.orig 2005-09-05 00:10:57.094357464 +0000
++++ libstdc++-v3/src/Makefile.in 2005-09-05 00:11:37.931149328 +0000
+@@ -360,6 +360,7 @@
+
+ libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
+ libstdc___la_LDFLAGS = \
++ -Wl,-O1 \
+ -version-info $(libtool_VERSION) ${version_arg} -lm
+
+
--- gcc-4.1-4.1.2.orig/debian/patches/pr26864.dpatch
+++ gcc-4.1-4.1.2/debian/patches/pr26864.dpatch
@@ -0,0 +1,59 @@
+#! /bin/sh -e
+
+# DP: Backport fix for PR libmudflap/26864 from the trunk.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2006-04-22 Frank Ch. Eigler
+
+ PR libmudflap/26864
+ * common.opt (flag_mudflap_threads): Overload flag_mudflap.
+ * tree-mudflap.c (flag_mudflap_threads): Derive from flag_mudflap.
+
+Index: gcc/tree-mudflap.c
+===================================================================
+--- gcc/tree-mudflap.c (revision 113178)
++++ gcc/tree-mudflap.c (revision 113179)
+@@ -48,6 +48,10 @@
+
+ /* Internal function decls */
+
++
++/* Options. */
++#define flag_mudflap_threads (flag_mudflap == 2)
++
+ /* Helpers. */
+ static tree mf_build_string (const char *string);
+ static tree mf_varname_tree (tree);
+Index: gcc/common.opt
+===================================================================
+--- gcc/common.opt (revision 113178)
++++ gcc/common.opt (revision 113179)
+@@ -605,7 +605,7 @@
+ Add mudflap bounds-checking instrumentation for single-threaded program
+
+ fmudflapth
+-Common RejectNegative Report Var(flag_mudflap_threads)
++Common RejectNegative Report VarExists Var(flag_mudflap,2)
+ Add mudflap bounds-checking instrumentation for multi-threaded program
+
+ fmudflapir
--- gcc-4.1-4.1.2.orig/debian/patches/multiarch-lib.dpatch
+++ gcc-4.1-4.1.2/debian/patches/multiarch-lib.dpatch
@@ -0,0 +1,52 @@
+#! /bin/sh -e
+
+# multiarch-lib.dpatch by Stephen Frost
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -urN gcc.old/config/i386/t-linux64 gcc/config/i386/t-linux64
+--- gcc.old/config/i386/t-linux64 2002-11-28 15:47:02.000000000 +0100
++++ gcc/config/i386/t-linux64 2004-07-10 07:28:01.000000000 +0200
+@@ -6,7 +6,7 @@
+
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_OSDIRNAMES = x86_64-linux i486-linux
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
+diff -urN gcc.old/config/t-linux gcc/config/t-linux
+--- gcc.old/config/t-linux 2004-05-04 18:09:38.000000000 +0200
++++ gcc/config/t-linux 2004-07-10 07:28:01.000000000 +0200
+@@ -11,3 +11,11 @@
+ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
+ $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
+ LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
++
++MULTILIB_OPTIONS = m32
++MULTILIB_DIRNAMES = 32
++MULTILIB_OSDIRNAMES = $TARGET_ARCH
++
++LIBGCC = stmp-multilib
++INSTALL_LIBGCC = install-multilib
++
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-biarch-generic.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-biarch-generic.dpatch
@@ -0,0 +1,56 @@
+#! /bin/sh -e
+
+# DP: gcc/config/i386/biarch.h: Remove DRIVER_SELF_SPECS macro.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+
+--- gcc/config/i386/biarch.h~ 2006-07-19 11:59:43.897556736 +0200
++++ gcc/config/i386/biarch.h 2006-07-20 11:36:48.735816608 +0200
+@@ -23,4 +23,3 @@
+
+ #define TARGET_64BIT_DEFAULT 0
+ #define TARGET_BI_ARCH 1
+-#define DRIVER_SELF_SPECS "%{m64:%{!mtune:-mtune=x86-64}}"
+--- gcc/config.gcc.m64 2006-07-20 08:59:01.000000000 -0700
++++ gcc/config.gcc 2006-07-20 12:25:20.000000000 -0700
+@@ -1054,6 +1054,20 @@ i[34567]86-*-linux* | i[34567]86-*-kfree
+ #tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtfm"
+ tmake_file="${tmake_file} i386/t-crtfm i386/t-linux64"
+ need_64bit_hwint=yes
++ # FIXME: -m64 for i[34567]86-*-* should be allowed just
++ # like -m32 for x86_64-*-*.
++ case X"${with_cpu}" in
++ Xgeneric|Xnocona|Xx86-64|Xk8|Xopteron|Xathlon64|Xathlon-fx)
++ ;;
++ X)
++ with_cpu=generic
++ ;;
++ *)
++ echo "Unsupported CPU used in --with-cpu=$with_cpu, supported values:" 1>&2
++ echo "generic nocona x86-64 k8 opteron athlon64 athlon-fx" 1>&2
++ exit 1
++ ;;
++ esac
+ ;;
+ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h linux.h \
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-hash-style-gnu.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-hash-style-gnu.dpatch
@@ -0,0 +1,176 @@
+#! /bin/sh -e
+
+# DP: Link using --hash-style=gnu (alpha, amd64, ia64, i386, powerpc, ppc64, s390, sparc)
+# Link using --hash-style=both on hppa (untested)
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2006-07-11 Jakub Jelinek
+
+ * config/i386/linux.h (LINK_SPEC): Add --hash-style=gnu.
+ * config/i386/linux64.h (LINK_SPEC): Likewise.
+ * config/rs6000/sysv4.h (LINK_OS_LINUX_SPEC): Likewise.
+ * config/rs6000/linux64.h (LINK_OS_LINUX_SPEC32,
+ LINK_OS_LINUX_SPEC64): Likewise.
+ * config/s390/linux.h (LINK_SPEC): Likewise.
+ * config/ia64/linux.h (LINK_SPEC): Likewise.
+ * config/sparc/linux.h (LINK_SPEC): Likewise.
+ * config/sparc/linux64.h (LINK_SPEC, LINK_ARCH32_SPEC,
+ LINK_ARCH64_SPEC): Likewise.
+ * config/alpha/linux-elf.h (LINK_SPEC): Likewise.
+
+
+--- gcc/config/rs6000/sysv4.h.jj 2006-07-11 10:54:00.000000000 +0200
++++ gcc/config/rs6000/sysv4.h 2006-07-11 12:51:39.000000000 +0200
+@@ -1039,7 +1039,7 @@ extern int fixuplabelno;
+
+ #define LINK_START_LINUX_SPEC ""
+
+-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+
+--- gcc/config/rs6000/linux64.h.jj 2006-07-11 10:54:00.000000000 +0200
++++ gcc/config/rs6000/linux64.h 2006-07-11 12:52:14.000000000 +0200
+@@ -337,11 +337,11 @@ extern int dot_symbols;
+ #undef LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+
+-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=gnu %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+
+-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
++#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=gnu %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
+
+--- gcc/config/alpha/linux-elf.h.jj 2006-07-11 10:54:01.000000000 +0200
++++ gcc/config/alpha/linux-elf.h 2006-07-11 12:53:48.000000000 +0200
+@@ -29,7 +29,7 @@ Boston, MA 02110-1301, USA. */
+
+ #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+
+-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
++#define LINK_SPEC "-m elf64alpha --hash-style=gnu %{G*} %{relax:-relax} \
+ %{O*:-O3} %{!O*:-O1} \
+ %{shared:-shared} \
+ %{!shared: \
+--- gcc/config/s390/linux.h.jj 2006-07-11 10:54:02.000000000 +0200
++++ gcc/config/s390/linux.h 2006-07-11 12:52:39.000000000 +0200
+@@ -79,7 +79,7 @@ Software Foundation, 51 Franklin Street,
+
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=gnu \
+ %{shared:-shared} \
+ %{!shared: \
+ %{static:-static} \
+--- gcc/config/sparc/linux.h.jj 2006-07-11 10:54:03.000000000 +0200
++++ gcc/config/sparc/linux.h 2006-07-11 12:54:16.000000000 +0200
+@@ -127,7 +127,7 @@ Boston, MA 02110-1301, USA. */
+ /* If ELF is the default format, we should not use /lib/elf. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
+ %{!mno-relax:%{!r:-relax}} \
+ %{!shared: \
+ %{!ibcs: \
+--- gcc/config/sparc/linux64.h.jj 2006-07-11 10:54:03.000000000 +0200
++++ gcc/config/sparc/linux64.h 2006-07-11 12:55:10.000000000 +0200
+@@ -157,7 +157,7 @@ Boston, MA 02110-1301, USA. */
+ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
+ { "link_arch", LINK_ARCH_SPEC },
+
+-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
++#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=gnu -Y P,/usr/lib %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+@@ -166,7 +166,7 @@ Boston, MA 02110-1301, USA. */
+ %{static:-static}}} \
+ "
+
+-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+@@ -247,7 +247,7 @@ Boston, MA 02110-1301, USA. */
+ #else /* !SPARC_BI_ARCH */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m elf64_sparc -Y P,/usr/lib64 %{shared:-shared} \
++#define LINK_SPEC "-m elf64_sparc --hash-style=gnu -Y P,/usr/lib64 %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+--- gcc/config/i386/linux.h.jj 2006-07-11 10:54:05.000000000 +0200
++++ gcc/config/i386/linux.h 2006-07-11 12:44:45.000000000 +0200
+@@ -113,7 +113,7 @@ Boston, MA 02110-1301, USA. */
+ { "dynamic_linker", DYNAMIC_LINKER }
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
++#define LINK_SPEC "-m %(link_emulation) --hash-style=gnu %{shared:-shared} \
+ %{!shared: \
+ %{!ibcs: \
+ %{!static: \
+--- gcc/config/i386/linux64.h.jj 2006-07-11 10:54:04.000000000 +0200
++++ gcc/config/i386/linux64.h 2006-07-11 12:45:02.000000000 +0200
+@@ -55,7 +55,7 @@ Boston, MA 02110-1301, USA. */
+ done. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
++#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} --hash-style=gnu \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+--- gcc/config/ia64/linux.h.jj 2006-07-11 10:54:06.000000000 +0200
++++ gcc/config/ia64/linux.h 2006-07-11 12:48:19.000000000 +0200
+@@ -40,7 +40,7 @@ do { \
+ linux.h file. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "\
++#define LINK_SPEC "--hash-style=gnu \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
+--- gcc/config/pa/pa-linux.h~ 2007-01-12 03:23:38.000000000 +0100
++++ gcc/config/pa/pa-linux.h 2007-04-18 11:28:41.000000000 +0200
+@@ -50,7 +50,7 @@
+ linux.h file. */
+
+ #undef LINK_SPEC
+-#define LINK_SPEC "\
++#define LINK_SPEC "--hash-style=both \
+ %{shared:-shared} \
+ %{!shared: \
+ %{!static: \
--- gcc-4.1-4.1.2.orig/debian/patches/libjava-jnipath.dpatch
+++ gcc-4.1-4.1.2/debian/patches/libjava-jnipath.dpatch
@@ -0,0 +1,94 @@
+#! /bin/sh -e
+
+# DP: - Add /usr/lib/jni to java.library.path.
+# DP: - When running the i386 binaries on amd64, look in
+# DP: - /usr/lib32/gcj-x.y and /usr/lib32/jni instead.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- libjava/gnu/classpath/natSystemProperties.cc~ 2006-08-02 00:53:40.000000000 +0200
++++ libjava/gnu/classpath/natSystemProperties.cc 2006-08-19 00:41:50.063803000 +0200
+@@ -141,6 +141,34 @@
+ return retval;
+ }
+
++static char*
++AppendJniLibdir (char *path, struct utsname *u)
++{
++ char* retval;
++ const char* jnilibdir = "/usr/lib/jni";
++
++#if defined(__linux__) && defined (__i386__)
++ if (! strcmp ("x86_64", u->machine))
++ jnilibdir = "/usr/lib32/jni";
++#endif
++
++ if (path)
++ {
++ jsize total = strlen (path)
++ + (sizeof (PATH_SEPARATOR) - 1) + strlen (jnilibdir) + 1;
++ retval = (char*) _Jv_Malloc (total);
++ strcpy (retval, path);
++ strcat (retval, PATH_SEPARATOR);
++ strcat (retval, jnilibdir);
++ }
++ else
++ {
++ retval = (char*) _Jv_Malloc (strlen (jnilibdir) + 1);
++ strcpy (retval, jnilibdir);
++ }
++ return retval;
++}
++
+ void
+ gnu::classpath::SystemProperties::insertSystemProperties (java::util::Properties *newprops)
+ {
+@@ -370,8 +398,13 @@
+ // Prepend GCJ_VERSIONED_LIBDIR to the module load path so that
+ // libgcj will find its own JNI libraries, like libgtkpeer.so.
+ char* val = PrependVersionedLibdir (path);
+- _Jv_SetDLLSearchPath (val);
++
++ // Append jnilibdir
++ char* val2 = AppendJniLibdir (val, &u);
++
++ _Jv_SetDLLSearchPath (val2);
+ _Jv_Free (val);
++ _Jv_Free (val2);
+ }
+ else
+ {
+@@ -379,9 +412,12 @@
+ #ifdef USE_LTDL
+ char *libpath = getenv (LTDL_SHLIBPATH_VAR);
+ char* val = _Jv_PrependVersionedLibdir (libpath);
+- SET ("java.library.path", val);
+- _Jv_SetDLLSearchPath (val);
++ // Append jnilibdir
++ char* val2 = AppendJniLibdir (val, &u);
++ SET ("java.library.path", val2);
++ _Jv_SetDLLSearchPath (val2);
+ _Jv_Free (val);
++ _Jv_Free (val2);
+ #else
+ SET ("java.library.path", "");
+ #endif
--- gcc-4.1-4.1.2.orig/debian/patches/cross-fixes.dpatch
+++ gcc-4.1-4.1.2/debian/patches/cross-fixes.dpatch
@@ -0,0 +1,146 @@
+#! /bin/sh -e
+
+# DP: Fix the linker error when creating an xcc for ia64
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ cd ${dir}gcc && autoconf
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c
+--- gcc-4.0.0.orig/gcc/config/ia64/fde-glibc.c 2003-11-02 18:35:20.000000000 +0100
++++ gcc-4.0.0.new/gcc/config/ia64/fde-glibc.c 2005-05-15 02:42:27.675247674 +0200
+@@ -31,6 +31,7 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE 1
+ #endif
++#ifndef inhibit_libc
+ #include "config.h"
+ #include
+ #include
+@@ -162,3 +163,5 @@ _Unwind_FindTableEntry (void *pc, unsign
+
+ return data.ret;
+ }
++
++#endif
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c
+--- gcc-4.0.0.orig/gcc/config/ia64/unwind-ia64.c 2005-04-06 05:50:36.000000000 +0200
++++ gcc-4.0.0.new/gcc/config/ia64/unwind-ia64.c 2005-05-15 02:43:10.842199954 +0200
+@@ -30,7 +30,7 @@
+ This exception does not however invalidate any other reasons why
+ the executable file might be covered by the GNU General Public License. */
+
+-
++#ifndef inhibit_libc
+ #include "tconfig.h"
+ #include "tsystem.h"
+ #include "coretypes.h"
+@@ -2404,3 +2404,4 @@ alias (_Unwind_SetIP);
+ #endif
+
+ #endif
++#endif
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/pa/linux-unwind.h gcc-4.0.0.new/gcc/config/pa/linux-unwind.h
+--- gcc-4.0.0.orig/gcc/config/pa/linux-unwind.h 2005-02-11 02:46:20.000000000 +0100
++++ gcc-4.0.0.new/gcc/config/pa/linux-unwind.h 2005-05-15 02:37:02.000000000 +0200
+@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
+ /* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
++#ifndef inhibit_libc
+ #include
+ #include
+
+@@ -136,3 +137,5 @@ pa32_fallback_frame_state (struct _Unwin
+ fs->retaddr_column = DWARF_ALT_FRAME_RETURN_COLUMN;
+ return _URC_NO_REASON;
+ }
++
++#endif
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h gcc-4.0.0.new/gcc/config/sh/linux-unwind.h
+--- gcc-4.0.0.orig/gcc/config/sh/linux-unwind.h 2005-02-11 02:12:57.000000000 +0100
++++ gcc-4.0.0.new/gcc/config/sh/linux-unwind.h 2005-05-15 02:44:31.000000000 +0200
+@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
+ /* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
++#ifndef inhibit_libc
+ #include
+ #include
+ #include "insn-constants.h"
+@@ -169,3 +170,4 @@ sh_fallback_frame_state (struct _Unwind_
+ return _URC_NO_REASON;
+ }
+ #endif /* defined (__SH5__) */
++#endif
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-compat.c gcc-4.0.0.new/gcc/unwind-compat.c
+--- gcc-4.0.0.orig/gcc/unwind-compat.c 2004-09-04 02:15:40.000000000 +0200
++++ gcc-4.0.0.new/gcc/unwind-compat.c 2005-05-15 02:41:17.000000000 +0200
+@@ -29,6 +29,7 @@
+ 02110-1301, USA. */
+
+ #if defined (USE_GAS_SYMVER) && defined (USE_LIBUNWIND_EXCEPTIONS)
++#ifndef inhibit_libc
+ #include "tconfig.h"
+ #include "tsystem.h"
+ #include "unwind.h"
+@@ -204,3 +205,4 @@ _Unwind_SetIP (struct _Unwind_Context *c
+ }
+ symver (_Unwind_SetIP, GCC_3.0);
+ #endif
++#endif
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.orig/gcc/unwind-generic.h gcc-4.0.0.new/gcc/unwind-generic.h
+--- gcc-4.0.0.orig/gcc/unwind-generic.h 2004-11-30 09:15:39.000000000 +0100
++++ gcc-4.0.0.new/gcc/unwind-generic.h 2005-05-15 02:38:33.000000000 +0200
+@@ -202,6 +202,7 @@ extern _Unwind_Reason_Code _Unwind_SjLj_
+ compatible with the standard ABI for IA-64, we inline these. */
+
+ #ifdef __ia64__
++#ifndef inhibit_libc
+ #include
+
+ static inline _Unwind_Ptr
+@@ -220,6 +221,7 @@ _Unwind_GetTextRelBase (struct _Unwind_C
+
+ /* @@@ Retrieve the Backing Store Pointer of the given context. */
+ extern _Unwind_Word _Unwind_GetBSP (struct _Unwind_Context *);
++#endif
+ #else
+ extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
+ extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
+diff -NurpP -x '*.orig' -x '*.libc' gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h
+--- gcc-4.0.0.new/gcc/config/alpha/linux-unwind.h 2005-02-11 02:12:54.000000000 +0100
++++ gcc-4.0.0.new2/gcc/config/alpha/linux-unwind.h 2005-05-15 05:09:16.000000000 +0200
+@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
+ /* Do code reading to identify a signal frame, and set the frame
+ state data appropriately. See unwind-dw2.c for the structs. */
+
++#ifndef inhibit_libc
+ #include
+ #include
+
+@@ -80,3 +81,5 @@ alpha_fallback_frame_state (struct _Unwi
+ fs->retaddr_column = 64;
+ return _URC_NO_REASON;
+ }
++
++#endif
--- gcc-4.1-4.1.2.orig/debian/patches/autoreconf.dpatch
+++ gcc-4.1-4.1.2/debian/patches/autoreconf.dpatch
@@ -0,0 +1,26 @@
+#! /bin/sh -e
+
+# DP: autoreconf several directories for proper mipsen libtool support
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ for i in libstdc++-v3 zlib; do
+ (cd ${dir}/${i} ; autoreconf --force)
+ done
+ ;;
+ -unpatch)
+ echo unable to unpatch autoreconf.
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-textdomain.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-textdomain.dpatch
@@ -0,0 +1,103 @@
+#! /bin/sh -e
+
+# DP: Set gettext's domain and textdomain to the versioned package name.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+
+--- gcc/Makefile.in.orig 2005-09-04 23:32:54.003440040 +0000
++++ gcc/Makefile.in 2005-09-04 23:40:10.954013456 +0000
+@@ -4565,8 +4565,8 @@
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ echo $(mkinstalldirs) $(DESTDIR)$$dir; \
+ $(mkinstalldirs) $(DESTDIR)$$dir || exit 1; \
+- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
+- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc.mo; \
++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.1.mo; \
++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/gcc-4.1.mo; \
+ done
+
+ # Rule for regenerating the message template (gcc.pot).
+--- gcc/intl.c.orig 2005-09-04 23:32:54.006439584 +0000
++++ gcc/intl.c 2005-09-04 23:36:37.933397512 +0000
+@@ -51,8 +51,8 @@
+ setlocale (LC_ALL, "");
+ #endif
+
+- (void) bindtextdomain ("gcc", LOCALEDIR);
+- (void) textdomain ("gcc");
++ (void) bindtextdomain ("gcc-4.1", LOCALEDIR);
++ (void) textdomain ("gcc-4.1");
+
+ /* Opening quotation mark. */
+ open_quote = _("`");
+--- libcpp/Makefile.in.orig 2005-09-04 23:32:54.009439128 +0000
++++ libcpp/Makefile.in 2005-09-04 23:33:24.607787472 +0000
+@@ -47,6 +47,7 @@
+ LIBICONV = @LIBICONV@
+ LIBINTL = @LIBINTL@
+ PACKAGE = @PACKAGE@
++PACKAGE_SUFFIX = -4.1
+ RANLIB = @RANLIB@
+ SHELL = @SHELL@
+ USED_CATALOGS = @USED_CATALOGS@
+@@ -66,6 +67,7 @@
+
+ INCLUDES = -I$(srcdir) -I. -I$(srcdir)/../include @INCINTL@ \
+ -I$(srcdir)/include
++CPPFLAGS += -DPACKAGE_SUFFIX=\"$(strip $(PACKAGE_SUFFIX))\"
+
+ ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS)
+
+@@ -156,8 +158,8 @@
+ else continue; \
+ fi; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+- echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
+- $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
++ echo $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
++ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(PACKAGE_SUFFIX).mo; \
+ done
+
+ mostlyclean:
+--- libcpp/system.h.orig 2005-09-04 23:32:54.006439584 +0000
++++ libcpp/system.h 2005-09-04 23:33:24.606787624 +0000
+@@ -260,7 +260,7 @@
+ #endif
+
+ #ifndef _
+-# define _(msgid) dgettext (PACKAGE, msgid)
++# define _(msgid) dgettext (PACKAGE PACKAGE_SUFFIX, msgid)
+ #endif
+
+ #ifndef N_
+--- libcpp/init.c.orig 2005-09-04 23:32:54.008439280 +0000
++++ libcpp/init.c 2005-09-04 23:33:24.607787472 +0000
+@@ -122,7 +122,7 @@
+ init_trigraph_map ();
+
+ #ifdef ENABLE_NLS
+- (void) bindtextdomain (PACKAGE, LOCALEDIR);
++ (void) bindtextdomain (PACKAGE PACKAGE_SUFFIX, LOCALEDIR);
+ #endif
+ }
+ }
--- gcc-4.1-4.1.2.orig/debian/patches/hppa-cbranch2.dpatch
+++ gcc-4.1-4.1.2/debian/patches/hppa-cbranch2.dpatch
@@ -0,0 +1,626 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DPATCH:' are a description of the patch.
+# DP: Fix for PR target/26743 (hppa)
+# DP: Backport from gcc trunk 2006-04-12 by tausq@debian.org
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+From: "John David Anglin"
+Sender: gcc-patches-owner@gcc.gnu.org
+To: gcc-patches@gcc.gnu.org
+Subject: [committed] Define symbolic constants for maximum branch offsets in pa.md
+Date: Tue, 11 Apr 2006 14:34:18 -0400 (EDT)
+
+The enclosed change is to facilitate changing the maximum branch
+offsets. There should be no change in functionality.
+
+Tested on hppa-unknown-linux-gnu. Applied to trunk.
+
+Dave
+
+2006-04-11 John David Anglin
+
+ * pa.md (MAX_12BIT_OFFSET, MAX_17BIT_OFFSET): Define and use new
+ symbolic constants in branch patterns.
+
+--- gcc/config/pa/pa.md.orig 2006-04-19 11:33:06.396048656 +0200
++++ gcc/config/pa/pa.md 2006-04-19 11:35:52.790752816 +0200
+@@ -1,6 +1,6 @@
+ ;;- Machine description for HP PA-RISC architecture for GCC compiler
+ ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+-;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++;; 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ ;; Contributed by the Center for Software Science at the University
+ ;; of Utah.
+
+@@ -52,6 +52,16 @@
+ (UNSPECV_LONGJMP 5) ; builtin_longjmp
+ ])
+
++;; Maximum pc-relative branch offsets.
++
++;; These numbers are a bit smaller than the maximum allowable offsets
++;; so that a few instructions may be inserted before the actual branch.
++
++(define_constants
++ [(MAX_12BIT_OFFSET 8184) ; 12-bit branch
++ (MAX_17BIT_OFFSET 262100) ; 17-bit branch
++ ])
++
+ ;; Insn type. Used to default other attribute values.
+
+ ;; type "unary" insns have one input operand (1) and one output operand (0)
+@@ -1713,10 +1723,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1742,10 +1752,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1769,10 +1779,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1798,10 +1808,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1824,10 +1834,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1853,10 +1863,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -1882,10 +1892,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -1910,10 +1920,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -1938,10 +1948,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -1966,10 +1976,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -1994,10 +2004,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2022,10 +2032,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2050,10 +2060,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2078,10 +2088,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2107,10 +2117,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2135,10 +2145,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2163,10 +2173,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2191,10 +2201,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2219,10 +2229,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2247,10 +2257,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2275,10 +2285,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2303,10 +2313,10 @@
+ [(set_attr "type" "cbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -2355,7 +2365,7 @@
+ [(set_attr "type" "fbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -2399,7 +2409,7 @@
+ [(set_attr "type" "fbranch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 12)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -7142,11 +7152,11 @@
+ (cond [(eq (symbol_ref "jump_in_call_delay (insn)") (const_int 1))
+ (if_then_else (lt (abs (minus (match_dup 0)
+ (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (const_int 8))
+ (lt (abs (minus (match_dup 0) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 4)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 20)
+@@ -8968,10 +8978,10 @@
+ ;; Short branch has length of 4
+ ;; Long branch has length of 8, 20, 24 or 28
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -8984,10 +8994,10 @@
+ (if_then_else (eq_attr "alternative" "1")
+ (if_then_else (lt (match_dup 3) (pc))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 24))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 24)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 24))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 28)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 44)
+@@ -8995,10 +9005,10 @@
+ (const_int 40)]
+ (const_int 48))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 24)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 28)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 44)
+@@ -9010,10 +9020,10 @@
+ ;; Extra goo to deal with additional reload insns.
+ (if_then_else (lt (match_dup 3) (pc))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9021,10 +9031,10 @@
+ (const_int 28)]
+ (const_int 36))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9051,10 +9061,10 @@
+ ;; Short branch has length of 4
+ ;; Long branch has length of 8, 20, 24 or 28
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9067,10 +9077,10 @@
+ (if_then_else (eq_attr "alternative" "1")
+ (if_then_else (lt (match_dup 3) (pc))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9078,10 +9088,10 @@
+ (const_int 28)]
+ (const_int 36))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9092,10 +9102,10 @@
+ ;; Loop counter in memory or sar case.
+ ;; Extra goo to deal with additional reload insns.
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 8)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 12)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -9123,10 +9133,10 @@
+ ;; Short branch has length of 4
+ ;; Long branch has length of 8
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9139,10 +9149,10 @@
+ (if_then_else (eq_attr "alternative" "1")
+ (if_then_else (lt (match_dup 3) (pc))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 12))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9150,10 +9160,10 @@
+ (const_int 28)]
+ (const_int 36))
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 12)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 16)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 32)
+@@ -9164,10 +9174,10 @@
+ ;; Loop counter in memory or SAR case.
+ ;; Extra goo to deal with additional reload insns.
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 8)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 12)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 28)
+@@ -9188,10 +9198,10 @@
+ [(set_attr "type" "parallel_branch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 3) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9211,10 +9221,10 @@
+ [(set_attr "type" "parallel_branch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9234,10 +9244,10 @@
+ [(set_attr "type" "parallel_branch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9257,10 +9267,10 @@
+ [(set_attr "type" "parallel_branch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
+@@ -9280,10 +9290,10 @@
+ [(set_attr "type" "parallel_branch")
+ (set (attr "length")
+ (cond [(lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 8184))
++ (const_int MAX_12BIT_OFFSET))
+ (const_int 4)
+ (lt (abs (minus (match_dup 2) (plus (pc) (const_int 8))))
+- (const_int 262100))
++ (const_int MAX_17BIT_OFFSET))
+ (const_int 8)
+ (ne (symbol_ref "TARGET_PORTABLE_RUNTIME") (const_int 0))
+ (const_int 24)
--- gcc-4.1-4.1.2.orig/debian/patches/gpc-names.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gpc-names.dpatch
@@ -0,0 +1,117 @@
+#! /bin/sh -e
+
+# DP: versioned gpc names
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- src-old/gcc/p/doc/en/gpc.texi Mon Oct 9 09:32:26 2000
++++ src-native/gcc/p/doc/en/gpc.texi Tue Dec 19 21:04:21 2000
+@@ -28,11 +28,11 @@
+
+ @dircategory GNU programming tools
+ @direntry
+-* GPC: (gpc). The GNU Pascal Compiler.
++* GPC-2.1-3.3: (gpc-2.1-3.3). The GNU Pascal Compiler.
+ @end direntry
+ @dircategory Individual utilities
+ @direntry
+-* GPC: (gpc)Invoking GPC. The GNU Pascal Compiler.
++* GPC-2.1-3.3: (gpc-2.1-3.3)Invoking GPC. The GNU Pascal Compiler.
+ @end direntry
+
+ @c Version numbers appear twice: in lowercase and capitalized for headlines.
+
+--- src/gcc/p/Make-lang.in~ 2003-08-31 10:13:01.000000000 +0200
++++ src/gcc/p/Make-lang.in 2003-08-31 10:20:51.000000000 +0200
+@@ -711,42 +711,42 @@
+ pascal.start.encap:
+ pascal.rest.encap:
+
+-pascal.info: $(srcdir)/p/doc/info/gpc.info \
+- $(srcdir)/p/doc/info/gpcs.info \
+- $(srcdir)/p/doc/info/gpcs-de.info \
+- $(srcdir)/p/doc/info/gpc-hr.info \
+- $(srcdir)/p/doc/info/gpcs-hr.info \
+- $(srcdir)/p/doc/info/gpc-es.info \
+- $(srcdir)/p/doc/info/gpcs-es.info
++pascal.info: $(srcdir)/p/doc/info/gpc-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpcs-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpcs-de-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpc-hr-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpcs-hr-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpc-es-2.1$(iv).info \
++ $(srcdir)/p/doc/info/gpcs-es-2.1$(iv).info
+ pascal.dvi: gpc.dvi
+
+-$(srcdir)/p/doc/info/gpc.info: $(GPC_TEXI_EN)
++$(srcdir)/p/doc/info/gpc-2.1$(iv).info: $(GPC_TEXI_EN)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_EN) -o $(srcdir)/p/doc/info/gpc.info gpc.texi
++ $(MAKEINFO_EN) -o $(srcdir)/p/doc/info/gpc-2.1$(iv).info gpc.texi
+
+-$(srcdir)/p/doc/info/gpcs.info: $(GPC_TEXI_EN)
++$(srcdir)/p/doc/info/gpcs-2.1$(iv).info: $(GPC_TEXI_EN)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_EN) --no-split -o $(srcdir)/p/doc/info/gpcs.info gpcs.texi
++ $(MAKEINFO_EN) --no-split -o $(srcdir)/p/doc/info/gpcs-2.1$(iv).info gpcs.texi
+
+-$(srcdir)/p/doc/info/gpcs-de.info: $(GPC_TEXI_DE)
++$(srcdir)/p/doc/info/gpcs-de-2.1$(iv).info: $(GPC_TEXI_DE)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_DE) --no-split -o $(srcdir)/p/doc/info/gpcs-de.info gpcs.texi
++ $(MAKEINFO_DE) --no-split -o $(srcdir)/p/doc/info/gpcs-de-2.1$(iv).info gpcs.texi
+
+-$(srcdir)/p/doc/info/gpc-hr.info: $(GPC_TEXI_HR)
++$(srcdir)/p/doc/info/gpc-hr-2.1$(iv).info: $(GPC_TEXI_HR)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_HR) -o $(srcdir)/p/doc/info/gpc-hr.info gpc.texi
++ $(MAKEINFO_HR) -o $(srcdir)/p/doc/info/gpc-hr-2.1$(iv).info gpc.texi
+
+-$(srcdir)/p/doc/info/gpcs-hr.info: $(GPC_TEXI_HR)
++$(srcdir)/p/doc/info/gpcs-hr-2.1$(iv).info: $(GPC_TEXI_HR)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_HR) --no-split -o $(srcdir)/p/doc/info/gpcs-hr.info gpcs.texi
++ $(MAKEINFO_HR) --no-split -o $(srcdir)/p/doc/info/gpcs-hr-2.1$(iv).info gpcs.texi
+
+-$(srcdir)/p/doc/info/gpc-es.info: $(GPC_TEXI_ES)
++$(srcdir)/p/doc/info/gpc-es-2.1$(iv).info: $(GPC_TEXI_ES)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_ES) -o $(srcdir)/p/doc/info/gpc-es.info gpc.texi
++ $(MAKEINFO_ES) -o $(srcdir)/p/doc/info/gpc-es-2.1$(iv).info gpc.texi
+
+-$(srcdir)/p/doc/info/gpcs-es.info: $(GPC_TEXI_ES)
++$(srcdir)/p/doc/info/gpcs-es-2.1$(iv).info: $(GPC_TEXI_ES)
+ [ -d "$(srcdir)/p/doc/info" ] || $(srcdir)/p/script/mkdir-p "$(srcdir)/p/doc/info"
+- $(MAKEINFO_ES) --no-split -o $(srcdir)/p/doc/info/gpcs-es.info gpcs.texi
++ $(MAKEINFO_ES) --no-split -o $(srcdir)/p/doc/info/gpcs-es-2.1$(iv).info gpcs.texi
+
+ gpc.dvi: $(GPC_TEXI_EN)
+ TEXINPUTS=$(srcdir)/p/doc:$(srcdir)/p/doc/images:$$TEXINPUTS \
+@@ -942,11 +942,11 @@
+ fi
+
+ pascal.install-info: pascal.install-info-man-dirs pascal.info
+- rm -f $(DESTDIR)$(infodir)/gpc.info* $(DESTDIR)$(infodir)/gpcs.info* $(DESTDIR)$(infodir)/gpcs-de.info* $(DESTDIR)$(infodir)/gpcs-hr.info* $(DESTDIR)$(infodir)/gpcs-es.info*
+- for f in `cd $(srcdir)/p/doc/info && echo gpc.info* gpcs*.info*`; do \
++ rm -f $(DESTDIR)$(infodir)/gpc*.info* $(DESTDIR)$(infodir)/gpcs*.info* $(DESTDIR)$(infodir)/gpcs-de*.info* $(DESTDIR)$(infodir)/gpcs-hr*.info* $(DESTDIR)$(infodir)/gpcs-es*.info*
++ for f in `cd $(srcdir)/p/doc/info && echo gpc-2.1$(iv).info* gpcs*.info*`; do \
+ $(INSTALL_DATA) $(srcdir)/p/doc/info/$$f $(DESTDIR)$(infodir)/$$f || exit 1; \
+ done
+- chmod a-x $(DESTDIR)$(infodir)/gpc.info* $(DESTDIR)$(infodir)/gpcs.info* $(DESTDIR)$(infodir)/gpcs-de.info* $(DESTDIR)$(infodir)/gpcs-hr.info* $(DESTDIR)$(infodir)/gpcs-es.info*
++ chmod a-x $(DESTDIR)$(infodir)/gpc*.info* $(DESTDIR)$(infodir)/gpcs*.info* $(DESTDIR)$(infodir)/gpcs-de*.info* $(DESTDIR)$(infodir)/gpcs-hr*.info* $(DESTDIR)$(infodir)/gpcs-es*.info*
+
+ pascal.install-man: pascal.install-info-man-dirs $(srcdir)/p/doc/en/gpc.1 $(srcdir)/p/doc/generated/gpc-run.1
+ -if [ -f gpc1$(exeext) ]; then \
--- gcc-4.1-4.1.2.orig/debian/patches/libjava-lib32-properties.dpatch
+++ gcc-4.1-4.1.2/debian/patches/libjava-lib32-properties.dpatch
@@ -0,0 +1,85 @@
+#! /bin/sh -e
+
+# DP: - When running the i386 binaries on amd64, adjust the properties
+# DP: java.home, gnu.classpath.home.url, sun.boot.class.path,
+# DP: gnu.gcj.precompiled.db.path.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ cd ${dir}libjava && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ rm -f ${dir}libjava/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- libjava/gnu/classpath/natSystemProperties.cc.orig 2006-09-10 14:07:47.130718000 +0200
++++ libjava/gnu/classpath/natSystemProperties.cc 2006-09-10 16:30:31.640718000 +0200
+@@ -209,6 +209,18 @@
+ // part we do this because most people specify only --prefix and
+ // nothing else when installing gcj. Plus, people are free to
+ // redefine `java.home' with `-D' if necessary.
++ struct utsname u;
++#if defined(__linux__) && defined (__i386__)
++ uname (&u);
++ if (! strcmp ("x86_64", u.machine))
++ {
++ SET ("java.home", "/usr/lib32/jvm/java-1.5.0-gcj-4.1-1.5.0.0/jre");
++ SET ("gnu.classpath.home", "/usr");
++ SET ("gnu.classpath.home.url", "file:///usr/lib/../lib32");
++ }
++ else
++#endif
++ {
+ SET ("java.home", JAVA_HOME);
+ SET ("gnu.classpath.home", PREFIX);
+ // This is set to $(toolexeclibdir) because we use this to find
+@@ -217,11 +229,11 @@
+ strcpy (val2, "file://");
+ strcat (val2, TOOLEXECLIBDIR);
+ SET ("gnu.classpath.home.url", val2);
++ }
+
+ SET ("file.encoding", default_file_encoding);
+
+ #ifdef HAVE_UNAME
+- struct utsname u;
+ if (! uname (&u))
+ {
+ SET ("os.name", u.sysname);
+@@ -348,11 +360,21 @@
+ // without overriding java.endorsed.dirs.
+ SET ("gnu.gcj.runtime.endorsed.dirs", GCJ_ENDORSED_DIRS);
+
++#if defined(__linux__) && defined (__i386__)
++ if (! strcmp ("x86_64", u.machine))
++ {
++ SET ("sun.boot.class.path", "/usr/lib32/jvm/java-1.5.0-gcj-4.1-1.5.0.0/jre/lib/rt.jar");
++ SET ("gnu.gcj.precompiled.db.path", "/var/lib32/gcj-4.1/classmap.db");
++ }
++ else
++#endif
++ {
+ // The path to libgcj's boot classes
+ SET ("sun.boot.class.path", BOOT_CLASS_PATH);
+
+ // If there is a default system database, set it.
+ SET ("gnu.gcj.precompiled.db.path", LIBGCJ_DEFAULT_DATABASE);
++ }
+
+ // Set some properties according to whatever was compiled in with
+ // `-D'. Important: after this point, the only properties that
--- gcc-4.1-4.1.2.orig/debian/patches/ada-driver.dpatch
+++ gcc-4.1-4.1.2/debian/patches/ada-driver.dpatch
@@ -0,0 +1,41 @@
+#! /bin/sh -e
+
+# DP: Look for gcc-3.3, gcc-3.4 and gcc-4.0 as gcc with Ada support.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+
+--- gcc/aclocal.m4~ Sat Mar 2 00:37:42 2002
++++ gcc/aclocal.m4 Sat Apr 6 13:01:36 2002
+@@ -312,6 +312,10 @@
+ ${ac_tool_prefix}$user_cc $user_cc \
+ ${ac_tool_prefix}gcc gcc \
+ ${ac_tool_prefix}cc cc \
++ ${ac_tool_prefix}gcc-4.1 gcc-4.1 \
++ ${ac_tool_prefix}gcc-4.0 gcc-4.0 \
++ ${ac_tool_prefix}gcc-3.4 gcc-3.4 \
++ ${ac_tool_prefix}gcc-3.3 gcc-3.3 \
+ ${ac_tool_prefix}gnatgcc gnatgcc \
+ ${ac_tool_prefix}gnatcc gnatcc \
+ ${ac_tool_prefix}adagcc adagcc \
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-version.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-version.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+
+# DP: Add package identification to the gcc version string
+
+pkgversion=
+if [ -n "$DEB_VERSION" ]; then
+ pkgversion=" $DEB_VERSION"
+fi
+
+dist=Debian
+dist=$(lsb_release -is)
+
+dir=gcc
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ dir=$3/gcc
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ sed -e "/#define VERSUFFIX/s/\".*/\" ($dist$pkgversion)\"/" \
+ $dir/version.c > $dir/version.c.new \
+ && mv -f $dir/version.c.new $dir/version.c
+ ;;
+ -unpatch)
+ sed -e '/#define VERSUFFIX/s/".*/""/' \
+ $dir/version.c > $dir/version.c.new \
+ && mv -f $dir/version.c.new $dir/version.c
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
--- gcc-4.1-4.1.2.orig/debian/patches/sparc64-build.dpatch
+++ gcc-4.1-4.1.2/debian/patches/sparc64-build.dpatch
@@ -0,0 +1,58 @@
+#! /bin/sh -e
+# sparc64-build.dpatch by
+#
+# DP: Allows sparc64 to build more simply
+
+if [ $# -eq 3 ] && [ "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch -f --no-backup-if-mismatch -p0 < $0;;
+ -unpatch)
+ patch -f --no-backup-if-mismatch -R -p0 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1;;
+esac
+
+exit 0
+
+diff -urNad gcc/config/sparc/linux64.h sparc64-build.gcc-3.3/src/gcc/config/sparc/linux64.h
+--- gcc/config/sparc/linux64.h 2003-03-13 08:40:33.000000000 +0000
++++ gcc/config/sparc/linux64.h 2003-03-13 08:46:18.000000000 +0000
+@@ -37,8 +37,8 @@
+ + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
+ #endif
+
+-#undef ASM_CPU_DEFAULT_SPEC
+-#define ASM_CPU_DEFAULT_SPEC "-Av9a"
++#undef ASM_CPU64_DEFAULT_SPEC
++#define ASM_CPU64_DEFAULT_SPEC "-Av9a"
+
+ #ifdef SPARC_BI_ARCH
+
+--- gcc/config.gcc 2004-06-29 01:44:04.000000000 -0400
++++ gcc/config.gcc 2004-07-05 10:46:52.813558531 -0400
+@@ -1828,8 +1828,17 @@
+ use_fixproto=yes
+ ;;
+ sparc-*-linux*) # SPARC's running GNU/Linux, libc6
++ # If cpu is specified, assume we want a 32/64 compiler
++ if test x$with_cpu = x; then
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
+ tmake_file="${tmake_file} sparc/t-crtfm"
++ else
++ tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
++ tmake_file="${tmake_file} sparc/t-linux64 sparc/t-crtfm"
++ float_format=sparc
++ fi
++# tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux.h"
++# tmake_file="${tmake_file} sparc/t-crtfm"
+ ;;
+ sparc-*-rtems*)
+ tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-ssp-default.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-ssp-default.dpatch
@@ -0,0 +1,208 @@
+#! /bin/sh -e
+
+# DP: Turn on -fstack-protector by default for C, C++, ObjC, ObjC++.
+# DP: Build libgcc using -fno-stack-protector.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/objc/lang-specs.h~ 2005-06-25 00:33:05.000000000 +0000
++++ gcc/objc/lang-specs.h 2006-07-12 13:33:26.973728272 +0000
+@@ -30,13 +30,13 @@
+ %{traditional|ftraditional|traditional-cpp:\
+ %eGNU Objective C no longer supports traditional compilation}\
+ %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
+- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\
++ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}\
+ %{!save-temps:%{!no-integrated-cpp:\
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\
++ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}}}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {".mi", "@objc-cpp-output", 0, 0, 0},
+ {"@objc-cpp-output",
+- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objective-c-header",
+ "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\
+@@ -45,10 +45,10 @@
+ %{traditional|ftraditional|traditional-cpp:\
+ %eGNU Objective C no longer supports traditional compilation}\
+ %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
+- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ cc1obj -fpreprocessed %b.mi %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
+ -o %g.s %{!o*:--output-pch=%i.gch}\
+ %W{o*:--output-pch=%*}%V}\
+ %{!save-temps:%{!no-integrated-cpp:\
+- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
++ cc1obj %(cpp_unique_options) %(cc1_options) %(ssp_default) %{print-objc-runtime-info} %{gen-decls}\
+ -o %g.s %{!o*:--output-pch=%i.gch}\
+ %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0},
+--- gcc/cp/lang-specs.h~ 2005-06-25 00:59:41.000000000 +0000
++++ gcc/cp/lang-specs.h 2006-07-12 13:32:05.656090432 +0000
+@@ -42,7 +42,7 @@
+ %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
+ cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2 %{+e1*}\
++ %(cc1_options) %(ssp_default) %2 %{+e1*}\
+ -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {"@c++",
+@@ -52,11 +52,11 @@
+ %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
+ cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2 %{+e1*}\
++ %(cc1_options) %(ssp_default) %2 %{+e1*}\
+ %{!fsyntax-only:%(invoke_as)}}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {".ii", "@c++-cpp-output", 0, 0, 0},
+ {"@c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
++ cc1plus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+--- gcc/objcp/lang-specs.h~ 2005-06-25 00:33:05.000000000 +0000
++++ gcc/objcp/lang-specs.h 2006-07-12 13:34:04.602007904 +0000
+@@ -36,7 +36,7 @@
+ %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
+ cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2 %{+e1*}\
++ %(cc1_options) %(ssp_default) %2 %{+e1*}\
+ -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {"@objective-c++",
+@@ -46,15 +46,15 @@
+ %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\
+ cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
+ %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
+- %(cc1_options) %2 %{+e1*}\
++ %(cc1_options) %(ssp_default) %2 %{+e1*}\
+ %{!fsyntax-only:%(invoke_as)}}}}",
+ CPLUSPLUS_CPP_SPEC, 0, 0},
+ {".mii", "@objective-c++-cpp-output", 0, 0, 0},
+ {"@objective-c++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
++ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+ {"@objc++-cpp-output",
+ "%{!M:%{!MM:%{!E:\
+- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\
++ cc1objplus -fpreprocessed %i %(cc1_options) %(ssp_default) %2 %{+e*}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+--- gcc/Makefile.in~ 2006-07-09 02:10:28.448366880 +0200
++++ gcc/Makefile.in 2006-07-11 14:03:25.865618000 +0200
+@@ -538,6 +538,7 @@
+ LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
+ $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
+ -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
++ -fno-stack-protector \
+ $(INHIBIT_LIBC_CFLAGS)
+
+ # Additional options to use when compiling libgcc2.a.
+@@ -551,6 +552,7 @@
+ CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
+ -finhibit-size-directive -fno-inline-functions -fno-exceptions \
+ -fno-zero-initialized-in-bss -fno-unit-at-a-time \
++ -fno-stack-protector \
+ $(INHIBIT_LIBC_CFLAGS)
+
+ # Additional sources to handle exceptions; overridden by targets as needed.
+--- gcc/gcc.c~ 2006-07-18 14:22:02.304751656 +0000
++++ gcc/gcc.c 2006-07-18 14:25:09.785250288 +0000
+@@ -682,6 +682,10 @@
+ #endif
+ #endif
+
++#ifndef SSP_DEFAULT_SPEC
++#define SSP_DEFAULT_SPEC "%{!fno-stack-protector:-fstack-protector}"
++#endif
++
+ #ifndef LINK_PIE_SPEC
+ #ifdef HAVE_LD_PIE
+ #define LINK_PIE_SPEC "%{pie:-pie} "
+@@ -734,6 +738,7 @@
+ static const char *cc1plus_spec = CC1PLUS_SPEC;
+ static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC;
+ static const char *link_ssp_spec = LINK_SSP_SPEC;
++static const char *ssp_default_spec = SSP_DEFAULT_SPEC;
+ static const char *asm_spec = ASM_SPEC;
+ static const char *asm_final_spec = ASM_FINAL_SPEC;
+ static const char *link_spec = LINK_SPEC;
+@@ -804,6 +809,7 @@
+ %{--target-help:--target-help}\
+ %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}}\
+ %{fsyntax-only:-o %j} %{-param*}\
++ %(ssp_default)\
+ %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants}\
+ %{coverage:-fprofile-arcs -ftest-coverage}";
+
+@@ -951,15 +957,15 @@
+ %{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i} \n\
+ cc1 -fpreprocessed %{save-temps:%b.i} %{!save-temps:%g.i} \
+- %(cc1_options)}\
++ %(cc1_options) %(ssp_default)}\
+ %{!save-temps:%{!traditional-cpp:%{!no-integrated-cpp:\
+- cc1 %(cpp_unique_options) %(cc1_options)}}}\
++ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}}\
+ %{!fsyntax-only:%(invoke_as)}} \
+ %{combine:\
+ %{save-temps|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) -o %{save-temps:%b.i} %{!save-temps:%g.i}}\
+ %{!save-temps:%{!traditional-cpp:%{!no-integrated-cpp:\
+- cc1 %(cpp_unique_options) %(cc1_options)}}\
++ cc1 %(cpp_unique_options) %(cc1_options) %(ssp_default)}}\
+ %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1},
+ {"-",
+ "%{!E:%e-E or -x required when input is from standard input}\
+@@ -982,7 +988,7 @@
+ %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0},
+ {".i", "@cpp-output", 0, 1, 0},
+ {"@cpp-output",
+- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(ssp_default) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
+ {".s", "@assembler", 0, 1, 0},
+ {"@assembler",
+ "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0},
+@@ -1532,6 +1538,7 @@
+ INIT_STATIC_SPEC ("cc1plus", &cc1plus_spec),
+ INIT_STATIC_SPEC ("link_gcc_c_sequence", &link_gcc_c_sequence_spec),
+ INIT_STATIC_SPEC ("link_ssp", &link_ssp_spec),
++ INIT_STATIC_SPEC ("ssp_default", &ssp_default_spec),
+ INIT_STATIC_SPEC ("endfile", &endfile_spec),
+ INIT_STATIC_SPEC ("link", &link_spec),
+ INIT_STATIC_SPEC ("lib", &lib_spec),
+--- gcc/doc/invoke.texi~ 2006-12-08 19:40:22.000000000 +0100
++++ gcc/doc/invoke.texi 2006-12-09 09:49:56.000000000 +0100
+@@ -5700,6 +5700,9 @@
+ when a function is entered and then checked when the function exits.
+ If a guard check fails, an error message is printed and the program exits.
+
++NOTE: In Ubuntu 6.10 and 7.04 this option is enabled by default
++for C, C++, ObjC, ObjC++.
++
+ @item -fstack-protector-all
+ Like @option{-fstack-protector} except that all functions are protected.
+
--- gcc-4.1-4.1.2.orig/debian/patches/gcc-r109581.dpatch
+++ gcc-4.1-4.1.2/debian/patches/gcc-r109581.dpatch
@@ -0,0 +1,64 @@
+#! /bin/sh -e
+
+# DP: Backport r109581 from the trunk
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2006-01-19 Jan Hubicka
+
+ * i386.h (TARGET_DECOMPOSE_LEA): Kill.
+ * i386.c (x86_decompose_lea): Kill.
+ (ix86_rtx_costs): Kill.
+
+Index: gcc/config/i386/i386.h
+===================================================================
+--- gcc/config/i386/i386.h (revision 109569)
++++ gcc/config/i386/i386.h (revision 109581)
+@@ -209,7 +209,6 @@
+ #define TARGET_MEMORY_MISMATCH_STALL (x86_memory_mismatch_stall & TUNEMASK)
+ #define TARGET_PROLOGUE_USING_MOVE (x86_prologue_using_move & TUNEMASK)
+ #define TARGET_EPILOGUE_USING_MOVE (x86_epilogue_using_move & TUNEMASK)
+-#define TARGET_DECOMPOSE_LEA (x86_decompose_lea & TUNEMASK)
+ #define TARGET_PREFETCH_SSE (x86_prefetch_sse)
+ #define TARGET_SHIFT1 (x86_shift1 & TUNEMASK)
+ #define TARGET_USE_FFREEP (x86_use_ffreep & TUNEMASK)
+Index: gcc/config/i386/i386.c
+===================================================================
+--- gcc/config/i386/i386.c (revision 109569)
++++ gcc/config/i386/i386.c (revision 109581)
+@@ -640,7 +640,6 @@
+ const int x86_accumulate_outgoing_args = m_ATHLON_K8 | m_PENT4 | m_NOCONA | m_PPRO;
+ const int x86_prologue_using_move = m_ATHLON_K8 | m_PPRO;
+ const int x86_epilogue_using_move = m_ATHLON_K8 | m_PPRO;
+-const int x86_decompose_lea = m_PENT4 | m_NOCONA;
+ const int x86_shift1 = ~m_486;
+ const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA;
+ const int x86_sse_partial_reg_dependency = m_PENT4 | m_NOCONA | m_PPRO;
+@@ -16673,7 +16673,6 @@
+ return false;
+ }
+ if ((value == 2 || value == 3)
+- && !TARGET_DECOMPOSE_LEA
+ && ix86_cost->lea <= ix86_cost->shift_const)
+ {
+ *total = ix86_cost->lea;
--- gcc-4.1-4.1.2.orig/debian/patches/ada-link-lib.dpatch
+++ gcc-4.1-4.1.2/debian/patches/ada-link-lib.dpatch
@@ -0,0 +1,2139 @@
+#! /bin/sh -e
+
+# DP: - Install the shared Ada libraries as '.so.1', not '.so' to conform
+# DP: to the Debian policy.
+# DP: - Don't include a runtime link path (-rpath), when linking binaries.
+# DP: - Build the shared libraries on hppa-linux.
+# DP: - Instead of building libada as a target library only, build it as
+# DP: both a host and, if different, target library.
+# DP: - Build the GNAT tools in their top-level directory; do not use
+# DP: recursive makefiles.
+# DP: - Link the GNAT tools dynamically.
+# DP: - Fix a bug in src/gnattools/configure.ac whereby a nonexistent version
+# DP: of indepsw's body was selected. Regenerate configure. (PR ada/27300)
+
+# This patch seems large, but the hunks in Makefile.in are actually
+# generated from Makefile.def using autogen.
+
+dir=./
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ cd ${dir} && autoconf2.13
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ rm -f ${dir}configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- configure.in~
++++ configure.in 2006-04-12 09:30:12.000000000 +0200
+@@ -123,7 +123,7 @@
+
+ # these libraries are used by various programs built for the host environment
+ #
+-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp"
++host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libada"
+
+ # these tools are built for the host environment
+ # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
+@@ -229,7 +229,7 @@
+
+ # Similarly, some are only suitable for cross toolchains.
+ # Remove these if host=target.
+-cross_only="target-libgloss target-newlib target-opcodes"
++cross_only="target-libgloss target-newlib target-opcodes target-libada"
+
+ case $is_cross_compiler in
+ no) skipdirs="${skipdirs} ${cross_only}" ;;
+--- gcc/ada/config-lang.in~
++++ gcc/ada/config-lang.in 2006-04-26 08:17:42.000000000 +0000
+@@ -39,7 +39,7 @@
+ outputs=ada/Makefile
+
+ target_libs="target-libada"
+-lang_dirs="gnattools"
++lang_dirs="libada gnattools"
+
+ # Ada will not work until the front end starts emitting GIMPLE trees.
+ build_by_default=no
+--- gcc/ada/link.c~
++++ gcc/ada/link.c 2006-04-12 09:30:12.000000000 +0200
+@@ -164,8 +164,8 @@
+
+ #elif defined (linux)
+ const char *__gnat_object_file_option = "";
+-const char *__gnat_run_path_option = "-Wl,-rpath,";
+-char __gnat_shared_libgnat_default = STATIC;
++const char *__gnat_run_path_option = "";
++char __gnat_shared_libgnat_default = SHARED;
+ int __gnat_link_max = 8192;
+ unsigned char __gnat_objlist_file_supported = 1;
+ unsigned char __gnat_using_gnu_linker = 1;
+--- gcc/ada/Makefile.in~
++++ gcc/ada/Makefile.in 2006-04-12 15:02:23.000000000 +0200
+@@ -115,7 +115,7 @@
+ MAKEINFO = makeinfo
+ TEXI2DVI = texi2dvi
+ GNATBIND = $(STAGE_PREFIX)gnatbind
+-GNATBIND_FLAGS = -static -x
++GNATBIND_FLAGS = -shared -x
+ ADA_CFLAGS =
+ ADAFLAGS = -W -Wall -gnatpg -gnata
+ SOME_ADAFLAGS =-gnata
+@@ -247,7 +247,6 @@
+ LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY)
+ # Default is no TGT_LIB; one might be passed down or something
+ TGT_LIB =
+-TOOLS_LIBS = $(LIBGNAT) $(EXTRA_GNATTOOLS_OBJS) link.o ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB)
+
+ # Specify the directories to be searched for header files.
+ # Both . and srcdir are used, in that order,
+@@ -293,30 +292,6 @@
+ # defined in this file into the environment.
+ .NOEXPORT:
+
+-# Lists of files for various purposes.
+-
+-GNATLINK_OBJS = gnatlink.o \
+- a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o gnatvsn.o \
+- hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o osint.o output.o rident.o \
+- s-exctab.o s-secsta.o s-stalib.o s-stoele.o sdefault.o stylesw.o switch.o system.o \
+- table.o tree_io.o types.o validsw.o widechar.o
+-
+-GNATMAKE_OBJS = a-except.o ctrl_c.o ali.o ali-util.o s-casuti.o \
+- alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\
+- erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \
+- gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \
+- make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o mlib-utl.o \
+- namet.o nlists.o opt.o osint.o osint-m.o output.o \
+- prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o prj-err.o prj-ext.o prj-nmsc.o \
+- prj-pars.o prj-part.o prj-proc.o prj-strt.o prj-tree.o prj-util.o \
+- rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \
+- scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o \
+- sinfo.o sinput.o sinput-c.o sinput-p.o \
+- snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o switch.o switch-m.o \
+- table.o targparm.o tempdir.o tree_io.o types.o \
+- uintp.o uname.o urealp.o usage.o widechar.o \
+- $(EXTRA_GNATMAKE_OBJS)
+-
+ # Convert the target variable into a space separated list of architecture,
+ # manufacturer, and operating system and assign each of those to its own
+ # variable.
+@@ -408,8 +383,6 @@
+ g-socthi.adb&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+gcc:
+
+2006-01-20 Joseph S. Myers
+
+ PR libstdc++/25524
+ * cppdefault.h (struct default_include): Add multilib flag.
+ * cppdefault.c (cpp_include_defaults): Set it.
+ * c.opt (-imultilib): New option.
+ * c-opts.c (imultilib): New.
+ (c_common_handle_option): Handle -imultilib.
+ (c_common_post_options): Likewise.
+ * c-incpath.c (add_standard_paths, register_include_chains):
+ Likewise.
+ * c-incpath.h (register_include_chains): Add extra parameter.
+ * gcc.c (do_spec_1): Generate -imultilib option.
+ (The Specs Language): Update %I description.
+ (process_command): Update copyright notice.
+ * doc/cppopts.texi (-imultilib): Document.
+ * doc/invoke.texi (-imultilib): Include in option summary.
+ (%I): Update specs documentation.
+
+libstdc++-v3:
+
+2006-01-20 Joseph S. Myers
+
+ PR libstdc++/25524
+ * include/Makefile.am: Install host-specific headers in multilib
+ subdirectory.
+ * include/Makefile.in: Regenerate.
+
+Index: gcc/doc/cppopts.texi
+===================================================================
+--- gcc/doc/cppopts.texi (revision 114541)
++++ gcc/doc/cppopts.texi (working copy)
+@@ -1,4 +1,4 @@
+-@c Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005
++@c Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ @c Free Software Foundation, Inc.
+ @c This is part of the CPP and GCC manuals.
+ @c For copying conditions, see the file gcc.texi.
+@@ -483,6 +483,11 @@
+ This option is like the @option{--sysroot} option, but applies only to
+ header files. See the @option{--sysroot} option for more information.
+
++@item -imultilib @var{dir}
++@opindex imultilib
++Use @var{dir} as a subdirectory of the directory containing
++target-specific C++ headers.
++
+ @item -isystem @var{dir}
+ @opindex isystem
+ Search @var{dir} for header files, after all directories specified by
+Index: gcc/doc/invoke.texi
+===================================================================
+--- gcc/doc/invoke.texi (revision 114541)
++++ gcc/doc/invoke.texi (working copy)
+@@ -5,8 +5,8 @@
+
+ @ignore
+ @c man begin COPYRIGHT
+-Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
+-1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
++1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2 or
+@@ -352,7 +352,7 @@
+ -include @var{file} -imacros @var{file} @gol
+ -iprefix @var{file} -iwithprefix @var{dir} @gol
+ -iwithprefixbefore @var{dir} -isystem @var{dir} @gol
+--isysroot @var{dir} @gol
++-imultilib @var{dir} -isysroot @var{dir} @gol
+ -M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
+ -P -fworking-directory -remap @gol
+ -trigraphs -undef -U@var{macro} -Wp,@var{option} @gol
+@@ -6800,9 +6800,9 @@
+
+ @item %I
+ Substitute any of @option{-iprefix} (made from @env{GCC_EXEC_PREFIX}),
+-@option{-isysroot} (made from @env{TARGET_SYSTEM_ROOT}), and
++@option{-isysroot} (made from @env{TARGET_SYSTEM_ROOT}),
+ @option{-isystem} (made from @env{COMPILER_PATH} and @option{-B} options)
+-as necessary.
++and @option{-imultilib} as necessary.
+
+ @item %s
+ Current argument is the name of a library or startup file of some sort.
--- gcc-4.1-4.1.2.orig/debian/patches/m68k-dwarf.dpatch
+++ gcc-4.1-4.1.2/debian/patches/m68k-dwarf.dpatch
@@ -0,0 +1,76 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DPATCH:' are a description of the patch.
+# DP: correct the dwarf frame information, but preserve compatibility
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# append the patch here and adjust the -p? flag in the patch calls.
+
+---
+ gcc/config/m68k/m68k.c | 4 ++++
+ gcc/config/m68k/m68k.h | 9 ++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+Index: gcc-4.1/gcc/config/m68k/m68k.c
+===================================================================
+--- gcc-4.1.orig/gcc/config/m68k/m68k.c
++++ gcc-4.1/gcc/config/m68k/m68k.c
+@@ -3390,5 +3390,9 @@ m68k_regno_mode_ok (int regno, enum mach
+ && GET_MODE_UNIT_SIZE (mode) <= 12)
+ return true;
+ }
++ else if (regno == 24)
++ {
++ return GET_MODE_SIZE (mode) == 4;
++ }
+ return false;
+ }
+Index: gcc-4.1/gcc/config/m68k/m68k.h
+===================================================================
+--- gcc-4.1.orig/gcc/config/m68k/m68k.h
++++ gcc-4.1/gcc/config/m68k/m68k.h
+@@ -174,6 +174,13 @@ Boston, MA 02110-1301, USA. */
+ register elimination. */
+ #define FIRST_PSEUDO_REGISTER 25
+
++/* Number of hardware registers that go into the DWARF-2 unwind info. This
++ should be 24, but to prevent compability problems leave it at 25. */
++#define DWARF_FRAME_REGISTERS 25
++
++#define DWARF_FRAME_RETURN_COLUMN 24
++#define DWARF_ALT_FRAME_RETURN_COLUMN 25
++
+ /* All m68k targets (except AmigaOS) use %a5 as the PIC register */
+ #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 13 : INVALID_REGNUM)
+
+@@ -251,7 +258,7 @@ Boston, MA 02110-1301, USA. */
+ for the 68881 registers, a single register is always enough for
+ anything that can be stored in them at all. */
+ #define HARD_REGNO_NREGS(REGNO, MODE) \
+- ((REGNO) >= 16 ? GET_MODE_NUNITS (MODE) \
++ ((REGNO) >= 16 && (REGNO) <= 23 ? GET_MODE_NUNITS (MODE) \
+ : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
+
+ /* A C expression that is nonzero if hard register NEW_REG can be
--- gcc-4.1-4.1.2.orig/debian/patches/libjava-visibility.dpatch
+++ gcc-4.1-4.1.2/debian/patches/libjava-visibility.dpatch
@@ -0,0 +1,172 @@
+#! /bin/sh -e
+
+# DP: Reduce the number of symbols in libgcj.so by 20%; taken from the trunk.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+2007-03-29 Andrew Haley
+
+ * jvgenmain.c (main): Change main to use class$, not class$$.
+ (do_mangle_classname): Likewise.
+ * class.c (hide): New function.
+ (add_field): Hide everything that shouldn't be visible outside a
+ DSO.
+ (build_static_class_ref): Likewise.
+ (build_classdollar_field): Likewise.
+ (make_class_data): Likewise.
+ (layout_class_method): Likewise.
+ * expr.c (special_method_p): New function.
+
+--- gcc/java/class.c (revision 122746)
++++ gcc/java/class.c (working copy)
+@@ -689,6 +688,13 @@
+ return fntype;
+ }
+
++static void
++hide (tree decl)
++{
++ DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN;
++ DECL_VISIBILITY_SPECIFIED (decl) = 1;
++}
++
+ tree
+ add_method_1 (tree this_class, int access_flags, tree name, tree function_type)
+ {
+@@ -799,6 +805,10 @@
+ /* Always make field externally visible. This is required so
+ that native methods can always access the field. */
+ TREE_PUBLIC (field) = 1;
++ /* Hide everything that shouldn't be visible outside a DSO. */
++ if (flag_indirect_classes
++ || (FIELD_PRIVATE (field)))
++ hide (field);
+ /* Considered external unless we are compiling it into this
+ object file. */
+ DECL_EXTERNAL (field) = (is_compiled_class (class) != 2);
+@@ -956,7 +966,11 @@
+ decl = build_decl (VAR_DECL, decl_name, class_type_node);
+ TREE_STATIC (decl) = 1;
+ if (! flag_indirect_classes)
+- TREE_PUBLIC (decl) = 1;
++ {
++ TREE_PUBLIC (decl) = 1;
++ if (CLASS_PRIVATE (TYPE_NAME (type)))
++ hide (decl);
++ }
+ DECL_IGNORED_P (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
+ if (is_compiled_class (type) == 1)
+@@ -995,6 +1009,7 @@
+ TREE_CONSTANT (decl) = 1;
+ TREE_READONLY (decl) = 1;
+ TREE_PUBLIC (decl) = 1;
++ hide (decl);
+ DECL_IGNORED_P (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
+ MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC (decl);
+@@ -1640,6 +1655,10 @@
+
+ TREE_PUBLIC (dtable_decl) = 1;
+ DECL_INITIAL (dtable_decl) = dtable;
++ /* The only dispatch table exported from a DSO is the dispatch
++ table for java.lang.Class. */
++ if (DECL_NAME (type_decl) != id_class)
++ hide (dtable_decl);
+ if (! flag_indirect_classes)
+ rest_of_decl_compilation (dtable_decl, 1, 0);
+ /* Maybe we're compiling Class as the first class. If so, set
+@@ -2509,6 +2528,12 @@
+
+ TREE_PUBLIC (method_decl) = 1;
+
++ if (flag_indirect_classes
++ || (METHOD_PRIVATE (method_decl) && METHOD_STATIC (method_decl)
++ && ! METHOD_NATIVE (method_decl)
++ && ! special_method_p (method_decl)))
++ hide (method_decl);
++
+ /* Considered external unless it is being compiled into this object
+ file, or it was already flagged as external. */
+ if (!DECL_EXTERNAL (method_decl))
+--- gcc/java/jvgenmain.c (revision 122746)
++++ gcc/java/jvgenmain.c (working copy)
+@@ -143,8 +143,8 @@
+ fprintf (stream, " JvRunMainName (\"%s\", argc, argv);\n", classname);
+ else
+ {
+- fprintf (stream, " extern void *%s;\n", mangled_classname);
+- fprintf (stream, " JvRunMain (%s, argc, argv);\n", mangled_classname);
++ fprintf (stream, " extern char %s;\n", mangled_classname);
++ fprintf (stream, " JvRunMain (&%s, argc, argv);\n", mangled_classname);
+ }
+ fprintf (stream, "}\n");
+ if (stream != stdout && fclose (stream) != 0)
+@@ -176,7 +176,7 @@
+ count++;
+ }
+ append_gpp_mangled_name (&ptr [-count], count);
+- obstack_grow (mangle_obstack, "7class$$E", strlen ("7class$$E"));
++ obstack_grow (mangle_obstack, "6class$E", strlen ("6class$E"));
+ obstack_1grow (mangle_obstack, '\0');
+ return obstack_finish (mangle_obstack);
+ }
+--- gcc/java/expr.c (revision 122746)
++++ gcc/java/expr.c (working copy)
+@@ -2121,6 +2121,25 @@
+
+ {NULL, NULL, NULL, NULL, 0, NULL}};
+
++/* True if this method is special, i.e. it's a private method that
++ should be exported fro a DSO. */
++
++bool
++special_method_p (tree candidate_method)
++{
++ tree context = DECL_NAME (TYPE_NAME (DECL_CONTEXT (candidate_method)));
++ tree method = DECL_NAME (candidate_method);
++ rewrite_rule *p;
++
++ for (p = rules; p->classname; p++)
++ {
++ if (get_identifier (p->classname) == context
++ && get_identifier (p->method) == method)
++ return true;
++ }
++ return false;
++}
++
+ /* Scan the rules list for replacements for *METHOD_P and replace the
+ args accordingly. If the rewrite results in an access to a private
+ method, update SPECIAL.*/
+--- gcc/java/java-tree.h (revision 122746)
++++ gcc/java/java-tree.h (working copy)
+@@ -1171,6 +1171,7 @@
+ extern void initialize_builtins (void);
+
+ extern tree lookup_name (tree);
++extern bool special_method_p (tree);
+ extern void maybe_rewrite_invocation (tree *, tree *, tree *, tree *);
+ extern tree build_known_method_ref (tree, tree, tree, tree, tree, tree);
+ extern tree build_class_init (tree, tree);
--- gcc-4.1-4.1.2.orig/debian/patches/pr26885-doc.dpatch
+++ gcc-4.1-4.1.2/debian/patches/pr26885-doc.dpatch
@@ -0,0 +1,112 @@
+#! /bin/sh -e
+
+# DP: Proposed patch for PR driver/26885 (doc files)
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+Date: Tue, 2 May 2006 13:23:54 -0700
+
+gcc/
+
+2006-04-22 H.J. Lu
+
+ PR driver/26885
+ * Makefile.in (GCC_OBJS): New.
+ (OBJS-common): Add opts-common.o.
+ (xgcc$(exeext)): Replace gcc.o with $(GCC_OBJS).
+ (cpp$(exeext)): Likewise.
+ (gcc.o): Also depend on opts.h.
+ (opts-common.o): New.
+
+ * common.opt (gcoff): Add Negative(gdwarf-2).
+ (gdwarf-2): Add Negative(gstabs).
+ (gstabs): Add Negative(gstabs+).
+ (gstabs+): Add Negative(gvms).
+ (gvms): Add Negative(gxcoff).
+ (gxcoff): Add Negative(gxcoff+).
+ (gxcoff+): Add Negative(gcoff).
+ * config/i386/i386.opt (m32): Add Negative(m64).
+ (m64): Add Negative(m32).
+
+ * doc/options.texi: Document the Negative option.
+
+ * gcc.c: Include "opts.h".
+ (main): Call prune_options after expandargv.
+
+ * optc-gen.awk: Generate common declarations for all flag
+ variables in options.c. Output the neg_index field.
+
+ * opts.c (find_opt): Moved to ...
+ * opts-common.c: Here. New file.
+
+ * opts.h (cl_option): Add a neg_index field.
+ (find_opt): New.
+ (prune_options): Likewise.
+
+gcc/cp/
+
+2006-04-22 H.J. Lu
+
+ PR driver/26885
+ * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
+
+gcc/fortran/
+
+2006-04-22 H.J. Lu
+
+ PR driver/26885
+ * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with
+ $(GCC_OBJS).
+
+gcc/java/
+
+2006-04-22 H.J. Lu
+
+ PR driver/26885
+ * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
+ $(GCC_OBJS).
+
+gcc/treelang/
+
+2006-04-22 H.J. Lu
+
+ PR driver/26885
+ * Make-lang.in (gtreelang$(exeext)): Replace gcc.o with
+ $(GCC_OBJS).
+
+--- gcc/doc/options.texi.orig 2006-05-07 13:23:52.294265896 +0200
++++ gcc/doc/options.texi 2006-05-07 13:24:36.553537464 +0200
+@@ -100,6 +100,12 @@
+ ``f'', ``W'' or ``m'' are assumed to have a ``no-'' form unless this
+ property is used.
+
++@item Negative(@var{othername})
++The option will turn off another option @var{othername}, which is the
++the option name with the leading ``-'' removed. This chain action will
++propagate through the @code{Negative} property of the option to be
++turned off.
++
+ @item Joined
+ @itemx Separate
+ The option takes a mandatory argument. @code{Joined} indicates
--- gcc-4.1-4.1.2.orig/debian/patches/m68k-return.dpatch
+++ gcc-4.1-4.1.2/debian/patches/m68k-return.dpatch
@@ -0,0 +1,47 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DPATCH:' are a description of the patch.
+# DP: don't use single return if fp register have to be restored
+# DP: fixes 386864
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+---
+
+ gcc/config/m68k/m68k.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: gcc-4.1/gcc/config/m68k/m68k.c
+===================================================================
+--- gcc-4.1.orig/gcc/config/m68k/m68k.c
++++ gcc-4.1/gcc/config/m68k/m68k.c
+@@ -738,7 +738,7 @@ use_return_insn (void)
+ /* We can output the epilogue as RTL only if no registers need to be
+ restored. */
+ m68k_compute_frame_layout();
+- return current_frame.reg_no ? false : true;
++ return (current_frame.reg_no + current_frame.fpu_no) ? false : true;
+ }
+
+ /* This function generates the assembly code for function exit,
--- gcc-4.1-4.1.2.orig/debian/patches/ada-gnatvsn.dpatch
+++ gcc-4.1-4.1.2/debian/patches/ada-gnatvsn.dpatch
@@ -0,0 +1,57 @@
+#! /bin/sh -e
+
+# DP: proposed patch for PR ada/27194.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- orig/gnatvsn.ads 2005-11-15 14:59:02.000000000 +0100
++++ gcc/ada/gnatvsn.ads 2006-04-18 10:00:37.010002000 +0200
+@@ -67,7 +67,7 @@
+ -- GAP
+ -- GNAT Academic Program, similar to Public.
+
+- Ver_Len_Max : constant := 32;
++ Ver_Len_Max : constant := 64;
+ -- Longest possible length for Gnat_Version_String in this or any
+ -- other version of GNAT. This is used by the binder to establish
+ -- space to store any possible version string value for checks. This
+--- orig/gnatvsn.adb 2005-07-01 03:29:17.000000000 +0200
++++ gcc/ada/gnatvsn.adb 2006-04-18 10:00:05.100002000 +0200
+@@ -54,12 +54,13 @@
+ -------------------------
+
+ function Gnat_Version_String return String is
+- NUL_Pos : Positive := 1;
++ NUL_Pos : Positive := Version_String'Last;
+ begin
+- loop
+- exit when Version_String (NUL_Pos) = ASCII.NUL;
+-
+- NUL_Pos := NUL_Pos + 1;
++ for J in Version_String'Range loop
++ if Version_String (J) = ASCII.NUL then
++ NUL_Pos := J;
++ exit;
++ end if;
+ end loop;
+
+ return Version_String (1 .. NUL_Pos - 1);
--- gcc-4.1-4.1.2.orig/debian/patches/m68k-java.dpatch
+++ gcc-4.1-4.1.2/debian/patches/m68k-java.dpatch
@@ -0,0 +1,188 @@
+#! /bin/sh -e
+
+# All lines beginning with `# DPATCH:' are a description of the patch.
+# DP: java support for m68k
+# DP: - add m68k info to configure files
+# DP: - add sysdep/m68k/locks.h
+# DP: - boehm.c: don't use bitmap as gc_descr if pointer is misaligned
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p1 < $0
+ cd ${dir} && touch libjava/configure
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+---
+
+ gcc/java/boehm.c | 8 ++++
+ libjava/configure | 3 +
+ libjava/configure.ac | 3 +
+ libjava/configure.host | 5 +++
+ libjava/sysdep/m68k/locks.h | 72 ++++++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 91 insertions(+)
+
+Index: gcc-4.1/libjava/configure.host
+===================================================================
+--- gcc-4.1.orig/libjava/configure.host
++++ gcc-4.1/libjava/configure.host
+@@ -132,6 +132,10 @@ case "${host}" in
+ libgcj_interpreter=yes
+ enable_hash_synchronization_default=no
+ ;;
++ m68k-*)
++ sysdeps_dir=m68k
++ libgcj_interpreter=yes
++ ;;
+ powerpc64*-*)
+ sysdeps_dir=powerpc
+ libgcj_interpreter=yes
+@@ -184,6 +188,7 @@ case "${host}" in
+ ia64-* | \
+ x86_64*-linux* | \
+ hppa*-linux* | \
++ m68k*-linux* | \
+ sh-linux* | sh[34]*-linux*)
+ can_unwind_signal=yes
+ libgcj_ld_symbolic='-Wl,-Bsymbolic'
+Index: gcc-4.1/libjava/configure.ac
+===================================================================
+--- gcc-4.1.orig/libjava/configure.ac
++++ gcc-4.1/libjava/configure.ac
+@@ -1415,6 +1415,9 @@ case "${host}" in
+ mips*-*-linux*)
+ SIGNAL_HANDLER=include/mips-signal.h
+ ;;
++ m68*-*-linux*)
++ SIGNAL_HANDLER=include/dwarf2-signal.h
++ ;;
+ *-*-darwin*)
+ SIGNAL_HANDLER=include/darwin-signal.h
+ ;;
+Index: gcc-4.1/libjava/configure
+===================================================================
+--- gcc-4.1.orig/libjava/configure
++++ gcc-4.1/libjava/configure
+@@ -16718,6 +16718,9 @@ case "${host}" in
+ mips*-*-linux*)
+ SIGNAL_HANDLER=include/mips-signal.h
+ ;;
++ m68*-*-linux*)
++ SIGNAL_HANDLER=include/dwarf2-signal.h
++ ;;
+ *-*-darwin*)
+ SIGNAL_HANDLER=include/darwin-signal.h
+ ;;
+Index: gcc-4.1/libjava/sysdep/m68k/locks.h
+===================================================================
+--- /dev/null
++++ gcc-4.1/libjava/sysdep/m68k/locks.h
+@@ -0,0 +1,72 @@
++// locks.h - Thread synchronization primitives. m68k implementation.
++
++/* Copyright (C) 2006 Free Software Foundation
++
++ This file is part of libgcj.
++
++This software is copyrighted work licensed under the terms of the
++Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
++details. */
++
++#ifndef __SYSDEP_LOCKS_H__
++#define __SYSDEP_LOCKS_H__
++
++/* Integer type big enough for object address. */
++typedef size_t obj_addr_t __attribute__ ((aligned (4)));
++
++// Atomically replace *addr by new_val if it was initially equal to old.
++// Return true if the comparison succeeded.
++// Assumed to have acquire semantics, i.e. later memory operations
++// cannot execute before the compare_and_swap finishes.
++static inline bool
++compare_and_swap(volatile obj_addr_t *addr,
++ obj_addr_t old, obj_addr_t new_val)
++{
++ char result;
++ __asm__ __volatile__("cas.l %2,%3,%0; seq %1"
++ : "+m" (*addr), "=d" (result), "+d" (old)
++ : "d" (new_val)
++ : "memory");
++ return (bool) result;
++}
++
++// Set *addr to new_val with release semantics, i.e. making sure
++// that prior loads and stores complete before this
++// assignment.
++// On m68k, the hardware shouldn't reorder reads and writes,
++// so we just have to convince gcc not to do it either.
++static inline void
++release_set(volatile obj_addr_t *addr, obj_addr_t new_val)
++{
++ __asm__ __volatile__(" " : : : "memory");
++ *(addr) = new_val;
++}
++
++// Compare_and_swap with release semantics instead of acquire semantics.
++// On many architecture, the operation makes both guarantees, so the
++// implementation can be the same.
++static inline bool
++compare_and_swap_release(volatile obj_addr_t *addr,
++ obj_addr_t old,
++ obj_addr_t new_val)
++{
++ return compare_and_swap(addr, old, new_val);
++}
++
++// Ensure that subsequent instructions do not execute on stale
++// data that was loaded from memory before the barrier.
++// On m68k, the hardware ensures that reads are properly ordered.
++static inline void
++read_barrier(void)
++{
++}
++
++// Ensure that prior stores to memory are completed with respect to other
++// processors.
++static inline void
++write_barrier(void)
++{
++ // m68k does not reorder writes. We just need to ensure that gcc also doesn't.
++ __asm__ __volatile__(" " : : : "memory");
++}
++#endif
+Index: gcc-4.1/gcc/java/boehm.c
+===================================================================
+--- gcc-4.1.orig/gcc/java/boehm.c
++++ gcc-4.1/gcc/java/boehm.c
+@@ -90,6 +90,14 @@ mark_reference_fields (tree field,
+
+ offset = int_byte_position (field);
+ size_bytes = int_size_in_bytes (TREE_TYPE (field));
++
++ if (offset % (POINTER_SIZE / BITS_PER_UNIT))
++ {
++ *all_bits_set = -1;
++ *pointer_after_end = 1;
++ break;
++ }
++
+ if (JREFERENCE_TYPE_P (TREE_TYPE (field))
+ /* An `object' of type gnu.gcj.RawData is actually non-Java
+ data. */
--- gcc-4.1-4.1.2.orig/debian/patches/powerpc-biarch.dpatch
+++ gcc-4.1-4.1.2/debian/patches/powerpc-biarch.dpatch
@@ -0,0 +1,47 @@
+#! /bin/sh -e
+
+# DP: enable biarch for 32 bit compiler
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/config/rs6000/t-linux64.orig 2004-03-17 16:15:32.000000000 +0100
++++ gcc/config/rs6000/t-linux64 2005-10-01 00:40:20.279274880 +0200
+@@ -8,13 +8,13 @@
+
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
+
+-MULTILIB_OPTIONS = m64/m32 msoft-float
+-MULTILIB_DIRNAMES = 64 32 nof
++MULTILIB_OPTIONS = m64/m32
++MULTILIB_DIRNAMES = 64 32
+ MULTILIB_EXTRA_OPTS = fPIC mstrict-align
+-MULTILIB_EXCEPTIONS = m64/msoft-float
+-MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES = ../lib64 ../lib nof
+-MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
++MULTILIB_EXCEPTIONS =
++MULTILIB_EXCLUSIONS =
++MULTILIB_OSDIRNAMES = ../lib64 ../lib
++MULTILIB_MATCHES =
+
+ # We want fine grained libraries, so use the new code to build the
+ # floating point emulation libraries.
--- gcc-4.1-4.1.2.orig/debian/patches/netbsd-archs-gcc.dpatch
+++ gcc-4.1-4.1.2/debian/patches/netbsd-archs-gcc.dpatch
@@ -0,0 +1,38 @@
+#! /bin/sh -e
+
+# DP: Arch-specific changes to gcc.config
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+diff -urN gcc/config.gcc src/gcc/config.gcc
+--- gcc/config.gcc 2003-03-02 07:39:03.000000000 +0000
++++ gcc/config.gcc 2003-04-24 06:02:55.000000000 +0000
+@@ -1127,6 +1127,9 @@
+ x86_64-*-freebsd*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h ${fbsd_tm_file} i386/x86-64.h i386/freebsd.h i386/freebsd64.h"
+ ;;
++i[34567]86-*-netbsdelf*-gnu*)
++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd-gnu.h netbsd-elf-gnu.h i386/netbsd-elf.h"
++ ;;
+ i[34567]86-*-netbsdelf*)
+ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h netbsd.h netbsd-elf.h i386/netbsd-elf.h"
+ ;;
--- gcc-4.1-4.1.2.orig/debian/patches/hurd-changes.dpatch
+++ gcc-4.1-4.1.2/debian/patches/hurd-changes.dpatch
@@ -0,0 +1,90 @@
+#! /bin/sh -e
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Traditional GNU systems don't have a /usr directory. However, Debian
+# DP: systems do, and we support both having a /usr -> . symlink, and having a
+# DP: /usr directory like the other ports. So this patch should NOT go
+# DP: upstream.
+# DP:
+# DP: Define MAXPATHLEN and PATH_MAX.
+
+--- gcc/ada/adaint.c.orig 2005-11-15 14:52:31.000000000 +0100
++++ gcc/ada/adaint.c 2006-12-10 12:28:46.000000000 +0100
+@@ -272,6 +272,10 @@
+ #include
+ #endif
+
++#ifndef MAXPATHLEN
++#define MAXPATHLEN 4096
++#endif
++
+ #ifdef MAXPATHLEN
+ #define GNAT_MAX_PATH_LEN MAXPATHLEN
+ #else
+--- gcc/config/i386/gnu.h.orig 2004-09-08 02:17:19.000000000 +0200
++++ gcc/config/i386/gnu.h 2006-12-10 12:28:45.000000000 +0100
+@@ -17,7 +17,7 @@
+ while (0)
+
+ #undef CPP_SPEC
+-#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE}"
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{bsd:-D_BSD_SOURCE} %{pthread:-D_REENTRANT}"
+
+ #undef CC1_SPEC
+ #define CC1_SPEC "%(cc1_cpu)"
+--- gcc/config/gnu.h.orig 2004-07-05 21:49:20.000000000 +0200
++++ gcc/config/gnu.h 2006-12-10 12:28:45.000000000 +0100
+@@ -6,11 +6,12 @@
+
+ /* Default C library spec. Use -lbsd-compat for gcc -bsd. */
+ #undef LIB_SPEC
+-#define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
++#define LIB_SPEC "%{pthread:-lpthread} %{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+
+ /* Standard include directory. In GNU, "/usr" is a four-letter word. */
+ #undef STANDARD_INCLUDE_DIR
+-#define STANDARD_INCLUDE_DIR "/include"
++/* Overriden for Debian GNU/Hurd. */
++#define STANDARD_INCLUDE_DIR "/usr/include"
+
+ /* The system headers under GNU are C++-aware. */
+ #define NO_IMPLICIT_EXTERN_C
+--- gcc/config/t-gnu.orig 2004-01-10 07:40:24.000000000 +0100
++++ gcc/config/t-gnu 2006-12-10 12:28:45.000000000 +0100
+@@ -1,2 +1,2 @@
+ # In GNU, "/usr" is a four-letter word.
+-NATIVE_SYSTEM_HEADER_DIR = /include
++NATIVE_SYSTEM_HEADER_DIR = /usr/include
+--- gcc/tlink.c.orig 2005-06-25 04:02:01.000000000 +0200
++++ gcc/tlink.c 2006-12-10 12:28:45.000000000 +0100
+@@ -34,6 +34,10 @@
+
+ #define MAX_ITERATIONS 17
+
++#ifndef MAXPATHLEN
++#define MAXPATHLEN 4096
++#endif
++
+ /* Defined in the automatically-generated underscore.c. */
+ extern int prepends_underscore;
+
--- gcc-4.1-4.1.2.orig/debian/patches/reporting.dpatch
+++ gcc-4.1-4.1.2/debian/patches/reporting.dpatch
@@ -0,0 +1,122 @@
+#! /bin/sh -e
+
+# DP: Add Debian URL for bug reporting instructions.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir=$3/
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ if grep -q debian_bug_report_url ${dir}gcc/version.c; then
+ :
+ else
+ echo 'const char debian_bug_report_url[] = "";' >> ${dir}gcc/version.c
+ fi
+ ;;
+ -unpatch)
+ grep -v debian_bug_report_url ${dir}gcc/version.c > ${dir}gcc/version.c.new
+ ${dir}move-if-change ${dir}gcc/version.c.new ${dir}gcc/version.c
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/java/jcf-dump.c.orig 2005-09-05 00:22:28.368267856 +0000
++++ gcc/java/jcf-dump.c 2005-09-05 00:22:44.643793600 +0000
+@@ -921,6 +921,8 @@
+ printf ("\n");
+ printf (_("For bug reporting instructions, please see:\n"
+ "%s.\n"), bug_report_url);
++ printf (_("For Debian GNU/Linux specific bug reporting instructions, please see:\n"
++ "%s.\n"), debian_bug_report_url);
+ exit (0);
+ }
+
+--- gcc/diagnostic.c.orig 2005-09-05 00:22:28.371267400 +0000
++++ gcc/diagnostic.c 2005-09-05 00:22:44.644793448 +0000
+@@ -243,6 +243,8 @@
+ fnotice (stderr, "Please submit a full bug report,\n"
+ "with preprocessed source if appropriate.\n"
+ "See %s for instructions.\n", bug_report_url);
++ fnotice (stderr, "For Debian GNU/Linux specific bug reporting instructions,\n"
++ "see %s.\n", debian_bug_report_url);
+ exit (FATAL_EXIT_CODE);
+
+ case DK_FATAL:
+--- gcc/gcc.c.orig 2005-09-05 00:22:28.378266336 +0000
++++ gcc/gcc.c 2005-09-05 00:24:35.547933608 +0000
+@@ -2872,9 +2872,11 @@
+ fatal ("\
+ Internal error: %s (program %s)\n\
+ Please submit a full bug report.\n\
+-See %s for instructions.",
++See %s for instructions.\n\
++For Debian GNU/Linux specific bug reporting instructions, see\n\
++%s.\n",
+ strsignal (WTERMSIG (status)), commands[i].prog,
+- bug_report_url);
++ bug_report_url, debian_bug_report_url);
+ signal_count++;
+ ret_code = -1;
+ }
+@@ -6359,6 +6361,8 @@
+ {
+ printf (_("\nFor bug reporting instructions, please see:\n"));
+ printf ("%s.\n", bug_report_url);
++ printf ("For Debian GNU/Linux specific bug reporting instructions, please see:\n");
++ printf ("%s.\n", debian_bug_report_url);
+
+ return (0);
+ }
+@@ -6648,6 +6652,8 @@
+ {
+ printf (("\nFor bug reporting instructions, please see:\n"));
+ printf ("%s\n", bug_report_url);
++ printf ("For Debian GNU/Linux specific bug reporting instructions, please see:\n");
++ printf ("%s\n", debian_bug_report_url);
+ }
+
+ return (signal_count != 0 ? 2
+--- gcc/gccbug.in.orig 2005-09-05 00:22:28.381265880 +0000
++++ gcc/gccbug.in 2005-09-05 00:25:56.216670096 +0000
+@@ -25,10 +25,10 @@
+ VERSION=3.113
+
+ # The submitter-id for your site.
+-SUBMITTER=net
++SUBMITTER=net # net-debian
+
+ # The default mail address for PR submissions.
+-GNATS_ADDR=gcc-gnats@gcc.gnu.org
++GNATS_ADDR="gcc-gnats@gcc.gnu.org,debian-gcc@lists.debian.org"
+
+ # The default release for this host.
+ # We have to guess at what program_transform_name might have done.
+--- gcc/gcov.c.orig 2005-09-05 00:22:28.382265728 +0000
++++ gcc/gcov.c 2005-09-05 00:22:44.650792536 +0000
+@@ -402,6 +402,8 @@
+ fnotice (file, " -u, --unconditional-branches Show unconditional branch counts too\n");
+ fnotice (file, "\nFor bug reporting instructions, please see:\n%s.\n",
+ bug_report_url);
++ fnotice (file, "\nFor Debian GNU/Linux specific bug reporting instructions, please see:\n%s.\n",
++ debian_bug_report_url);
+ exit (status);
+ }
+
+--- gcc/version.h.orig 2005-09-05 00:22:28.383265576 +0000
++++ gcc/version.h 2005-09-05 00:22:44.651792384 +0000
+@@ -2,4 +2,5 @@
+ #define GCC_VERSION_H
+ extern const char version_string[];
+ extern const char bug_report_url[];
++extern const char debian_bug_report_url[];
+ #endif /* ! GCC_VERSION_H */
--- gcc-4.1-4.1.2.orig/debian/patches/multiarch-include.dpatch
+++ gcc-4.1-4.1.2/debian/patches/multiarch-include.dpatch
@@ -0,0 +1,138 @@
+#! /bin/sh -e
+
+# DP: biarch-include.dpatch
+# DP:
+# DP: Adds biarch include directories
+# DP: /usr/local/include/-linux-gnu
+# DP: /usr/include/-linux-gnu
+# DP: to the system include paths, depending on 32/64 bit mode.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+Index: gcc/cppdefault.c
+===================================================================
+--- gcc/cppdefault.c (revision 112832)
++++ gcc/cppdefault.c (working copy)
+@@ -60,6 +60,7 @@
+ #endif
+ #ifdef LOCAL_INCLUDE_DIR
+ /* /usr/local/include comes before the fixincluded header files. */
++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
+ #endif
+ #ifdef PREFIX_INCLUDE_DIR
+@@ -83,6 +84,7 @@
+ #endif
+ #ifdef STANDARD_INCLUDE_DIR
+ /* /usr/include comes dead last. */
++ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 },
+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 },
+ #endif
+ { 0, 0, 0, 0, 0, 0 }
+Index: gcc/c-incpath.c
+===================================================================
+--- gcc/c-incpath.c (revision 112832)
++++ gcc/c-incpath.c (working copy)
+@@ -30,6 +30,7 @@
+ #include "intl.h"
+ #include "c-incpath.h"
+ #include "cppdefault.h"
++#include "errors.h"
+
+ /* Windows does not natively support inodes, and neither does MSDOS.
+ Cygwin's emulation can generate non-unique inodes, so don't use it.
+@@ -121,6 +121,31 @@
+ }
+ }
+
++struct multiarch_mapping
++{
++ const char *const multilib;
++ const char *const multiarch;
++};
++
++const struct multiarch_mapping multiarch_mappings[]
++= {
++#include "multiarch.inc"
++ { 0, 0 }
++};
++
++static const char*
++multilib_to_multiarch (const char *imultilib)
++{
++ const struct multiarch_mapping *p;
++
++ for (p = multiarch_mappings; p->multiarch; p++)
++ {
++ if (!strcmp(p->multilib, imultilib ? imultilib : ""))
++ return p->multiarch;
++ }
++ internal_error("no multiarch mapping for multilib (%s)\n", imultilib);
++}
++
+ /* Append the standard include chain defined in cppdefault.c. */
+ static void
+ add_standard_paths (const char *sysroot, const char *iprefix,
+@@ -128,6 +153,7 @@
+ {
+ const struct default_include *p;
+ size_t len;
++ const char *multiarch;
+
+ if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
+ {
+@@ -146,8 +172,15 @@
+ if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
+ {
+ char *str = concat (iprefix, p->fname + len, NULL);
+- if (p->multilib && imultilib)
++ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
++ if (p->multilib == 2)
++ {
++ multiarch = multilib_to_multiarch (imultilib);
++ if (!multiarch)
++ continue;
++ str = concat (str, dir_separator_str, multiarch, NULL);
++ }
+ add_path (str, SYSTEM, p->cxx_aware, false);
+ }
+ }
+@@ -166,9 +199,17 @@
+ else
+ str = update_path (p->fname, p->component);
+
+- if (p->multilib && imultilib)
++ if (p->multilib == 1 && imultilib)
+ str = concat (str, dir_separator_str, imultilib, NULL);
+
++ if (p->multilib == 2)
++ {
++ multiarch = multilib_to_multiarch (imultilib);
++ if (!multiarch)
++ continue;
++ str = concat (str, dir_separator_str, multiarch, NULL);
++ }
++
+ add_path (str, SYSTEM, p->cxx_aware, false);
+ }
+ }
--- gcc-4.1-4.1.2.orig/debian/patches/svn-updates.dpatch
+++ gcc-4.1-4.1.2/debian/patches/svn-updates.dpatch
@@ -0,0 +1,36255 @@
+#! /bin/sh -e
+
+# DP: SVN updates from the 4.1 branch upto 20070423.
+
+last_updated()
+{
+ cat > ${dir}LAST_UPDATED <&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ touch ${dir}libjava/testsuite/libjava.jni/PR28178.out
+ last_updated
+ #cd ${dir}gcc && autoconf
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ #rm ${dir}gcc/configure
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# diff -urN --exclude=.svn gcc_4_1_2_release gcc-4_1-branch
+# svn diff svn://gcc.gnu.org/svn/gcc/tags/gcc_4_1_2_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_1-branch
+
+Index: gcc/tree-vrp.c
+===================================================================
+--- gcc/tree-vrp.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/tree-vrp.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -106,6 +106,10 @@
+
+ gcc_assert (TREE_CODE (arg) == PARM_DECL && POINTER_TYPE_P (TREE_TYPE (arg)));
+
++ /* The static chain decl is always non null. */
++ if (arg == cfun->static_chain_decl)
++ return true;
++
+ fntype = TREE_TYPE (current_function_decl);
+ attrs = lookup_attribute ("nonnull", TYPE_ATTRIBUTES (fntype));
+
+Index: gcc/DATESTAMP
+===================================================================
+--- gcc/DATESTAMP (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/DATESTAMP (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1 +1 @@
+-20070214
++20070423
+Index: gcc/loop.c
+===================================================================
+--- gcc/loop.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/loop.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -6493,13 +6493,13 @@
+ v->ignore = 1;
+ bl->all_reduced = 0;
+ }
+- else if (!v->always_computable
++ else if (! v->always_executed
+ && (may_trap_or_fault_p (v->add_val)
+ || may_trap_or_fault_p (v->mult_val)))
+ {
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+- "giv of insn %d: not always computable.\n",
++ "giv of insn %d: not always executed.\n",
+ INSN_UID (v->insn));
+ v->ignore = 1;
+ bl->all_reduced = 0;
+@@ -8700,6 +8700,10 @@
+ {
+ rtx comb, ret;
+
++ /* We cannot combine givs that are not always in sync. */
++ if (!g1->always_executed || !g2->always_executed)
++ return NULL_RTX;
++
+ /* With the introduction of ext dependent givs, we must care for modes.
+ G2 must not use a wider mode than G1. */
+ if (GET_MODE_SIZE (g1->mode) < GET_MODE_SIZE (g2->mode))
+@@ -8708,6 +8712,7 @@
+ ret = comb = express_from (g1, g2);
+ if (comb == NULL_RTX)
+ return NULL_RTX;
++
+ if (g1->mode != g2->mode)
+ ret = gen_lowpart (g2->mode, comb);
+
+@@ -8718,9 +8723,7 @@
+ combination to be the other way round. */
+ if (comb == g1->dest_reg
+ && (g1->giv_type == DEST_REG || g2->giv_type == DEST_ADDR))
+- {
+- return ret;
+- }
++ return ret;
+
+ /* If G2 can be expressed as a function of G1 and that function is valid
+ as an address and no more expensive than using a register for G2,
+Index: gcc/builtins.c
+===================================================================
+--- gcc/builtins.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/builtins.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -9935,6 +9935,7 @@
+ /* Get the destination string and the format specifier. */
+ dest = TREE_VALUE (arglist);
+ fmt = TREE_VALUE (TREE_CHAIN (arglist));
++ arglist = TREE_CHAIN (TREE_CHAIN (arglist));
+
+ /* Check whether the format is a literal string constant. */
+ fmt_str = c_getstr (fmt);
+@@ -9955,6 +9956,10 @@
+ if (!fn)
+ return NULL_TREE;
+
++ /* Don't optimize sprintf (buf, "abc", ptr++). */
++ if (arglist)
++ return NULL_TREE;
++
+ /* Convert sprintf (str, fmt) into strcpy (str, fmt) when
+ 'format' is known to contain no % formats. */
+ arglist = build_tree_list (NULL_TREE, fmt);
+@@ -9973,8 +9978,12 @@
+ if (!fn)
+ return NULL_TREE;
+
++ /* Don't crash on sprintf (str1, "%s"). */
++ if (!arglist)
++ return NULL_TREE;
++
+ /* Convert sprintf (str1, "%s", str2) into strcpy (str1, str2). */
+- orig = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist)));
++ orig = TREE_VALUE (arglist);
+ arglist = build_tree_list (NULL_TREE, orig);
+ arglist = tree_cons (NULL_TREE, dest, arglist);
+ if (!ignored)
+Index: gcc/fold-const.c
+===================================================================
+--- gcc/fold-const.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/fold-const.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,6 +1,7 @@
+ /* Fold a constant sub-tree into a single node for C-compiler
+ Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
++ Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+@@ -7551,6 +7552,7 @@
+ {
+ tree var0, con0, lit0, minus_lit0;
+ tree var1, con1, lit1, minus_lit1;
++ bool ok = true;
+
+ /* Split both trees into variables, constants, and literals. Then
+ associate each group together, the constants with literals,
+@@ -7561,12 +7563,33 @@
+ var1 = split_tree (arg1, code, &con1, &lit1, &minus_lit1,
+ code == MINUS_EXPR);
+
++ /* With undefined overflow we can only associate constants
++ with one variable. */
++ if ((POINTER_TYPE_P (type)
++ || (INTEGRAL_TYPE_P (type)
++ && !(TYPE_UNSIGNED (type) || flag_wrapv)))
++ && var0 && var1)
++ {
++ tree tmp0 = var0;
++ tree tmp1 = var1;
++
++ if (TREE_CODE (tmp0) == NEGATE_EXPR)
++ tmp0 = TREE_OPERAND (tmp0, 0);
++ if (TREE_CODE (tmp1) == NEGATE_EXPR)
++ tmp1 = TREE_OPERAND (tmp1, 0);
++ /* The only case we can still associate with two variables
++ is if they are the same, modulo negation. */
++ if (!operand_equal_p (tmp0, tmp1, 0))
++ ok = false;
++ }
++
+ /* Only do something if we found more than two objects. Otherwise,
+ nothing has changed and we risk infinite recursion. */
+- if (2 < ((var0 != 0) + (var1 != 0)
+- + (con0 != 0) + (con1 != 0)
+- + (lit0 != 0) + (lit1 != 0)
+- + (minus_lit0 != 0) + (minus_lit1 != 0)))
++ if (ok
++ && (2 < ((var0 != 0) + (var1 != 0)
++ + (con0 != 0) + (con1 != 0)
++ + (lit0 != 0) + (lit1 != 0)
++ + (minus_lit0 != 0) + (minus_lit1 != 0))))
+ {
+ /* Recombine MINUS_EXPR operands by using PLUS_EXPR. */
+ if (code == MINUS_EXPR)
+@@ -8068,6 +8091,53 @@
+ return omit_one_operand (type, t1, arg0);
+ }
+
++ /* Canonicalize (X & C1) | C2. */
++ if (TREE_CODE (arg0) == BIT_AND_EXPR
++ && TREE_CODE (arg1) == INTEGER_CST
++ && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
++ {
++ unsigned HOST_WIDE_INT hi1, lo1, hi2, lo2, mlo, mhi;
++ int width = TYPE_PRECISION (type);
++ hi1 = TREE_INT_CST_HIGH (TREE_OPERAND (arg0, 1));
++ lo1 = TREE_INT_CST_LOW (TREE_OPERAND (arg0, 1));
++ hi2 = TREE_INT_CST_HIGH (arg1);
++ lo2 = TREE_INT_CST_LOW (arg1);
++
++ /* If (C1&C2) == C1, then (X&C1)|C2 becomes (X,C2). */
++ if ((hi1 & hi2) == hi1 && (lo1 & lo2) == lo1)
++ return omit_one_operand (type, arg1, TREE_OPERAND (arg0, 0));
++
++ if (width > HOST_BITS_PER_WIDE_INT)
++ {
++ mhi = (unsigned HOST_WIDE_INT) -1
++ >> (2 * HOST_BITS_PER_WIDE_INT - width);
++ mlo = -1;
++ }
++ else
++ {
++ mhi = 0;
++ mlo = (unsigned HOST_WIDE_INT) -1
++ >> (HOST_BITS_PER_WIDE_INT - width);
++ }
++
++ /* If (C1|C2) == ~0 then (X&C1)|C2 becomes X|C2. */
++ if ((~(hi1 | hi2) & mhi) == 0 && (~(lo1 | lo2) & mlo) == 0)
++ return fold_build2 (BIT_IOR_EXPR, type,
++ TREE_OPERAND (arg0, 0), arg1);
++
++ /* Minimize the number of bits set in C1, i.e. C1 := C1 & ~C2. */
++ hi1 &= mhi;
++ lo1 &= mlo;
++ if ((hi1 & ~hi2) != hi1 || (lo1 & ~lo2) != lo1)
++ return fold_build2 (BIT_IOR_EXPR, type,
++ fold_build2 (BIT_AND_EXPR, type,
++ TREE_OPERAND (arg0, 0),
++ build_int_cst_wide (type,
++ lo1 & ~lo2,
++ hi1 & ~hi2)),
++ arg1);
++ }
++
+ t1 = distribute_bit_expr (code, type, arg0, arg1);
+ if (t1 != NULL_TREE)
+ return t1;
+@@ -8210,6 +8280,16 @@
+ && operand_equal_p (arg0, TREE_OPERAND (arg1, 0), 0))
+ return omit_one_operand (type, integer_zero_node, arg0);
+
++ /* Canonicalize (X | C1) & C2 as (X & C2) | (C1 & C2). */
++ if (TREE_CODE (arg0) == BIT_IOR_EXPR
++ && TREE_CODE (arg1) == INTEGER_CST
++ && TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST)
++ return fold_build2 (BIT_IOR_EXPR, type,
++ fold_build2 (BIT_AND_EXPR, type,
++ TREE_OPERAND (arg0, 0), arg1),
++ fold_build2 (BIT_AND_EXPR, type,
++ TREE_OPERAND (arg0, 1), arg1));
++
+ t1 = distribute_bit_expr (code, type, arg0, arg1);
+ if (t1 != NULL_TREE)
+ return t1;
+@@ -9279,13 +9359,13 @@
+ return omit_one_operand (type, integer_zero_node, arg0);
+
+ case GE_EXPR:
+- return fold_build2 (EQ_EXPR, type, arg0, arg1);
++ return fold_build2 (EQ_EXPR, type, op0, op1);
+
+ case LE_EXPR:
+ return omit_one_operand (type, integer_one_node, arg0);
+
+ case LT_EXPR:
+- return fold_build2 (NE_EXPR, type, arg0, arg1);
++ return fold_build2 (NE_EXPR, type, op0, op1);
+
+ /* The GE_EXPR and LT_EXPR cases above are not normally
+ reached because of previous transformations. */
+@@ -9300,10 +9380,14 @@
+ {
+ case GT_EXPR:
+ arg1 = const_binop (PLUS_EXPR, arg1, integer_one_node, 0);
+- return fold_build2 (EQ_EXPR, type, arg0, arg1);
++ return fold_build2 (EQ_EXPR, type,
++ fold_convert (TREE_TYPE (arg1), arg0),
++ arg1);
+ case LE_EXPR:
+ arg1 = const_binop (PLUS_EXPR, arg1, integer_one_node, 0);
+- return fold_build2 (NE_EXPR, type, arg0, arg1);
++ return fold_build2 (NE_EXPR, type,
++ fold_convert (TREE_TYPE (arg1), arg0),
++ arg1);
+ default:
+ break;
+ }
+@@ -9316,7 +9400,7 @@
+ return omit_one_operand (type, integer_zero_node, arg0);
+
+ case LE_EXPR:
+- return fold_build2 (EQ_EXPR, type, arg0, arg1);
++ return fold_build2 (EQ_EXPR, type, op0, op1);
+
+ case GE_EXPR:
+ return omit_one_operand (type, integer_one_node, arg0);
+@@ -9334,10 +9418,14 @@
+ {
+ case GE_EXPR:
+ arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
+- return fold_build2 (NE_EXPR, type, arg0, arg1);
++ return fold_build2 (NE_EXPR, type,
++ fold_convert (TREE_TYPE (arg1), arg0),
++ arg1);
+ case LT_EXPR:
+ arg1 = const_binop (MINUS_EXPR, arg1, integer_one_node, 0);
+- return fold_build2 (EQ_EXPR, type, arg0, arg1);
++ return fold_build2 (EQ_EXPR, type,
++ fold_convert (TREE_TYPE (arg1), arg0),
++ arg1);
+ default:
+ break;
+ }
+@@ -9353,12 +9441,11 @@
+ and X >= signed_max+1 because previous transformations. */
+ if (code == LE_EXPR || code == GT_EXPR)
+ {
+- tree st0, st1;
+- st0 = lang_hooks.types.signed_type (TREE_TYPE (arg0));
+- st1 = lang_hooks.types.signed_type (TREE_TYPE (arg1));
+- return fold_build2 (code == LE_EXPR ? GE_EXPR: LT_EXPR,
+- type, fold_convert (st0, arg0),
+- build_int_cst (st1, 0));
++ tree st;
++ st = lang_hooks.types.signed_type (TREE_TYPE (arg1));
++ return fold_build2 (code == LE_EXPR ? GE_EXPR : LT_EXPR,
++ type, fold_convert (st, arg0),
++ build_int_cst (st, 0));
+ }
+ }
+ }
+@@ -11491,6 +11578,23 @@
+ return constant_boolean_node (real_compare (code, c0, c1), type);
+ }
+
++ /* Handle equality/inequality of complex constants. */
++ if (TREE_CODE (op0) == COMPLEX_CST && TREE_CODE (op1) == COMPLEX_CST)
++ {
++ tree rcond = fold_relational_const (code, type,
++ TREE_REALPART (op0),
++ TREE_REALPART (op1));
++ tree icond = fold_relational_const (code, type,
++ TREE_IMAGPART (op0),
++ TREE_IMAGPART (op1));
++ if (code == EQ_EXPR)
++ return fold_build2 (TRUTH_ANDIF_EXPR, type, rcond, icond);
++ else if (code == NE_EXPR)
++ return fold_build2 (TRUTH_ORIF_EXPR, type, rcond, icond);
++ else
++ return NULL_TREE;
++ }
++
+ /* From here on we only handle LT, LE, GT, GE, EQ and NE.
+
+ To compute GT, swap the arguments and do LT.
+Index: gcc/params.h
+===================================================================
+--- gcc/params.h (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/params.h (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -147,4 +147,6 @@
+ PARAM_VALUE (PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO)
+ #define MAX_FIELDS_FOR_FIELD_SENSITIVE \
+ ((size_t) PARAM_VALUE (PARAM_MAX_FIELDS_FOR_FIELD_SENSITIVE))
++#define MAX_SCHED_READY_INSNS \
++ PARAM_VALUE (PARAM_MAX_SCHED_READY_INSNS)
+ #endif /* ! GCC_PARAMS_H */
+Index: gcc/c-cppbuiltin.c
+===================================================================
+--- gcc/c-cppbuiltin.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/c-cppbuiltin.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -393,6 +393,8 @@
+ /* Misc. */
+ builtin_define_with_value ("__VERSION__", version_string, 1);
+
++ cpp_define (pfile, "__GNUC_GNU_INLINE__");
++
+ /* Definitions for LP64 model. */
+ if (TYPE_PRECISION (long_integer_type_node) == 64
+ && POINTER_SIZE == 64
+Index: gcc/DEV-PHASE
+===================================================================
+--- gcc/DEV-PHASE (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/DEV-PHASE (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1 @@
++prerelease
+Index: gcc/ChangeLog
+===================================================================
+--- gcc/ChangeLog (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/ChangeLog (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,3 +1,394 @@
++2007-04-22 Andrew Pinski
++
++ PR middle-end/31448
++ * expr.c (reduce_to_bit_field_precision): Handle
++ CONST_INT rtx's.
++
++2007-04-20 Richard Henderson
++
++ PR target/28623
++ * config/alpha/alpha.c (get_unaligned_address): Remove extra_offset
++ argument; update all callers.
++ (get_unaligned_offset): New.
++ * config/alpha/alpha.md (extendqidi2, extendhidi2): Don't use
++ get_unaligned_address, just pass on the address directly.
++ (unaligned_extendqidi): Use gen_lowpart instead of open-coding
++ the subreg in the helper patterns.
++ (unaligned_extendqidi_le): Use get_unaligned_offset.
++ (unaligned_extendqidi_be, unaligned_extendhidi_le): Likewise.
++ (unaligned_extendhidi_be): Likewise.
++ (unaligned_extendhidi): Tidy.
++ * config/alpha/alpha-protos.h: Update.
++
++2007-04-20 Richard Henderson
++
++ * config/alpha/linux.h (CPP_SPEC): Undef before redefine.
++
++2007-04-20 Jakub Jelinek
++
++ * config/i386/i386.c (bdesc_2arg): Use ORDERED rather than UNORDERED
++ for __builtin_ia32_cmpordss.
++
++ PR tree-optimization/31632
++ * fold-const.c (fold_binary): Use op0 and op1 instead of arg0
++ and arg1 for optimizations of comparison against min/max values.
++ Fold arg0 to arg1's type for optimizations of comparison against
++ min+1 and max-1 values.
++
++2007-04-18 Anatoly Sokolov
++
++ * config/avr/avr.c (ptrreg_to_str): Replace error() with
++ output_operand_lossage().
++
++2007-04-17 Anatoly Sokolov
++
++ PR target/30483
++ * config/avr/avr.c (ptrreg_to_str): Replace gcc_unreachable() with
++ error().
++
++2007-04-16 Matthias Klose
++
++ * config/alpha/linux.h (CPP_SPEC): Define.
++ * config/arm/linux-gas.h (SUBTARGET_CPP_SPEC): Extend.
++
++2007-04-16 H.J. Lu
++
++ * Backport from mainline:
++ 2007-04-16 H.J. Lu
++
++ PR target/31582
++ * config/i386/i386.c (ix86_expand_vec_set_builtin): Make a
++ copy of source, pass it to ix86_expand_vector_set and return
++ it as target.
++
++2007-04-14 Andrew Pinski
++
++ PR tree-opt/30045
++ * tree-vrp.c (nonnull_arg_p): Treat the static decl as always
++ non null.
++
++2007-04-14 Andrew Pinski
++
++ PR middle-end/30729
++ * stmt.c (warn_if_unused_value): VA_ARG_EXPR has side
++ effects unknown to this function, return early.
++
++2007-04-14 Andrew Pinski
++
++ PR c/31520
++ * c-decl.c (finish_decl): Grab the type of the decl after the call
++ to store_init_value.
++
++2007-04-07 Anatoly Sokolov
++
++ PR target/30289
++ * config/avr/avr.md (*clrmemqi, *clrmemhi): Mark operand 4 as
++ earlyclobber.
++
++2007-04-05 Anatoly Sokolov
++
++ PR target/25448
++ * config/avr/avr.c (avr_handle_fndecl_attribute): Use the
++ DECL_ASSEMBLER_NAME, not the DECL_NAME.
++
++2007-04-04 Richard Henderson
++
++ PR target/31361
++ * config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove
++ v8hi_ftype_v8hi_v2di, v4si_ftype_v4si_v2di. Use like-types for
++ the variable shift builtins.
++ (ix86_expand_builtin): Properly expand the variable shift builtins.
++ * config/i386/sse.md (ashr3, lshr3, ashl3): Make
++ operand 2 be TImode.
++ * config/i386/emmintrin.h (_mm_slli_epi16, _mm_slli_epi32,
++ _mm_slli_epi64, _mm_srai_epi16, _mm_srai_epi32, _mm_srli_epi16,
++ _mm_srli_epi32, _mm_srli_epi64): Turn into macros.
++ (_mm_srli_si128, _mm_srli_si128): Fix disabled inline versions.
++ (_mm_sll_epi16, _mm_sll_epi32, _mm_sll_epi64, _mm_sra_epi16,
++ _mm_sra_epi32, _mm_srl_epi16, _mm_srl_epi32, _mm_srl_epi64): Use
++ two-vector shift builtins.
++
++2007-04-02 Anatoly Sokolov
++
++ PR target/31137
++ * config/avr/avr.c (avr_rtx_costs): Add missing 'break' statements.
++
++2007-04-02 H.J. Lu
++
++ * Backport from mainline:
++ 2007-03-28 Grigory Zagorodnev
++
++ PR target/31380
++ * config/i386/sse.md (uminv16qi3): Use UMIN instead of UMAX.
++
++2007-03-30 Anatoly Sokolov
++
++ * config/avr/avr.c (avr_override_options): Clear
++ 'flag_delete_null_pointer_checks'.
++
++2007-03-21 Richard Henderson
++
++ PR target/31245
++ * config/i386/emmintrin.h (__m128i, __m128d): Mark may_alias.
++ * config/i386/mmintrin.h (__m64): Likewise.
++ * config/i386/xmmintrin.h (__m128): Likewise.
++
++2007-03-19 Seongbae Park
++
++ PR tree-optimization/30590
++ * tree-nrv.c (tree_nrv): Check for the partial update
++ of the return value.
++
++2007-03-19 Jeff Law
++
++ * tree-cfg.c (find_taken_edge): Tighten conditions for
++ optimizing computed gotos.
++
++2007-03-19 Brooks Moses
++
++ * doc/extend.texi: Edit "gnu_inline" documentation.
++ * doc/invoke.texi: Edit "-fgnu89-inline" documentation.
++
++2007-03-19 Ian Lance Taylor
++
++ * c.opt (fgnu89-inline): New option.
++ * c-opts.c (c_common_post_options): Warn about -fno-gnu89-inline.
++ * c-common.c (c_common_attributes): Add gnu_inline attribyte.
++ (handle_gnu_inline_attribute): New static function.
++ * c-cppbuiltin.c (c_cpp_builtins): Define __GNUC_GNU_INLINE__.
++ * doc/invoke.texi (Option Summary): Mention -fgnu89-inline.
++ (C Dialect Options): Document -fgnu89-inline.
++ * doc/extend.texi (Function Attributes): Document gnu_inline.
++ (Inline): Mention that C99 inline will be implemented in 4.3.
++ Refer to ways to get the old handling.
++ * doc/cpp.texi (Common Predefined Macros): Document
++ __GNUC_GNU_INLINE__ and __GNUC_STDC_INLINE__.
++
++2007-03-17 Alexandre Oliva
++
++ PR debug/29906
++ * dwarf2out.c (force_type_die): Adjust comment.
++ (dwarf2out_imported_module_or_decl): Handle base AT_import types.
++
++2007-03-16 John David Anglin
++
++ * pa.c (attr_length_call): Partially revert change of 2007-03-09.
++ (output_call): Likewise.
++
++2007-03-15 Richard Guenther
++
++ Backport from mainline:
++ 2007-02-28 Richard Guenther
++
++ PR middle-end/30364
++ * fold-const.c (fold_binary): Do not associate expressions
++ with more than one variable for integer types that do not wrap.
++
++2007-03-13 John David Anglin
++
++ PR target/31123
++ * pa.md (vdepi_ior): Don't allow zero length deposit. Likewise for
++ two unamed patterns.
++
++2007-03-12 Roger Sayle
++ Andrew Pinski
++
++ PR middle-end/30433
++ * fold-const.c (fold_relational_const): Add back compile-time
++ evaluation of complex constant equality/inequality comparisons.
++
++2007-03-12 Richard Henderson
++
++ PR target/26090
++ * config/alpha/alpha.c (alpha_elf_select_section): New.
++ (alpha_elf_unique_section, alpha_elf_section_type_flags): New.
++ (alpha_elf_select_rtx_section): Force flag_pic true.
++ (TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
++ (TARGET_SECTION_TYPE_FLAGS): New.
++
++2007-03-12 Ira Rosen
++
++ PR tree-optimization/29925
++ * tree-data-ref.c (analyze_offset): Add a return value (bool) to
++ indicate success/failure of the analysis. Add negation to subtrahend
++ in case of subtraction. Fail if both operands contain constants.
++ (create_data_ref): Fail if analyze_offset fails.
++
++2007-03-09 John David Anglin
++
++ * pa.c (attr_length_call): Revise condition for long pc-relative branch.
++ (output_call): Use "LONG_PIC_SDIFF" instruction sequence for long local
++ calls on the SOM target. Don't use "LONG_PIC_PCREL" call sequence on
++ SOM target.
++
++2007-03-09 Alexandre Oliva
++
++ PR rtl-optimization/30643
++ * cse.c (cse_insn): Recompute dest_hash after insert_regs for
++ dest_addr_elt.
++
++2007-03-08 Andreas Schwab
++
++ * c-common.c (fold_offsetof_1): Remove extra argument in recursive
++ call.
++
++2007-03-08 Volker Reichelt
++
++ PR c++/30852
++ * c-common.c (fold_offsetof_1): Handle COMPOUND_EXPR.
++
++2007-03-07 Richard Henderson
++
++ PR target/30848
++ * reg-stack.c (emit_swap_insn): If a malformed asm was seen,
++ silently fix up the stack in the case of a missing register.
++
++2007-03-06 Kaveh R. Ghazi
++
++ * convert.c (convert_to_integer): Fix nearbyint/rint -> *lrint
++ conversion.
++
++2007-03-05 John David Anglin
++
++ * pa.md: In unamed move patterns, disparge copies between general
++ and floating point registers using '?' modifier. Don't include 'f'
++ constraint for register preferences in DImode, SImode, HImode and
++ QImode patterns. Likewise for 'r' in DFmode and SFmode patterns.
++ Remove constraints for copies between general and floating registers
++ in soft-float DFmode pattern.
++ (movdf): Fail if operand1 is a CONST_DOUBLE and operand0 is a hard
++ floating register.
++ (movsf): Likewise.
++
++2007-02-27 John David Anglin
++
++ * pa/predicates.md (move_src_operand): Allow zero for mode.
++ * pa/pa.md: Fix constraints for zero CONST_DOUBLE in 64-bit DFmode
++ move pattern.
++
++2007-02-27 Eric Botcazou
++
++ PR rtl-optimization/30931
++ * loop.c (combine_givs_p): Return false if either GIV is not
++ always executed.
++
++2007-02-21 Ira Rosen
++
++ * Makefile.in (tree-ssa-alias.o): Depend on pointer-set.h.
++
++2007-02-20 Ira Rosen
++
++ * tree-ssa-alias.c: Include pointer-set.h.
++ (may_aliases_intersect): Use the correct type (varray) for
++ may_aliases sets.
++
++2007-02-18 Kaz Kojima
++
++ Backport from mainline.
++ PR rtl-optimization/29599
++ * reload1.c (eliminate_regs_in_insn): Take the destination
++ mode into account when computing the offset.
++
++2007-02-18 Roger Sayle
++
++ Backport from mainline.
++ PR middle-end/24427
++ PR rtl-optimization/28173
++ * fold-const.c (fold_binary) : Transform (X&C1)|C2
++ into (X,C2) if C1 is a subset of the bits of C2. Transform
++ (X&C1)|C2 into X|C2 if C1|C2 == ~0. Canonicalize (X&C1)|C2 as
++ (X&(C1&~C2))|C2.
++ : Canonicalize (X|C1)&C2 as (X&C2)|(C1&C2).
++
++2007-02-18 Ira Rosen
++
++ * tree-ssa-alias.c (may_aliases_intersect): New function.
++ * tree-data-ref.c (ptr_ptr_may_alias_p): Call may_aliases_intersect
++ for different tags.
++ * tree-flow.h (may_aliases_intersect): Add function declaration.
++
++2007-02-17 Alexandre Oliva
++
++ PR tree-optimization/30823
++ * tree-sra.c (sra_build_assignment): Drop type-checking assert.
++
++2007-02-16 Guy Martin
++
++ * pa.md (tp_load): Correct mfctl instruction syntax.
++
++2007-02-16 Eric Botcazou
++
++ PR rtl-optimization/30787
++ * loop.c (strength_reduce): Don't reduce giv that is not always
++ executed and where add_val or mult_val can trap.
++
++2007-02-16 Ralf Wildenhues
++
++ PR other/27843
++ * Makefile.in (SYSTEM_HEADER_DIR): Use single quotes to avoid
++ nested double- and backquotes.
++
++2007-02-15 Anatoly Sokolov
++
++ PR target/19087
++ * config/avr/avr.c (DWARF2_ADDR_SIZE): Define.
++
++2007-02-15 Bob Wilson
++
++ * config/xtensa/xtensa.c (constantpool_mem_p): Skip over SUBREGs.
++
++2007-02-15 Alexandre Oliva
++
++ * tree-sra.c (instantiate_missing_elements): Canonicalize
++ bit-field types.
++ (sra_build_assignment): New.
++ (generate_copy_inout, generate_element_copy,
++ generate_element_zero, generate_one_element_init): Use it.
++
++2007-02-15 Alexandre Oliva
++
++ PR debug/30189
++ * dwarf2out.c (modified_type_die): Follow DECL_ORIGINAL_TYPE
++ even if cv-qualification is the same.
++
++2007-02-14 Eric Botcazou
++ Maxim Kuvyrkov
++
++ PR rtl-optimization/28772
++ * Makefile.in (haifa-sched.o): Add dependency on $(PARAMS_H).
++
++ Backport from mainline:
++ 2006-04-13 Eric Botcazou
++
++ * params.def (PARAM_MAX_SCHED_READY_INSNS): New parameter,
++ defaulting to 100.
++ * params.h (MAX_SCHED_READY_INSNS): New macro.
++ * haifa-sched.c: (queue_to_ready): Re-queue insns for the next cycle
++ past MAX_SCHED_READY_INSNS during the first scheduling pass.
++ (schedule_block): Delay insns past MAX_SCHED_READY_INSNS in
++ the ready list for 1 cycle during the first scheduling pass.
++ * doc/invoke.texi (--param): New parameter max-sched-ready-insns.
++
++2007-02-14 Jakub Jelinek
++
++ PR middle-end/30473
++ * builtins.c (fold_builtin_sprintf): Do not attempt to optimize
++ sprintf (str, "%s"). Do not optimize sprintf (str, "nopercent", p++).
++
++2007-02-14 Richard Guenther
++
++ Backport from mainline:
++ 2007-01-30 Richard Guenther
++
++ PR middle-end/30313
++ * passes.c (execute_one_pass): Reset in_gimple_form to not
++ confuse non-unit-at-a-time mode.
++
++2007-02-14 Mark Mitchell
++
++ * DEV-PHASE: Set to prerelease.
++ * BASE-VER: Increment.
++
+ 2007-02-13 Release Manager
+
+ * GCC 4.1.2 released.
+@@ -15,11 +406,11 @@
+
+ 2007-01-29 Josh Conner
+
+- PR middle-end/29683
+- * calls.c (compute_argument_addresses): Set stack and stack_slot
+- for partial args, too.
+- (store_one_arg): Use locate.size.constant for the size when
+- generating a save_area.
++ PR middle-end/29683
++ * calls.c (compute_argument_addresses): Set stack and stack_slot
++ for partial args, too.
++ (store_one_arg): Use locate.size.constant for the size when
++ generating a save_area.
+
+ 2007-01-28 Ralf Wildenhalf Wildenhues
+
+@@ -100,7 +491,7 @@
+
+ 2007-01-05 Richard Guenther
+
+- PR tree-optimization/30212
++ PR tree-optimization/30212
+ * tree-vrp.c (adjust_range_with_scev): Do not adjust invalid
+ ranges by using TYPE_MIN_VALUE or TYPE_MAX_VALUE.
+
+@@ -195,10 +586,10 @@
+ 2006-12-17 Matthias Klose
+
+ PR libstdc++/11953
+- * gcc/config/mips/linux.h (SUBTARGET_CPP_SPEC): Extend.
++ * config/mips/linux.h (SUBTARGET_CPP_SPEC): Extend.
+
+ 2006-12-16 Joseph Myers
+- David Edelsohn
++ David Edelsohn
+
+ PR target/24036
+ * doc/tm.texi (HARD_REGNO_NREGS_HAS_PADDING,
+@@ -276,7 +667,7 @@
+ inside start_sequence / end_sequence pair.
+
+ 2006-11-27 Michael Matz
+- Andreas Krebbel
++ Andreas Krebbel
+
+ PR target/29319
+ * config/s390/predicates.md (larl_operand): Check addend of larl
+@@ -498,7 +889,7 @@
+ 2006-11-02 Eric Botcazou
+
+ * doc/install.texi (sparc-sun-solaris2*): Update GMP/MPFR build
+- instructions.
++
+ (sparc64-sun-solaris2*): Likewise.
+
+ 2006-11-02 Zdenek Dvorak
+@@ -646,7 +1037,7 @@
+ 2006-08-23 Stuart Hastings
+
+ PR target/28825
+- * gcc/config/i386/i386.c (ix86_expand_vector_init_duplicate,
++ * config/i386/i386.c (ix86_expand_vector_init_duplicate,
+ ix86_expand_vector_init_one_nonzero): Remove TARGET_SSE test.
+
+ 2006-10-16 Richard Guenther
+@@ -2091,16 +2482,16 @@
+
+ 2006-04-19 Jeff Law
+
+- PR tree-optimization/26854
++ PR tree-optimization/26854
+ * tree-ssa-dse.c (dse_optimize_stmt): Use has_single_use rather
+ than num_imm_uses.
+ * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Similarly.
+
+ 2006-04-18 Jeff Law
+
+- PR tree-optimization/27087
+- * tree-ssa-copy.c (may_propagate_copy): Test flow sensitive
+- alias information too.
++ PR tree-optimization/27087
++ * tree-ssa-copy.c (may_propagate_copy): Test flow sensitive
++ alias information too.
+
+ 2006-04-18 Andreas Krebbel
+
+@@ -2109,14 +2500,14 @@
+
+ 2006-04-18 Paolo Bonzini
+
+- PR tree-optimization/26643
++ PR tree-optimization/26643
+
+ Backport from mainline:
+ 2006-03-29 Zdenek Dvorak
+
+- PR tree-optimization/26643
+- * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Do not handle
+- bit_field_refs.
++ PR tree-optimization/26643
++ * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Do not handle
++ bit_field_refs.
+
+ 2006-04-18 Paolo Bonzini
+
+@@ -2131,7 +2522,7 @@
+ (insert_reciprocals): Use it.
+
+ 2006-02-02 Paolo Bonzini
+-
++
+ * tree-flow-inline.h (bsi_after_labels): Rewrite, return
+ what its name says.
+ * lambda-code.c (perfect_nestify): Use bsi_insert_before on
+@@ -2155,7 +2546,7 @@
+ to expand fallback builtin function call.
+
+ 2006-04-14 Alexey Starovoytov
+- Eric Botcazou
++ Eric Botcazou
+
+ * config/sparc/sparc.c (emit_and_preserve): Allocate space for the
+ register save area.
+@@ -2229,7 +2620,7 @@
+
+ 2006-04-08 Matthias Klose
+
+- * Makefile.in (unprotoize.o): Same dependencies as for protoize.o.
++ * Makefile.in (unprotoize.o): Same dependencies as for protoize.o.
+
+ 2006-04-07 Richard Guenther
+
+@@ -2287,7 +2678,7 @@
+ * tree-cfg.c (tree_duplicate_sese_region): Do not update SSA.
+ * tree-ssa-loop-ch.c (copy_loop_headers): Count successfully duplicated
+ headers and, if there was any, update SSA at the end.
+-
++
+ Backport from mainline:
+ 2006-03-30 Paolo Bonzini
+
+@@ -2404,7 +2795,7 @@
+ 2006-03-16 Paul Brook
+
+ Backport from mainline.
+- * gcc/config/arm/arm.c (minipool_pad): New.
++ * config/arm/arm.c (minipool_pad): New.
+ (add_minipool_forward_ref): Include pool alignment padding in address
+ calculation.
+ (push_minipool_fix): Set minipool_pad.
+@@ -3072,14 +3463,14 @@
+
+ 2006-01-31 Nathan Sidwell
+
+- * gcc/config/m68k/lb1sf68.asm: Use moveq to load small constants.
++ * config/m68k/lb1sf68.asm: Use moveq to load small constants.
+
+ 2006-01-31 Richard Guenther
+
+ Backport
+ 2006-01-03 Adrian Straetling
+
+- * gcc/builtins.c (get_builtin_sync_mem): New function.
++ * builtins.c (get_builtin_sync_mem): New function.
+ (expand_builtin_sync_operation, expand_builtin_compare_and_swap,
+ expand_builtin_lock_test_and_set, expand_builtin_lock_release):
+ Call get_builtin_sync_mem to generate mem rtx.
+@@ -3250,7 +3641,7 @@
+
+ 2006-01-19 Paul Brook
+
+- * gcc/config/arm/arm.c (arm_compute_func_type): Treat all functions
++ * config/arm/arm.c (arm_compute_func_type): Treat all functions
+ as nothrow when unwinding tables are disabled.
+
+ 2006-01-19 John David Anglin
+@@ -4398,7 +4789,7 @@
+ (_Unwind_Stop_Fn): New typedef.
+ (_Unwind_ForcedUnwind): Declare.
+ (_Unwind_Resume_or_Rethrow): Declare.
+- * gcc/config/arm/libunwind.S (UNWIND_WRAPER): Add nargs
++ * config/arm/libunwind.S (UNWIND_WRAPER): Add nargs
+ argument. Adjust.
+ (_Unwind_Resume_or_Rethrow, _Unwind_ForcedUnwind): New.
+ * config/arm/unwind-arm.c (UCB_FORCED_STOP_FN)
+@@ -5266,8 +5657,8 @@
+ 2005-11-04 Francois-Xavier Coudert
+
+ PR fortran/18452
+- * gcc/c.opt: Add a -lang-fortran option.
+- * gcc/c-opts.c: Add a lang_fortran flag.
++ * c.opt: Add a -lang-fortran option.
++ * c-opts.c: Add a lang_fortran flag.
+ (c_common_init_options): Handling the -lang-fortran option.
+ (c_common_handle_option): Add a case for Fortran options in
+ preprocessing. Remove cases for -ffixed-form and
+Index: gcc/testsuite/gcc.c-torture/execute/20070216-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/20070216-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/execute/20070216-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,23 @@
++/* PR rtl-optimization/30787 */
++/* Testcase by Jakub Jelinek */
++
++struct S
++{
++ int *s;
++};
++
++void test (int x, struct S *y)
++{
++ int i;
++ for (i = 0; i < x; i++)
++ {
++ if (y)
++ y->s[i] += 1;
++ }
++}
++
++int main (void)
++{
++ test (1, (void *) 0);
++ return 0;
++}
+Index: gcc/testsuite/gcc.c-torture/execute/pr31448.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/pr31448.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/execute/pr31448.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,36 @@
++/* PR middle-end/31448, this used to ICE during expand because
++ reduce_to_bit_field_precision was not ready to handle constants. */
++
++typedef struct _st {
++ int iIndex : 24;
++ int iIndex1 : 24;
++} st;
++st *next;
++void g(void)
++{
++ st *next = 0;
++ int nIndx;
++ const static int constreg[] = { 0,};
++ nIndx = 0;
++ next->iIndex = constreg[nIndx];
++}
++void f(void)
++{
++ int nIndx;
++ const static int constreg[] = { 0xFEFEFEFE,};
++ nIndx = 0;
++ next->iIndex = constreg[nIndx];
++ next->iIndex1 = constreg[nIndx];
++}
++int main(void)
++{
++ st a;
++ next = &a;
++ f();
++ if (next->iIndex != 0xFFFEFEFE)
++ __builtin_abort ();
++ if (next->iIndex1 != 0xFFFEFEFE)
++ __builtin_abort ();
++ return 0;
++}
++
+Index: gcc/testsuite/gcc.c-torture/execute/20070201-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/20070201-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/execute/20070201-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,20 @@
++/* PR middle-end/30473 */
++
++extern int sprintf (char *, const char *, ...);
++extern void abort (void);
++
++char *
++foo (char *buf, char *p)
++{
++ sprintf (buf, "abcde", p++);
++ return p;
++}
++
++int
++main (void)
++{
++ char buf[6];
++ if (foo (buf, &buf[2]) != &buf[3])
++ abort ();
++ return 0;
++}
+Index: gcc/testsuite/gcc.c-torture/execute/20070227-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/execute/20070227-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/execute/20070227-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,31 @@
++/* PR rtl-optimization/30931 */
++/* Testcase by Peter Bergner */
++
++struct s
++{
++ int first;
++ int done;
++};
++
++void bug (struct s *p)
++{
++ int i;
++ for (i=0; i < 2; i++)
++ {
++ while (p[i].first && p[i].done)
++ p[i].first = 0;
++ }
++}
++
++int main (void)
++{
++ struct s array[2];
++ array[0].first = 1;
++ array[0].done = 1;
++ array[1].first = 0;
++ array[1].done = 0;
++
++ bug (array);
++
++ return 0;
++}
+Index: gcc/testsuite/gcc.c-torture/compile/pr30433.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/compile/pr30433.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/compile/pr30433.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,2 @@
++int f = (_Complex float)(0.5) == 0.5;
++
+Index: gcc/testsuite/gcc.c-torture/compile/pr30984.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/compile/pr30984.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/compile/pr30984.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,7 @@
++int fs_exec(int ino)
++{
++ void *src = 0;
++ if (ino)
++ src = (void*)0xe000;
++ goto *src;
++}
+Index: gcc/testsuite/gcc.c-torture/compile/20070419-1.c
+===================================================================
+--- gcc/testsuite/gcc.c-torture/compile/20070419-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.c-torture/compile/20070419-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,17 @@
++/* PR tree-optimization/31632 */
++
++struct S
++{
++ long int l;
++ void *m;
++};
++
++int
++foo (struct S *x)
++{
++ unsigned long a;
++ a = x->l;
++ if (a <= ((void *) 0))
++ x->m = 0;
++ return 0;
++}
+Index: gcc/testsuite/gcc.target/i386/ordcmp-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/ordcmp-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.target/i386/ordcmp-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,36 @@
++/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
++/* { dg-options "-O2 -msse2" } */
++/* { dg-final { scan-assembler "cmpordss" } } */
++/* { dg-final { scan-assembler "cmpordps" } } */
++/* { dg-final { scan-assembler "cmpordsd" } } */
++/* { dg-final { scan-assembler "cmpordpd" } } */
++/* { dg-final { scan-assembler-not "cmpunordss" } } */
++/* { dg-final { scan-assembler-not "cmpunordps" } } */
++/* { dg-final { scan-assembler-not "cmpunordsd" } } */
++/* { dg-final { scan-assembler-not "cmpunordpd" } } */
++
++#include
++
++__m128
++f1 (__m128 x, __m128 y)
++{
++ return _mm_cmpord_ss (x, y);
++}
++
++__m128
++f2 (__m128 x, __m128 y)
++{
++ return _mm_cmpord_ps (x, y);
++}
++
++__m128d
++f3 (__m128d x, __m128d y)
++{
++ return _mm_cmpord_sd (x, y);
++}
++
++__m128d
++f4 (__m128d x, __m128d y)
++{
++ return _mm_cmpord_pd (x, y);
++}
+Index: gcc/testsuite/gcc.target/i386/unordcmp-1.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/unordcmp-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.target/i386/unordcmp-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,36 @@
++/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
++/* { dg-options "-O2 -msse2" } */
++/* { dg-final { scan-assembler "cmpunordss" } } */
++/* { dg-final { scan-assembler "cmpunordps" } } */
++/* { dg-final { scan-assembler "cmpunordsd" } } */
++/* { dg-final { scan-assembler "cmpunordpd" } } */
++/* { dg-final { scan-assembler-not "cmpordss" } } */
++/* { dg-final { scan-assembler-not "cmpordps" } } */
++/* { dg-final { scan-assembler-not "cmpordsd" } } */
++/* { dg-final { scan-assembler-not "cmpordpd" } } */
++
++#include
++
++__m128
++f1 (__m128 x, __m128 y)
++{
++ return _mm_cmpunord_ss (x, y);
++}
++
++__m128
++f2 (__m128 x, __m128 y)
++{
++ return _mm_cmpunord_ps (x, y);
++}
++
++__m128d
++f3 (__m128d x, __m128d y)
++{
++ return _mm_cmpunord_sd (x, y);
++}
++
++__m128d
++f4 (__m128d x, __m128d y)
++{
++ return _mm_cmpunord_pd (x, y);
++}
+Index: gcc/testsuite/gcc.target/i386/pr30848.c
+===================================================================
+--- gcc/testsuite/gcc.target/i386/pr30848.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.target/i386/pr30848.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,6 @@
++/* { dg-do compile } */
++
++void foo(double d)
++{
++ __asm__ ("" : "=u" (d)); /* { dg-error "output regs" } */
++}
+Index: gcc/testsuite/gcc.dg/inline-17.c
+===================================================================
+--- gcc/testsuite/gcc.dg/inline-17.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/inline-17.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,24 @@
++/* Test __attribute__((gnu_inline)). */
++/* { dg-do compile } */
++/* { dg-options "-std=c99" } */
++/* { dg-final { scan-assembler "func1" } } */
++/* { dg-final { scan-assembler-not "func2" } } */
++/* { dg-final { scan-assembler "func3" } } */
++/* { dg-final { scan-assembler "func4" } } */
++
++#if __STDC_VERSION__ >= 199901L
++# define inline __attribute__((gnu_inline)) inline
++#endif
++
++extern inline int func1 (void) { return 0; }
++inline int func1 (void) { return 1; }
++
++extern int func2 (void);
++extern inline int func2 (void) { return 2; }
++
++inline int func3 (void);
++inline int func3 (void) { return 3; }
++
++extern int func4 (void);
++extern inline int func4 (void) { return 4; }
++int func4 (void) { return 5; }
+Index: gcc/testsuite/gcc.dg/pr30045.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr30045.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr30045.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-inline" } */
++int f(int *a)
++{
++ int __attribute__((nonnull(1))) g(int *b)
++ {
++ int **c = &a;
++ if (b)
++ return *a + **c;
++ return *b;
++ }
++ if (a)
++ return g(a);
++ return 1;
++}
+Index: gcc/testsuite/gcc.dg/inline-19.c
+===================================================================
+--- gcc/testsuite/gcc.dg/inline-19.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/inline-19.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,28 @@
++/* Test -fgnu89-extern-inline. */
++/* { dg-do compile } */
++/* { dg-options "-fgnu89-inline" } */
++/* { dg-final { scan-assembler "func1" } } */
++/* { dg-final { scan-assembler-not "func2" } } */
++/* { dg-final { scan-assembler "func3" } } */
++/* { dg-final { scan-assembler "func4" } } */
++
++#ifndef __GNUC_GNU_INLINE__
++#error __GNUC_GNU_INLINE__ is not defined
++#endif
++
++#ifdef __GNUC_STDC_INLINE__
++#error __GNUC_STDC_INLINE__ is defined
++#endif
++
++extern inline int func1 (void) { return 0; }
++inline int func1 (void) { return 1; }
++
++extern int func2 (void);
++extern inline int func2 (void) { return 2; }
++
++inline int func3 (void);
++inline int func3 (void) { return 3; }
++
++extern int func4 (void);
++extern inline int func4 (void) { return 4; }
++int func4 (void) { return 5; }
+Index: gcc/testsuite/gcc.dg/inline-21.c
+===================================================================
+--- gcc/testsuite/gcc.dg/inline-21.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/inline-21.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,4 @@
++/* Test -fno-gnu89-inline. */
++/* { dg-do compile } */
++/* { dg-options "-fno-gnu89-inline" } */
++/* { dg-error "is not supported" "" { target *-*-* } 0 } */
+Index: gcc/testsuite/gcc.dg/pr30643.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr30643.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr30643.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,26 @@
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++/* { dg-final { scan-assembler-not "undefined" } } */
++
++/* Make sure we optimize all calls away. */
++
++extern void undefined (void);
++struct s { int a, b; };
++void bar (struct s *ps, int *p, int *__restrict__ rp, int *__restrict__ rq)
++{
++ ps->a = 0;
++ ps->b = 1;
++ if (ps->a != 0)
++ undefined ();
++ p[0] = 0;
++ p[1] = 1;
++ if (p[0] != 0)
++ undefined ();
++ rp[0] = 0;
++ rq[0] = 1;
++ if (rp[0] != 0)
++ undefined ();
++}
++int main (void) {
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr30364-2.c
+===================================================================
+--- gcc/testsuite/gcc.dg/torture/pr30364-2.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/torture/pr30364-2.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,19 @@
++/* { dg-do run } */
++
++extern void abort (void);
++
++int f(unsigned int a, unsigned int b)
++{
++ if (a > 0x7FFFFFF0) return 0;
++ if (b > 0x7FFFFFF0) return 0;
++
++ int c = (a - 20) + (b - 20);
++ return c > 0x7FFFFFF0;
++}
++
++int main()
++{
++ if (f (0x7FFFFFF0, 41) != 1)
++ abort ();
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr30313.c
+===================================================================
+--- gcc/testsuite/gcc.dg/torture/pr30313.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/torture/pr30313.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++
++static inline void bar(){}
++
++struct S
++{
++ signed int i: 32;
++};
++
++int main()
++{
++ struct S x = {32};
++ sizeof(x.i+0);
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr30364-1.c
+===================================================================
+--- gcc/testsuite/gcc.dg/torture/pr30364-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/torture/pr30364-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,19 @@
++/* { dg-do run } */
++
++extern void abort (void);
++
++int f(int a, int b)
++{
++ if (a > 0x7FFFFFF0) return 0;
++ if (b > 0x7FFFFFF0) return 0;
++
++ int c = (a - 20) + (b - 20);
++ return c > 0x7FFFFFF0;
++}
++
++int main()
++{
++ if (f (0x7FFFFFF0, 41) != 1)
++ abort ();
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/torture/pr30364-3.c
+===================================================================
+--- gcc/testsuite/gcc.dg/torture/pr30364-3.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/torture/pr30364-3.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,20 @@
++/* { dg-do run } */
++/* { dg-options "-fwrapv" } */
++
++extern void abort (void);
++
++int f(int a, int b)
++{
++ if (a > 0x7FFFFFF0) return 0;
++ if (b > 0x7FFFFFF0) return 0;
++
++ int c = (a - 20) + (b - 20);
++ return c > 0x7FFFFFF0;
++}
++
++int main()
++{
++ if (f (0x7FFFFFF0, 41) != 1)
++ abort ();
++ return 0;
++}
+Index: gcc/testsuite/gcc.dg/tree-ssa/andor-1.c
+===================================================================
+--- gcc/testsuite/gcc.dg/tree-ssa/andor-1.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/tree-ssa/andor-1.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,65 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fdump-tree-original" } */
++
++unsigned int test1(unsigned int a)
++{
++ return (a & 1) | 1;
++}
++
++int test2(int b)
++{
++ return (b & 1) | 1;
++}
++
++unsigned int test3(unsigned int c)
++{
++ return (c | 1) & 1;
++}
++
++int test4(int d)
++{
++ return (d | 1) & 1;
++}
++
++unsigned int test5(unsigned int e)
++{
++ return (e | 4) & 6;
++}
++
++int test6(int f)
++{
++ return (f | 4) & 6;
++}
++
++unsigned int test7(unsigned int g)
++{
++ return (g & -2) | 1;
++}
++
++int test8(int h)
++{
++ return (h & -2) | 1;
++}
++
++unsigned int test9(unsigned int i)
++{
++ return (i & 3) | 1;
++}
++
++int test10(int j)
++{
++ return (j & 3) | 1;
++}
++
++/* { dg-final { scan-tree-dump-times "a \& 1 \\| 1" 0 "original" } } */
++/* { dg-final { scan-tree-dump-times "b \& 1 \\| 1" 0 "original" } } */
++/* { dg-final { scan-tree-dump-times "\\(c \\| 1\\) \& 1" 0 "original" } } */
++/* { dg-final { scan-tree-dump-times "\\(d \\| 1\\) \& 1" 0 "original" } } */
++/* { dg-final { scan-tree-dump-times "e \& 2 \\| 4" 1 "original" } } */
++/* { dg-final { scan-tree-dump-times "f \& 2 \\| 4" 1 "original" } } */
++/* { dg-final { scan-tree-dump-times "g \\| 1" 1 "original" } } */
++/* { dg-final { scan-tree-dump-times "h \\| 1" 1 "original" } } */
++/* { dg-final { scan-tree-dump-times "i \& 2 \\| 1" 1 "original" } } */
++/* { dg-final { scan-tree-dump-times "j \& 2 \\| 1" 1 "original" } } */
++/* { dg-final { cleanup-tree-dump "original" } } */
++
+Index: gcc/testsuite/gcc.dg/pr30189.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr30189.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr30189.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-options "-g -O" } */
++
++extern void foo (void);
++
++static
++void baz (int i)
++{
++ foo ();
++ typedef char A[i];
++ struct { A b; } *x = 0;
++}
++
++void
++bar (i)
++{
++ baz (i);
++}
+Index: gcc/testsuite/gcc.dg/inline-7.c
+===================================================================
+--- gcc/testsuite/gcc.dg/inline-7.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/gcc.dg/inline-7.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,6 +1,6 @@
+ /* Test duplicate inline, gnu99 mode. */
+ /* Origin: Joseph Myers */
+ /* { dg-do compile } */
+-/* { dg-options "-std=gnu99" } */
++/* { dg-options "-std=gnu99 -fgnu89-inline" } */
+
+ inline inline void f (void) {}
+Index: gcc/testsuite/gcc.dg/inline-18.c
+===================================================================
+--- gcc/testsuite/gcc.dg/inline-18.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/inline-18.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,28 @@
++/* Test -fgnu89-extern-inline. */
++/* { dg-do compile } */
++/* { dg-options "-std=c99 -fgnu89-inline" } */
++/* { dg-final { scan-assembler "func1" } } */
++/* { dg-final { scan-assembler-not "func2" } } */
++/* { dg-final { scan-assembler "func3" } } */
++/* { dg-final { scan-assembler "func4" } } */
++
++#ifndef __GNUC_GNU_INLINE__
++#error __GNUC_GNU_INLINE__ is not defined
++#endif
++
++#ifdef __GNUC_STDC_INLINE__
++#error __GNUC_STDC_INLINE__ is defined
++#endif
++
++extern inline int func1 (void) { return 0; }
++inline int func1 (void) { return 1; }
++
++extern int func2 (void);
++extern inline int func2 (void) { return 2; }
++
++inline int func3 (void);
++inline int func3 (void) { return 3; }
++
++extern int func4 (void);
++extern inline int func4 (void) { return 4; }
++int func4 (void) { return 5; }
+Index: gcc/testsuite/gcc.dg/gnu89-init-4.c
+===================================================================
+--- gcc/testsuite/gcc.dg/gnu89-init-4.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/gnu89-init-4.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,12 @@
++/* Test for GNU extensions to compound literals are giving the correct array bounds */
++/* { dg-do compile } */
++/* { dg-options "-std=gnu89 -W -Wall -O2" } */
++
++int a[] = (int[4]){1, 1, 2};
++int f(void)
++{
++ int sum = 0; int i;
++ for(i = 0;i<4;i++)
++ sum = a[i];
++ return sum;
++}
+Index: gcc/testsuite/gcc.dg/vect/fast-math-vect-pr29925.c
+===================================================================
+--- gcc/testsuite/gcc.dg/vect/fast-math-vect-pr29925.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/vect/fast-math-vect-pr29925.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,39 @@
++/* { dg-require-effective-target vect_float } */
++
++#include
++#include "tree-vect.h"
++
++void interp_pitch(float *exc, float *interp, int pitch, int len)
++{
++ int i,k;
++ int maxj;
++
++ maxj=3;
++ for (i=0;i
++#include
++#include "tree-vect.h"
++
++#define N 9
++
++static int a[N] = {1,2,3,4,5,6,7,8,9};
++static int b[N] = {2,3,4,5,6,7,8,9,0};
++
++int main1 () {
++ int i;
++ int *p, *q, *p1, *q1;
++ p = (unsigned int *) malloc (sizeof (unsigned int) * N);
++ q = (unsigned int *) malloc (sizeof (unsigned int) * N);
++
++ p1 = p; q1 = q;
++
++ /* Not vectorizable: because of the redundant cast (caused by ponter
++ arithmetics), alias analysis fails to distinguish between
++ the pointers. */
++ for (i = 0; i < N; i++)
++ {
++ *(q + i) = a[i];
++ *(p + i) = b[i];
++ }
++
++ /* check results: */
++ for (i = 0; i < N; i++)
++ {
++ if (*q != a[i] || *p != b[i])
++ abort();
++ q++;
++ p++;
++ }
++
++ return 0;
++}
++
++int main (void)
++{
++ check_vect ();
++
++ return main1 ();
++}
++
++/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
++/* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" } } */
++/* { dg-final { cleanup-tree-dump "vect" } } */
++
+
+Property changes on: gcc/testsuite/gcc.dg/vect/vect-106-alias.c
+___________________________________________________________________
+Name: svn:executable
+ + *
+
+Index: gcc/testsuite/gcc.dg/pr30473.c
+===================================================================
+--- gcc/testsuite/gcc.dg/pr30473.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/pr30473.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,13 @@
++/* PR middle-end/30473 */
++/* Make sure this doesn't ICE. */
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++extern int sprintf (char *, const char *, ...);
++
++void
++foo (char *buf1, char *buf2)
++{
++ sprintf (buf1, "%s", "abcde");
++ sprintf (buf2, "%s");
++}
+Index: gcc/testsuite/gcc.dg/Wunused-value-2.c
+===================================================================
+--- gcc/testsuite/gcc.dg/Wunused-value-2.c (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gcc.dg/Wunused-value-2.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,18 @@
++/* Test -Wunused-value. Bug 30729. */
++/* { dg-do compile } */
++/* { dg-options "-Wunused-value" } */
++/* Make sure va_arg does not cause a value computed is not used warning
++ because it has side effects. */
++#include
++
++int f(int t, ...)
++{
++ va_list a;
++ va_start (a, t);
++ va_arg(a, int);/* { dg-bogus "value computed is not used" } */
++ int t1 = va_arg(a, int);
++ va_end(a);
++ return t1;
++}
++
++
+Index: gcc/testsuite/ChangeLog
+===================================================================
+--- gcc/testsuite/ChangeLog (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/ChangeLog (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,3 +1,220 @@
++2007-04-22 Andrew Pinski
++
++ PR middle-end/31448
++ * gcc.c-torture/execute/pr31448.c: New testcase.
++
++2007-04-20 Jakub Jelinek
++
++ * gcc.target/i386/ordcmp-1.c: New test.
++ * gcc.target/i386/unordcmp-1.c: New test.
++
++ PR tree-optimization/31632
++ * gcc.c-torture/compile/20070419-1.c: New test.
++
++2007-04-17 Simon Martin
++
++ PR c++/31517
++ * g++.dg/template/init7.C: New test.
++
++2007-04-15 Andrew Pinski
++
++ PR testsuite/31578
++ * gcc.dg/gnu89-init-4.c: Change to a compile only test.
++
++2007-04-14 Andrew Pinski
++
++ PR tree-opt/30045
++ * gcc.dg/pr30045.c: New test.
++
++2007-04-14 Andrew Pinski
++
++ PR middle-end/30729
++ * gcc.dg/Wunused-value-2.c: New testcase.
++
++2007-04-14 Andrew Pinski
++
++ PR C++/30168
++ * g++.dg/opt/complex6.C: New test.
++
++2007-04-14 Andrew Pinski
++
++ PR C/31520
++ * gcc.dg/gnu89-init-4.c: New testcase.
++
++2007-04-13 Jason Merrill
++
++ PR c++/31074
++ * conv3.C: New test.
++
++2007-04-09 Mark Mitchell
++
++ PR c++/31449
++ * g++.dg/init/const5.C: New test.
++
++2007-04-03 Jakub Jelinek
++
++ PR c++/30847
++ * g++.dg/parse/cond3.C: New test.
++
++2007-03-20 Seongbae Park
++
++ PR tree-optimization/30590
++ * g++.dg/opt/pr30590.C: New testcase.
++
++2007-03-19 Jeff Law
++
++ * PR tree-optimization/30984
++ * gcc.c-torture/pr30984.c: New test.
++
++2007-03-19 Ian Lance Taylor
++
++ * gcc.dg/inline-7.c: Add -fgnu89-inline.
++ * gcc.dg/inline-17.c: New test.
++ * gcc.dg/inline-18.c: New test.
++ * gcc.dg/inline-19.c: New test.
++ * gcc.dg/inline-21.c: New test.
++
++2007-03-17 Alexandre Oliva
++
++ PR debug/29906
++ * g++.dg/debug/pr29906.C: New
++
++2007-03-15 Richard Guenther
++
++ Backport from mainline:
++ 2007-02-28 Richard Guenther
++
++ PR middle-end/30364
++ * gcc.dg/torture/pr30364-1.c: New testcase.
++ * gcc.dg/torture/pr30364-2.c: Likewise.
++ * gcc.dg/torture/pr30364-3.c: Likewise.
++
++2007-03-14 Jakub Jelinek
++
++ * gfortran.dg/module_implicit_conversion.f90: New test.
++
++2007-03-12 Andrew Pinski
++
++ PR middle-end/30433
++ * gcc.c-torture/compile/pr30433.c: New testcase to check
++ that complex constant comparisions are folded.
++
++2007-03-12 Ira Rosen
++
++ PR tree-optimization/29925
++ * gcc.dg/vect/fast-math-vect-pr29925.c: New test.
++
++2007-03-09 Alexandre Oliva
++
++ PR rtl-optimization/30643
++ * gcc.dg/pr30643.c: New.
++
++2007-03-08 Volker Reichelt
++
++ PR c++/30852
++ * g++.dg/ext/offsetof1.C: Add cases with volatile.
++
++2007-03-05 Simon Martin
++
++ PR c++/30895
++ * g++.dg/parse/template23.C: New test.
++
++2007-03-01 Tobias Schlueter
++
++ Backport from trunk
++ PR fortran/29441
++ * gfortran.dg/initialization_4.f90: New test.
++
++2007-02-27 Eric Botcazou
++
++ * gcc.c-torture/execute/20070227-1.c: New test.
++
++2007-02-27 Tobias Schlüter
++
++ PR fortran/25392
++ * gfortran.dg/f2c_8.f90: New test.
++
++2007-02-25 Roger Sayle
++
++ PR fortran/30400
++ * gfortran.dg/forall_10.f90: New test case.
++
++2007-02-24 Jerry DeLisle
++
++ PR libgfortran/30918
++ * gfortran.dg/namelist_26.f90: New test.
++
++2007-02-23 Jerry DeLisle
++
++ PR libgfortran/30910
++ * gfortran.dg/fmt_zero_precision.f90: New test.
++
++2007-02-21 Mark Mitchell
++
++ * lib/wrapper.exp (${tool}_maybe_build_wrapper): Allow the caller
++ to set options for compiling testglue.
++ * lib/g++.exp (g++_init): Compile testglue with -fexceptions.
++ * lib/obj-c++.exp (obj-c++_init): Likewise.
++
++2007-02-20 Ira Rosen
++
++ * gfortran.dg/vect/vect-2.f90: Xfail to vectorize one of the loops
++ because of aliasing.
++
++2007-02-18 Roger Sayle
++
++ PR middle-end/24427
++ PR rtl-optimization/28173
++ * gcc.dg/tree-ssa/andor-1.c: New test case.
++
++2007-02-18 Ira Rosen
++
++ * gcc.dg/vect/vect-106-alias.c: New test.
++
++2007-02-16 Eric Botcazou
++
++ * gcc.c-torture/execute/20070216-1.c: New test.
++
++2007-02-15 Steven G. Kargl
++
++ PR fortran/30799
++ * gfortran.dg/logical_2.f90: New test.
++
++2007-02-15 Alexandre Oliva
++
++ * g++.dg/tree-ssa/sra-1.C: New.
++
++2007-02-10 Tobias Schlueter
++
++ PR fortran/30478
++ * gfortran.dg/enum_4.f90: Update expected error message.
++
++2007-02-15 Alexandre Oliva
++
++ PR debug/30189
++ * gcc.dg/pr30189.c: New test.
++
++2007-02-14 Kaveh R. Ghazi
++
++ * g++.dg/tree-ssa/nothrow-1.C: Skip test if -fpic/-fPIC is used.
++
++2007-02-14 Jakub Jelinek
++
++ PR c++/30536
++ * g++.dg/tls/diag-5.C: New test.
++
++ PR middle-end/30473
++ * gcc.dg/pr30473.c: New test.
++ * gcc.c-torture/execute/20070201-1.c: New test.
++
++2007-02-14 Richard Guenther
++
++ Backport from mainline:
++ 2007-01-30 Richard Guenther
++
++ PR middle-end/30313
++ * gcc.dg/torture/pr30313.c: New testcase.
++
+ 2007-02-13 Release Manager
+
+ * GCC 4.1.2 released.
+Index: gcc/testsuite/g++.old-deja/g++.warn/flow1.C
+===================================================================
+--- gcc/testsuite/g++.old-deja/g++.warn/flow1.C (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/g++.old-deja/g++.warn/flow1.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,14 +0,0 @@
+-// { dg-do assemble }
+-// { dg-options "-Wreturn-type" }
+-// Test that we don't get a warning about flowing off the end.
+-
+-struct A {
+- ~A ();
+-};
+-
+-int f()
+-{
+- A a1[2];
+- A a2[2];
+- return 1234567;
+-}
+Index: gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C
+===================================================================
+--- gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,5 +1,6 @@
+ /* { dg-do compile } */
+ /* { dg-options "-O1 -fdump-tree-cfg" } */
++/* { dg-skip-if "" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
+ double a;
+ void t()
+ {
+Index: gcc/testsuite/g++.dg/tree-ssa/sra-1.C
+===================================================================
+--- gcc/testsuite/g++.dg/tree-ssa/sra-1.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/tree-ssa/sra-1.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,29 @@
++/* https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223576 */
++
++/* SRA failed to canonicalize bit-field types, introducing type
++ mismatches. */
++
++/* { dg-do compile } */
++/* { dg-options "-O2" } */
++
++struct A
++{
++ int a:16;
++ /* These dummy bit-fields are here to prevent GCC 4.2+ from merging
++ the bit-field compares into a single word compare, which disables
++ SRA. */
++ int a2:16;
++ int a3:16;
++ int a4:16;
++ int b:8;
++ bool operator==(A const x) const
++ {
++ return (this->a == x.a && this->b == x.b);
++ }
++};
++
++bool
++foo (A const x, A const y)
++{
++ return x == y;
++}
+Index: gcc/testsuite/g++.dg/debug/pr29906.C
+===================================================================
+--- gcc/testsuite/g++.dg/debug/pr29906.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/debug/pr29906.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,10 @@
++// { dg-do compile }
++// { dg-options "-g" }
++
++struct A{
++ typedef int T;
++ virtual ~A();
++};
++struct B:public A{
++ using A::T;
++};
+Index: gcc/testsuite/g++.dg/ext/offsetof1.C
+===================================================================
+--- gcc/testsuite/g++.dg/ext/offsetof1.C (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/g++.dg/ext/offsetof1.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -8,8 +8,10 @@
+ };
+
+ int a = __builtin_offsetof(bar, foo); // { dg-error "static data member" }
++int av = __builtin_offsetof(volatile bar, foo); // { dg-error "static data member" }
+ int b = __builtin_offsetof(bar, baz); // { dg-error "member function" }
+ int b0 = __builtin_offsetof(bar, baz[0]); // { dg-error "function" }
++int bv0 = __builtin_offsetof(volatile bar, baz[0]); // { dg-error "function" }
+ int c = __builtin_offsetof(bar, ~bar); // { dg-error "member function" }
+
+ typedef int I;
+Index: gcc/testsuite/g++.dg/inherit/conv3.C
+===================================================================
+--- gcc/testsuite/g++.dg/inherit/conv3.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/inherit/conv3.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,31 @@
++// PR 31074
++// Bug: The reference cast wasn't finding the desired static_cast followed by
++// const_cast interpretation.
++
++struct Shape
++{
++ Shape() {}
++ virtual ~Shape() {}
++};
++
++struct Loop
++{
++ Loop() {}
++ virtual ~Loop() {}
++ virtual void func() {}
++};
++
++struct Rect :
++ public Shape,
++ public Loop
++{
++ Rect() {}
++ virtual ~Rect() {}
++};
++
++int main ()
++{
++ const Rect* rect = new Rect();
++ Loop &l = ((Loop&)(*rect));
++ return (&l != (const Loop *)rect);
++}
+Index: gcc/testsuite/g++.dg/opt/complex6.C
+===================================================================
+--- gcc/testsuite/g++.dg/opt/complex6.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/opt/complex6.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,14 @@
++// PR 30168
++// { dg-do compile }
++// { dg-options "-O2" }
++
++struct aaa
++{
++ aaa(_Complex float __z) ;
++ _Complex float _M_value;
++};
++aaa::aaa(_Complex float __z)
++{
++ __z*=2.0f;
++ _M_value = __z;
++}
+Index: gcc/testsuite/g++.dg/opt/pr30590.C
+===================================================================
+--- gcc/testsuite/g++.dg/opt/pr30590.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/opt/pr30590.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,40 @@
++/* { dg-do run } */
++/* { dg-options "-O" } */
++struct test
++{
++ int type;
++ char buffer[4242]; /* should trigger pass-by-reference */
++};
++
++int flag = 0;
++
++struct test
++reset (void)
++{
++ struct test retval;
++ retval.type = 1;
++ return retval;
++}
++
++struct test
++test (void)
++{
++ struct test result;
++ result.type = 0;
++
++ for (int i = 0; i < 2; ++i)
++ {
++ struct test candidate = reset ();
++ if (flag)
++ result = candidate;
++ }
++
++ return result;
++}
++
++int
++main (void)
++{
++ struct test result = test ();
++ return result.type;
++}
+Index: gcc/testsuite/g++.dg/tls/diag-5.C
+===================================================================
+--- gcc/testsuite/g++.dg/tls/diag-5.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/tls/diag-5.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,5 @@
++// PR c++/30536
++// Invalid __thread specifiers.
++// { dg-require-effective-target tls }
++
++struct A { __thread register int i; }; // { dg-error "multiple storage classes|storage class specified" }
+Index: gcc/testsuite/g++.dg/init/const5.C
+===================================================================
+--- gcc/testsuite/g++.dg/init/const5.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/init/const5.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,11 @@
++// PR c++/31449
++
++class Foo {};
++class Bar : public Foo {};
++static const Foo *foo = 0;
++
++static Bar *bar = static_cast(foo); // { dg-error "conversion" }
++
++void func(const Foo *foo) {
++ Bar *bar = static_cast(foo); // { dg-error "conversion" }
++}
+Index: gcc/testsuite/g++.dg/parse/template23.C
+===================================================================
+--- gcc/testsuite/g++.dg/parse/template23.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/parse/template23.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,10 @@
++/* PR c++/30895 This used to ICE. */
++/* { dg-do "compile" } */
++
++template struct A {};
++
++template struct B
++{
++ A a1; /* { dg-error "imaginary constants are a GCC extension" } */
++ A a2; /* { dg-error "imaginary constants are a GCC extension" } */
++};
+Index: gcc/testsuite/g++.dg/parse/cond3.C
+===================================================================
+--- gcc/testsuite/g++.dg/parse/cond3.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/parse/cond3.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,15 @@
++// PR c++/30847
++// { dg-do compile }
++// { dg-options "" }
++
++int j, k, l;
++extern void baz ();
++
++void
++foo (int i)
++{
++ (i ? j : k) = ({ l++; (void) l; }); // { dg-error "void value not ignored" }
++ (i ? j : k) += ({ l++; (void) l; }); // { dg-error "void value not ignored" }
++ (i ? j : k) = baz (); // { dg-error "void value not ignored" }
++ (i ? j : k) *= baz (); // { dg-error "void value not ignored" }
++}
+Index: gcc/testsuite/g++.dg/template/init7.C
+===================================================================
+--- gcc/testsuite/g++.dg/template/init7.C (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/g++.dg/template/init7.C (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,9 @@
++/* PR c++/31517. This used to ICE. */
++/* { dg-do "compile" } */
++
++template struct A
++{
++ static const int i=0;
++};
++
++template const int A::i = 0=0; /* { dg-error "duplicate initialization" } */
+Index: gcc/testsuite/lib/g++.exp
+===================================================================
+--- gcc/testsuite/lib/g++.exp (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/lib/g++.exp (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -221,7 +221,7 @@
+ unset gluefile
+ }
+
+- g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o"
++ g++_maybe_build_wrapper "${tmpdir}/g++-testglue.o" "-fexceptions"
+
+ if {![info exists CXXFLAGS]} {
+ set CXXFLAGS ""
+Index: gcc/testsuite/lib/obj-c++.exp
+===================================================================
+--- gcc/testsuite/lib/obj-c++.exp (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/lib/obj-c++.exp (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -239,7 +239,7 @@
+ unset gluefile
+ }
+
+- obj-c++_maybe_build_wrapper "${tmpdir}/obj-c++-testglue.o"
++ obj-c++_maybe_build_wrapper "${tmpdir}/obj-c++-testglue.o" "-fexceptions"
+
+ set ALWAYS_OBJCXXFLAGS ""
+
+Index: gcc/testsuite/lib/wrapper.exp
+===================================================================
+--- gcc/testsuite/lib/wrapper.exp (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/lib/wrapper.exp (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -18,18 +18,20 @@
+
+ # ${tool}_maybe_build_wrapper -- Build wrapper object if the target needs it.
+
+-proc ${tool}_maybe_build_wrapper { filename } {
++proc ${tool}_maybe_build_wrapper { filename args } {
+ global gluefile wrap_flags
+
+ if { [target_info needs_status_wrapper] != "" \
+ && [target_info needs_status_wrapper] != "0" \
+ && ![info exists gluefile] } {
+ set saved_wrap_compile_flags [target_info wrap_compile_flags]
++ set flags [join $args " "]
+ # The wrapper code may contain code that gcc objects on. This
+ # became true for dejagnu-1.4.4. The set of warnings and code
+ # that gcc objects on may change, so just make sure -w is always
+ # passed to turn off all warnings.
+- set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags -w"
++ set_currtarget_info wrap_compile_flags \
++ "$saved_wrap_compile_flags -w $flags"
+ set result [build_wrapper $filename]
+ set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags"
+ if { $result != "" } {
+Index: gcc/testsuite/gfortran.dg/logical_2.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/logical_2.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/logical_2.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,26 @@
++! { dg-do compile }
++! PR fortran/30799
++! Inconsistent handling of bad (invalid) LOGICAL kinds
++! Reporter: Harald Anlauf
++! Testcase altered by Steven G. Kargl
++program gfcbug57
++ implicit none
++ !
++ ! These are logical kinds known by gfortran and many other compilers:
++ !
++ print *, kind (.true._1) ! This prints "1"
++ print *, kind (.true._2) ! This prints "2"
++ print *, kind (.true._4) ! This prints "4"
++ print *, kind (.true._8) ! This prints "8"
++ !
++ ! These are very strange (read: bad (invalid?)) logical kinds,
++ ! handled inconsistently by gfortran (there's no logical(kind=0) etc.)
++ !
++ print *, kind (.true._0) ! { dg-error "kind for logical constant" }
++ print *, kind (.true._3) ! { dg-error "kind for logical constant" }
++ print *, kind (.true._123) ! { dg-error "kind for logical constant" }
++ !
++ ! Here gfortran bails out with a runtime error:
++ !
++ print *, .true._3 ! { dg-error "kind for logical constant" }
++end program gfcbug57
+Index: gcc/testsuite/gfortran.dg/module_implicit_conversion.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/module_implicit_conversion.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/module_implicit_conversion.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,9 @@
++! { dg-do compile }
++! { dg-options "-std=gnu" }
++
++module module_implicit_conversion
++ ! double complex :: s = (1.0D0, 0D0)
++ double complex :: s = (1.0, 0D0)
++end module module_implicit_conversion
++
++! { dg-final { cleanup-modules "module_implicit_conversion" } }
+Index: gcc/testsuite/gfortran.dg/enum_4.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/enum_4.f90 (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/gfortran.dg/enum_4.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -5,12 +5,12 @@
+ implicit none
+ enum, bind (c)
+ enumerator :: red, black = 2
+- enumerator :: blue = 1, red ! { dg-error "already" }
++ enumerator :: blue = 1, red ! { dg-error "already has basic type" }
+ end enum
+
+ enum, bind (c)
+- enumerator :: r, b(10) = 2 ! { dg-error "cannot be array" }
+- enumerator , save :: g = 1 ! { dg-error "cannot have attributes" }
++ enumerator :: r, b(10) = 2 ! { dg-error "Syntax error" }
++ enumerator , save :: g = 1 ! { dg-error "Syntax error" }
+ end ! { dg-error " END ENUM" }
+
+ end program main ! { dg-excess-errors "" }
+Index: gcc/testsuite/gfortran.dg/initialization_4.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/initialization_4.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/initialization_4.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,6 @@
++! PR 29441 : No error was given for disallowed function in
++! initialization expression, even if -std=f95 was used
++! { dg-do compile }
++! { dg-options "-std=f95" }
++real, parameter :: pi = 4.0*Atan(1.0) ! { dg-error "Evaluation of nonstandard initialization expression" }
++end
+Index: gcc/testsuite/gfortran.dg/namelist_26.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/namelist_26.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/namelist_26.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,48 @@
++! { dg-do run }
++! PR30918 Failure to skip commented out NAMELIST
++! Before the patch, this read the commented out namelist and iuse would
++! equal 2 when done. Test case from PR.
++program gfcbug58
++ implicit none
++ integer :: iuse = 0, ios
++ integer, parameter :: nmlunit = 10 ! Namelist unit
++ !------------------
++ ! Namelist 'REPORT'
++ !------------------
++ character(len=12) :: type, use
++ integer :: max_proc
++ namelist /REPORT/ type, use, max_proc
++ !------------------
++ ! Set up the test file
++ !------------------
++ open(unit=nmlunit, status="scratch")
++ write(nmlunit, '(a)') "!================"
++ write(nmlunit, '(a)') "! Namelist REPORT"
++ write(nmlunit, '(a)') "!================"
++ write(nmlunit, '(a)') "! &REPORT use = 'ignore' / ! Comment"
++ write(nmlunit, '(a)') "!"
++ write(nmlunit, '(a)') " &REPORT type = 'SYNOP'"
++ write(nmlunit, '(a)') " use = 'active'"
++ write(nmlunit, '(a)') " max_proc = 20"
++ write(nmlunit, '(a)') " /"
++ rewind(nmlunit)
++ !-------------------------------------
++ ! Loop to read namelist multiple times
++ !-------------------------------------
++ do
++ !----------------------------------------
++ ! Preset namelist variables with defaults
++ !----------------------------------------
++ type = ''
++ use = ''
++ max_proc = -1
++ !--------------
++ ! Read namelist
++ !--------------
++ read (nmlunit, nml=REPORT, iostat=ios)
++ if (ios /= 0) exit
++ iuse = iuse + 1
++ end do
++ if (iuse /= 1) call abort()
++
++end program gfcbug58
+Index: gcc/testsuite/gfortran.dg/fmt_zero_precision.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/fmt_zero_precision.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/fmt_zero_precision.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,85 @@
++! { dg-do run }
++! PR28354 Incorrect rounding of .99999 with f3.0 format specifier
++! PR30910 ES format not quite right...
++! Test case derived from PR. Submitted by Jerry DeLisle
++ write(*,50) -0.99999
++ write(*,50) 0.99999
++ write(*,50) -9.0
++ write(*,50) -0.99
++ write(*,50) -0.999
++ write(*,50) -0.999
++ write(*,50) -0.59
++ write(*,50) -0.49
++ write(*,100) 37.99999
++ write(*,100) 10345.0
++ write(*,100) 333.678
++ write(*,100) 333.499
++ 50 format(f3.0,"<")
++ 100 format(f8.0,"<")
++ write(6,'(es6.0)') 1.0e-1
++ write(*,150) -0.99999
++ write(*,150) 0.99999
++ write(*,150) -9.0
++ write(*,150) -0.99
++ write(*,150) -0.999
++ write(*,150) -0.999
++ write(*,150) -0.59
++ write(*,150) -0.49
++ write(*,200) 37.99999
++ write(*,200) 10345.0
++ write(*,200) 333.678
++ write(*,200) 333.499
++ 150 format(es7.0,"<")
++ 200 format(es8.0,"<")
++ write(*,250) -0.99999
++ write(*,250) 0.99999
++ write(*,250) -9.0
++ write(*,250) -0.99
++ write(*,250) -0.999
++ write(*,250) -0.999
++ write(*,250) -0.59
++ write(*,250) -0.49
++ write(*,300) 37.99999
++ write(*,300) 10345.0
++ write(*,300) 333.678
++ write(*,300) 333.499
++ 250 format(1pe7.0,"<")
++ 300 format(1pe6.0,"<")
++ end
++! {dg-output "-1.<"
++! {dg-output " 1.<"
++! {dg-output "-9.<"
++! {dg-output "-1.<"
++! {dg-output "-1.<"
++! {dg-output "-1.<"
++! {dg-output "-1.<"
++! {dg-output " 0.<"
++! {dg-output " 38.<"
++! {dg-output " 10345.<"
++! {dg-output " 334.<"
++! {dg-output " 333.<"
++! {dg-output "1.E-01"
++! {dg-output "-1.E+00<"
++! {dg-output " 1.E+00<"
++! {dg-output "-9.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-6.E-01<"
++! {dg-output "-5.E-01<"
++! {dg-output " 4.E+01<"
++! {dg-output " 1.E+04<"
++! {dg-output " 3.E+02<"
++! {dg-output " 3.E+02<"
++! {dg-output "-1.E+00<"
++! {dg-output " 1.E+00<"
++! {dg-output "-9.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-1.E+00<"
++! {dg-output "-6.E-01<"
++! {dg-output "-5.E-01<"
++! {dg-output "4.E+01<"
++! {dg-output "1.E+04<"
++! {dg-output "3.E+02<"
++! {dg-output "3.E+02<"
+Index: gcc/testsuite/gfortran.dg/vect/vect-2.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/vect/vect-2.f90 (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/testsuite/gfortran.dg/vect/vect-2.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -14,9 +14,7 @@
+ ! support unaligned loads) or using peeling to align the store (on targets that
+ ! support unaligned loads).
+
+-! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } }
+-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_no_align } } }
+-! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target vect_no_align } } }
+-! { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail vect_no_align } } }
+-! { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" {target vect_no_align } } }
++! { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail *-*-* } } }
++! { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } }
++! { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } }
+ ! { dg-final { cleanup-tree-dump "vect" } }
+Index: gcc/testsuite/gfortran.dg/forall_10.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/forall_10.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/forall_10.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,25 @@
++! { dg-do run }
++! { dg-options "-O" }
++! Tests the fix for PR30400, in which the use of ANY in the
++! FORALL mask was rejected.
++!
++! Contributed by Dominique d'Humieres
++!
++program pr30400_1
++ real, dimension (5, 5, 5, 5) :: a
++
++ a (:, :, :, :) = 4
++ a (:, 2, :, 4) = 10
++ a (:, 2, :, 1) = 0
++
++ forall (i = 1:5, j = 1:5, k = 1:5, any (a (i, j, k, :) .gt. 6))
++ forall (l = 1:5, any (a (:, :, :, l) .lt. 2))
++ a (i, j, k, l) = i - j + k - l
++ end forall
++ end forall
++ if (sum (a) .ne. 2625.0) call abort ()
++
++ ! Check that the fix has not broken the treatment of the '=='
++ forall (i = 1:5, i == 3) a(i, i, i, i) = -5
++ if (sum (a) .ne. 2616.0) call abort ()
++end
+Index: gcc/testsuite/gfortran.dg/f2c_8.f90
+===================================================================
+--- gcc/testsuite/gfortran.dg/f2c_8.f90 (.../tags/gcc_4_1_2_release) (revision 0)
++++ gcc/testsuite/gfortran.dg/f2c_8.f90 (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -0,0 +1,16 @@
++! { dg-do compile }
++! { dg-options "-ff2c" }
++! PR 25392
++! Verify that the type of the result variable matches the declared
++! type of the function. The actual type of the function may be
++! different for f2c calling conventions.
++real function goo () result (foo)
++ real x
++ foo = sign(foo, x)
++end
++
++real function foo ()
++ real x
++ foo = sign(foo, x)
++end
++
+Index: gcc/cp/typeck.c
+===================================================================
+--- gcc/cp/typeck.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/typeck.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -5450,6 +5450,12 @@
+ tree cond;
+ tree preeval = NULL_TREE;
+
++ if (VOID_TYPE_P (TREE_TYPE (rhs)))
++ {
++ error ("void value not ignored as it ought to be");
++ return error_mark_node;
++ }
++
+ rhs = stabilize_expr (rhs, &preeval);
+
+ /* Check this here to avoid odd errors when trying to convert
+Index: gcc/cp/optimize.c
+===================================================================
+--- gcc/cp/optimize.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/optimize.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -69,6 +69,8 @@
+ DECL_NAME (cloned_parm) = DECL_NAME (parm);
+ DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
+ TREE_TYPE (cloned_parm) = TREE_TYPE (parm);
++
++ DECL_COMPLEX_GIMPLE_REG_P (cloned_parm) = DECL_COMPLEX_GIMPLE_REG_P (parm);
+ }
+
+ /* FN is a function that has a complete body. Clone the body as
+Index: gcc/cp/class.c
+===================================================================
+--- gcc/cp/class.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/class.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -303,7 +303,18 @@
+ field, because other parts of the compiler know that such
+ expressions are always non-NULL. */
+ if (!virtual_access && integer_zerop (offset))
+- return build_nop (build_pointer_type (target_type), expr);
++ {
++ tree class_type;
++ /* TARGET_TYPE has been extracted from BINFO, and, is
++ therefore always cv-unqualified. Extract the
++ cv-qualifiers from EXPR so that the expression returned
++ matches the input. */
++ class_type = TREE_TYPE (TREE_TYPE (expr));
++ target_type
++ = cp_build_qualified_type (target_type,
++ cp_type_quals (class_type));
++ return build_nop (build_pointer_type (target_type), expr);
++ }
+ null_test = error_mark_node;
+ }
+
+Index: gcc/cp/decl.c
+===================================================================
+--- gcc/cp/decl.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/decl.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -7288,20 +7288,21 @@
+
+ /* Warn about storage classes that are invalid for certain
+ kinds of declarations (parameters, typenames, etc.). */
++ if (thread_p
++ && ((storage_class
++ && storage_class != sc_extern
++ && storage_class != sc_static)
++ || declspecs->specs[(int)ds_typedef]))
++ {
++ if (!declspecs->multiple_storage_classes_p)
++ error ("multiple storage classes in declaration of %qs", name);
++ thread_p = false;
++ }
+ if (declspecs->multiple_storage_classes_p)
+ {
+ error ("multiple storage classes in declaration of %qs", name);
+ storage_class = sc_none;
+ }
+- else if (thread_p
+- && ((storage_class
+- && storage_class != sc_extern
+- && storage_class != sc_static)
+- || declspecs->specs[(int)ds_typedef]))
+- {
+- error ("multiple storage classes in declaration of %qs", name);
+- thread_p = false;
+- }
+ else if (decl_context != NORMAL
+ && ((storage_class != sc_none
+ && storage_class != sc_mutable)
+Index: gcc/cp/call.c
+===================================================================
+--- gcc/cp/call.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/call.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -171,7 +171,7 @@
+ (struct z_candidate **, tree, tree, tree, tree, tree, int);
+ static conversion *implicit_conversion (tree, tree, tree, bool, int);
+ static conversion *standard_conversion (tree, tree, tree, bool, int);
+-static conversion *reference_binding (tree, tree, tree, int);
++static conversion *reference_binding (tree, tree, tree, bool, int);
+ static conversion *build_conv (conversion_kind, tree, conversion *);
+ static bool is_subseq (conversion *, conversion *);
+ static tree maybe_handle_ref_bind (conversion **);
+@@ -1072,10 +1072,11 @@
+ purposes of reference binding. For lvalue binding, either pass a
+ reference type to FROM or an lvalue expression to EXPR. If the
+ reference will be bound to a temporary, NEED_TEMPORARY_P is set for
+- the conversion returned. */
++ the conversion returned. If C_CAST_P is true, this
++ conversion is coming from a C-style cast. */
+
+ static conversion *
+-reference_binding (tree rto, tree rfrom, tree expr, int flags)
++reference_binding (tree rto, tree rfrom, tree expr, bool c_cast_p, int flags)
+ {
+ conversion *conv = NULL;
+ tree to = TREE_TYPE (rto);
+@@ -1105,6 +1106,11 @@
+ reference compatible. We have do do this after stripping
+ references from FROM. */
+ related_p = reference_related_p (to, from);
++ /* If this is a C cast, first convert to an appropriately qualified
++ type, so that we can later do a const_cast to the desired type. */
++ if (related_p && c_cast_p
++ && !at_least_as_qualified_p (to, from))
++ to = build_qualified_type (to, cp_type_quals (from));
+ compatible_p = reference_compatible_p (to, from);
+
+ if (lvalue_p && compatible_p)
+@@ -1214,7 +1220,7 @@
+ if (related_p && !at_least_as_qualified_p (to, from))
+ return NULL;
+
+- conv = implicit_conversion (to, from, expr, /*c_cast_p=*/false,
++ conv = implicit_conversion (to, from, expr, c_cast_p,
+ flags);
+ if (!conv)
+ return NULL;
+@@ -1244,7 +1250,7 @@
+ return NULL;
+
+ if (TREE_CODE (to) == REFERENCE_TYPE)
+- conv = reference_binding (to, from, expr, flags);
++ conv = reference_binding (to, from, expr, c_cast_p, flags);
+ else
+ conv = standard_conversion (to, from, expr, c_cast_p, flags);
+
+@@ -5481,6 +5487,20 @@
+ && TREE_SIDE_EFFECTS (instance_ptr))
+ call = build2 (COMPOUND_EXPR, TREE_TYPE (call),
+ instance_ptr, call);
++ else if (call != error_mark_node
++ && DECL_DESTRUCTOR_P (cand->fn)
++ && !VOID_TYPE_P (TREE_TYPE (call)))
++ /* An explicit call of the form "x->~X()" has type
++ "void". However, on platforms where destructors
++ return "this" (i.e., those where
++ targetm.cxx.cdtor_returns_this is true), such calls
++ will appear to have a return value of pointer type
++ to the low-level call machinery. We do not want to
++ change the low-level machinery, since we want to be
++ able to optimize "delete f()" on such platforms as
++ "operator delete(~X(f()))" (rather than generating
++ "t = f(), ~X(t), operator delete (t)"). */
++ call = build_nop (void_type_node, call);
+ }
+ }
+ }
+@@ -6514,7 +6534,8 @@
+ /* Get the high-water mark for the CONVERSION_OBSTACK. */
+ p = conversion_obstack_alloc (0);
+
+- conv = reference_binding (type, TREE_TYPE (expr), expr, LOOKUP_NORMAL);
++ conv = reference_binding (type, TREE_TYPE (expr), expr, /*c_cast_p=*/false,
++ LOOKUP_NORMAL);
+ if (!conv || conv->bad_p)
+ {
+ if (!(TYPE_QUALS (TREE_TYPE (type)) & TYPE_QUAL_CONST)
+Index: gcc/cp/tree.c
+===================================================================
+--- gcc/cp/tree.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/tree.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1442,6 +1442,10 @@
+ && !memcmp (TREE_STRING_POINTER (t1), TREE_STRING_POINTER (t2),
+ TREE_STRING_LENGTH (t1));
+
++ case COMPLEX_CST:
++ return cp_tree_equal (TREE_REALPART (t1), TREE_REALPART (t2))
++ && cp_tree_equal (TREE_IMAGPART (t1), TREE_IMAGPART (t2));
++
+ case CONSTRUCTOR:
+ /* We need to do this when determining whether or not two
+ non-type pointer to member function template arguments
+Index: gcc/cp/ChangeLog
+===================================================================
+--- gcc/cp/ChangeLog (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/ChangeLog (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,3 +1,66 @@
++2007-04-17 Simon Martin
++
++ PR c++/31517
++ * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
++
++2007-04-14 Andrew Pinski
++
++ PR C++/30168
++ * optimize.c (update_cloned_parm): Copy DECL_COMPLEX_GIMPLE_REG_P also.
++
++2007-04-13 Jason Merrill
++
++ PR c++/31074
++ * call.c (reference_binding): Add c_cast_p parm. If true,
++ add quals to TO as needed to make it reference-compatible.
++
++2007-04-09 Mark Mitchell
++
++ PR c++/31449
++ * class.c (build_base_path): Ensure that the converted pointer has
++ the same cv-qualification as the input.
++
++2007-04-03 Jakub Jelinek
++
++ PR c++/30847
++ * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
++ type issue error and return early.
++
++2007-03-08 Volker Reichelt
++
++ PR c++/30852
++ * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
++
++2007-03-05 Simon Martin
++
++ PR c++/30895
++ * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
++
++2007-02-19 Mark Mitchell
++
++ * call.c (build_new_method_call): Ensure that explicit calls of
++ destructors have type "void".
++
++2007-02-19 Mark Mitchell
++
++ * decl2.c (import_export_decl): Reverse sense of
++ DECL_VISIBILITY_SPECIFIED test for target-specific visibility
++ rules.
++
++ Backport of:
++ 2006-07-20 Jason Merrill
++ * decl2.c (determine_visibility_from_class): Reverse sense of
++ DECL_VISIBILITY_SPECIFIED test for target-specific visibility
++ rules.
++
++2007-02-14 Jakub Jelinek
++
++ PR c++/30536
++ * decl.c (grokdeclarator): If __thread is used together with
++ a storage class other than extern and static, clear thread_p
++ after issuing diagnostics and fall through to checking the
++ storage class.
++
+ 2007-02-13 Release Manager
+
+ * GCC 4.1.2 released.
+Index: gcc/cp/pt.c
+===================================================================
+--- gcc/cp/pt.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/pt.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -12626,6 +12626,10 @@
+ such calls are value-dependent. */
+ return true;
+
++ case MODOP_EXPR:
++ return ((value_dependent_expression_p (TREE_OPERAND (expression, 0)))
++ || (value_dependent_expression_p (TREE_OPERAND (expression, 2))));
++
+ default:
+ /* A constant expression is value-dependent if any subexpression is
+ value-dependent. */
+Index: gcc/cp/semantics.c
+===================================================================
+--- gcc/cp/semantics.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/semantics.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -2892,7 +2892,8 @@
+ || TREE_CODE (TREE_TYPE (expr)) == METHOD_TYPE
+ || TREE_CODE (TREE_TYPE (expr)) == UNKNOWN_TYPE)
+ {
+- if (TREE_CODE (expr) == COMPONENT_REF)
++ if (TREE_CODE (expr) == COMPONENT_REF
++ || TREE_CODE (expr) == COMPOUND_EXPR)
+ expr = TREE_OPERAND (expr, 1);
+ error ("cannot apply % to member function %qD", expr);
+ return error_mark_node;
+Index: gcc/cp/decl2.c
+===================================================================
+--- gcc/cp/decl2.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cp/decl2.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1905,8 +1905,8 @@
+ comdat_linkage (decl);
+ }
+
+- /* Give the target a chance to override the visibility associated
+- with DECL. */
++ /* Give the target a chance to override the visibility of class
++ data, like virtual tables. */
+ if (TREE_CODE (decl) == VAR_DECL
+ && (DECL_TINFO_P (decl)
+ || (DECL_VTABLE_OR_VTT_P (decl)
+@@ -1914,9 +1914,16 @@
+ they cannot be referred to from other object files;
+ their name is not standardized by the ABI. */
+ && !DECL_CONSTRUCTION_VTABLE_P (decl)))
+- && TREE_PUBLIC (decl)
++ /* Visibility only applies to objects with external linkage. */
++ && TREE_PUBLIC (decl)
++ /* Visibility is specified by the definition of the object, not
++ its declaration. */
+ && !DECL_REALLY_EXTERN (decl)
+- && DECL_VISIBILITY_SPECIFIED (decl)
++ /* Respect any explicit specification of visibility for the
++ class data itself. */
++ && !DECL_VISIBILITY_SPECIFIED (decl)
++ /* If the visibility of the class has been explicitly specified,
++ that visibility applies to class data as well. */
+ && (!class_type || !CLASSTYPE_VISIBILITY_SPECIFIED (class_type)))
+ targetm.cxx.determine_class_data_visibility (decl);
+
+Index: gcc/haifa-sched.c
+===================================================================
+--- gcc/haifa-sched.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/haifa-sched.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -142,6 +142,7 @@
+ #include "recog.h"
+ #include "sched-int.h"
+ #include "target.h"
++#include "params.h"
+
+ #ifdef INSN_SCHEDULING
+
+@@ -1379,9 +1380,22 @@
+ fprintf (sched_dump, ";;\t\tQ-->Ready: insn %s: ",
+ (*current_sched_info->print_insn) (insn, 0));
+
+- ready_add (ready, insn);
+- if (sched_verbose >= 2)
+- fprintf (sched_dump, "moving to ready without stalls\n");
++ /* If the ready list is full, delay the insn for 1 cycle.
++ See the comment in schedule_block for the rationale. */
++ if (!reload_completed
++ && ready->n_ready > MAX_SCHED_READY_INSNS
++ && !SCHED_GROUP_P (insn))
++ {
++ if (sched_verbose >= 2)
++ fprintf (sched_dump, "requeued because ready full\n");
++ queue_insn (insn, 1);
++ }
++ else
++ {
++ ready_add (ready, insn);
++ if (sched_verbose >= 2)
++ fprintf (sched_dump, "moving to ready without stalls\n");
++ }
+ }
+ insn_queue[q_ptr] = 0;
+
+@@ -1903,6 +1917,31 @@
+ memset (insn_queue, 0, (max_insn_queue_index + 1) * sizeof (rtx));
+ last_clock_var = -1;
+
++ /* The algorithm is O(n^2) in the number of ready insns at any given
++ time in the worst case. Before reload we are more likely to have
++ big lists so truncate them to a reasonable size. */
++ if (!reload_completed && ready.n_ready > MAX_SCHED_READY_INSNS)
++ {
++ ready_sort (&ready);
++
++ /* Find first free-standing insn past MAX_SCHED_READY_INSNS. */
++ for (i = MAX_SCHED_READY_INSNS; i < ready.n_ready; i++)
++ if (!SCHED_GROUP_P (ready_element (&ready, i)))
++ break;
++
++ if (sched_verbose >= 2)
++ {
++ fprintf (sched_dump,
++ ";;\t\tReady list on entry: %d insns\n", ready.n_ready);
++ fprintf (sched_dump,
++ ";;\t\t before reload => truncated to %d insns\n", i);
++ }
++
++ /* Delay all insns past it for 1 cycle. */
++ while (i < ready.n_ready)
++ queue_insn (ready_remove (&ready, i), 1);
++ }
++
+ /* Start just before the beginning of time. */
+ clock_var = -1;
+ advance = 0;
+Index: gcc/cse.c
+===================================================================
+--- gcc/cse.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/cse.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -6016,8 +6016,11 @@
+ {
+ if (insert_regs (x, NULL, 0))
+ {
++ rtx dest = SET_DEST (sets[i].rtl);
++
+ rehash_using_reg (x);
+ hash = HASH (x, mode);
++ sets[i].dest_hash = HASH (dest, GET_MODE (dest));
+ }
+ elt = insert (x, NULL, hash, mode);
+ }
+Index: gcc/tree-nrv.c
+===================================================================
+--- gcc/tree-nrv.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/tree-nrv.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -163,6 +163,14 @@
+ result_type))
+ return;
+ }
++ else if (TREE_CODE (stmt) == MODIFY_EXPR)
++ {
++ tree addr = get_base_address (TREE_OPERAND (stmt, 0));
++ /* If there's any MODIFY of component of RESULT,
++ then bail out. */
++ if (addr && addr == result)
++ return;
++ }
+ }
+ }
+
+Index: gcc/tree-ssa-alias.c
+===================================================================
+--- gcc/tree-ssa-alias.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/tree-ssa-alias.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -46,6 +46,7 @@
+ #include "ipa-type-escape.h"
+ #include "vec.h"
+ #include "bitmap.h"
++#include "pointer-set.h"
+
+ /* Obstack used to hold grouping bitmaps and other temporary bitmaps used by
+ aliasing */
+@@ -2231,6 +2232,38 @@
+ }
+
+
++/* Given two tags return TRUE if their may-alias sets intersect. */
++
++bool
++may_aliases_intersect (tree tag1, tree tag2)
++{
++ struct pointer_set_t *set1 = pointer_set_create ();
++ unsigned i;
++ varray_type may_aliases1 = var_ann (tag1)->may_aliases;
++ varray_type may_aliases2 = var_ann (tag2)->may_aliases;
++
++ if (may_aliases1 == NULL || may_aliases2 == NULL)
++ return false;
++
++ /* Insert all the symbols from the first may-alias set into the
++ pointer-set. */
++ for (i = 0; i < VARRAY_ACTIVE_SIZE (may_aliases1); i++)
++ pointer_set_insert (set1, VARRAY_TREE (may_aliases1, i));
++
++ /* Go through the second may-alias set and check if it contains symbols that
++ are common with the first set. */
++ for (i = 0; i < VARRAY_ACTIVE_SIZE (may_aliases2); i++)
++ if (pointer_set_contains (set1, VARRAY_TREE (may_aliases2, i)))
++ {
++ pointer_set_destroy (set1);
++ return true;
++ }
++
++ pointer_set_destroy (set1);
++ return false;
++}
++
++
+ /* Add VAR to the list of may-aliases of PTR's type tag. If PTR
+ doesn't already have a type tag, create one. */
+
+Index: gcc/dwarf2out.c
+===================================================================
+--- gcc/dwarf2out.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/dwarf2out.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -8407,7 +8407,10 @@
+ mod_type_die = lookup_type_die (qualified_type);
+ }
+ else if (is_const_type < TYPE_READONLY (dtype)
+- || is_volatile_type < TYPE_VOLATILE (dtype))
++ || is_volatile_type < TYPE_VOLATILE (dtype)
++ || (is_const_type <= TYPE_READONLY (dtype)
++ && is_volatile_type <= TYPE_VOLATILE (dtype)
++ && DECL_ORIGINAL_TYPE (type_name) != type))
+ /* cv-unqualified version of named type. Just use the unnamed
+ type to which it refers. */
+ mod_type_die
+@@ -12890,7 +12893,8 @@
+ return decl_die;
+ }
+
+-/* Returns the DIE for TYPE. A DIE is always returned. */
++/* Returns the DIE for TYPE, that must not be a base type. A DIE is
++ always returned. */
+
+ static dw_die_ref
+ force_type_die (tree type)
+@@ -13241,7 +13245,12 @@
+
+ /* For TYPE_DECL or CONST_DECL, lookup TREE_TYPE. */
+ if (TREE_CODE (decl) == TYPE_DECL || TREE_CODE (decl) == CONST_DECL)
+- at_import_die = force_type_die (TREE_TYPE (decl));
++ {
++ if (is_base_type (TREE_TYPE (decl)))
++ at_import_die = base_type_die (TREE_TYPE (decl));
++ else
++ at_import_die = force_type_die (TREE_TYPE (decl));
++ }
+ else
+ {
+ at_import_die = lookup_decl_die (decl);
+Index: gcc/expr.c
+===================================================================
+--- gcc/expr.c (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/expr.c (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -8569,8 +8569,15 @@
+ HOST_WIDE_INT prec = TYPE_PRECISION (type);
+ if (target && GET_MODE (target) != GET_MODE (exp))
+ target = 0;
+- if (TYPE_UNSIGNED (type))
++ /* For constant values, reduce using build_int_cst_type. */
++ if (GET_CODE (exp) == CONST_INT)
+ {
++ HOST_WIDE_INT value = INTVAL (exp);
++ tree t = build_int_cst_type (type, value);
++ return expand_expr (t, target, VOIDmode, EXPAND_NORMAL);
++ }
++ else if (TYPE_UNSIGNED (type))
++ {
+ rtx mask;
+ if (prec < HOST_BITS_PER_WIDE_INT)
+ mask = immed_double_const (((unsigned HOST_WIDE_INT) 1 << prec) - 1, 0,
+Index: gcc/ada/ChangeLog
+===================================================================
+--- gcc/ada/ChangeLog (.../tags/gcc_4_1_2_release) (revision 124064)
++++ gcc/ada/ChangeLog (.../branches/gcc-4_1-branch) (revision 124064)
+@@ -1,3 +1,18 @@
++2007-02-20 Eric Botcazou
++
++ PR ada/30684
++ Backport from 4.2 branch:
++ 2006-11-17 Eric Botcazou
++
++ * ada-tree.h (DECL_READONLY_ONCE_ELAB): New macro.
++ * decl.c (elaborate_expression_1): Test the DECL_READONLY_ONCE_ELAB
++ flag in addition to TREE_READONLY to assert the constantness of
++ variables for elaboration purposes.
++ * trans.c (add_decl_expr): Do not dynamically elaborate padded objects
++ if the initializer takes into account the padding.
++ Set DECL_READONLY_ONCE_ELAB flag on variables originally TREE_READONLY
++ but whose elaboration cannot be performed statically.
++
+ 2007-02-13 Release Manager
+
+ * GCC 4.1.2 released.
+@@ -24,8 +39,8 @@
+
+ 2006-06-06 Laurent GUERBY
+
+- PR ada/27769
+- mlib-utl.adb: Use Program_Name.
++ PR ada/27769
++ * mlib-utl.adb: Use Program_Name.
+
+ 2006-05-24 Release Manager
+
+@@ -48,20 +63,19 @@
+
+ Backport:
+ 2005-12-05 Paolo Bonzini
+- * Makefile.in (gnatlib): Fix regex, using \. instead of . when a
++ * Makefile.in (gnatlib): Fix regex, using \. instead of . when a
+ period is meant.
+-
++
+ 2006-02-17 Eric Botcazou
+
+ Backport from mainline:
+ 2006-02-13 Geert Bosch
+- Gary Dismukes
++ Gary Dismukes
+
+ * a-tifiio.adb (Put_Digits): Test Last against To'First - 1 instead of
+ 0, since the lower bound of the actual string may be greater than one.
+
+ PR ada/20753
+-
+ (Put): Fix condition to raise Layout_Error when invalid
+ layout is requested.
+
+@@ -123,8 +137,8 @@
+
+ 2005-11-18 Laurent GUERBY
+
+- PR ada/24857
+- * Makefile.in: Use s-auxdec-empty for RTEMS.
++ PR ada/24857
++ * Makefile.in: Use s-auxdec-empty for RTEMS.
+
+ 2005-11-17 Richard Kenner
+
+@@ -138,15 +152,15 @@
+
+ PR ada/24857
+ * s-auxdec-empty.ads, s-auxdec-empty.adb: New files.
+-
++
+ 2005-11-16 Richard Guenther
+
+ * Makefile.in: Add EH_MECHANISM=-gcc to s390(x) linux.
+
+ 2005-11-16 Joel Sherrill
+
+- PR ada/24855
+- * raise-gcc.c: Add missing stdarg.h include.
++ PR ada/24855
++ * raise-gcc.c: Add missing stdarg.h include.
+
+ 2005-11-16 Richard Guenther
+
+@@ -214,7 +228,6 @@
+ Ed Schonberg
+
+ PR ada/18434
+-
+ * types.ads: Include All_Checks in Suppress_Array
+
+ * checks.adb (Check_Needed): Remove kludge for a/=b rewritten as
+@@ -337,7 +350,7 @@
+ (Save_Occurrence_And_Private): Move GCC EH related code to
+ a-exexpr-gcc.adb
+ (Raise_Current_Excep): Add new variable Id with pragma
+- volatile, to ensure that the variable lives on stack.
++ volatile, to ensure that the variable lives on stack.
+
+ * a-exexpr-gcc.adb, raise-gcc.c: New file.
+
+@@ -1142,7 +1155,6 @@
+ Javier Miranda
+
+ PR ada/15604
+-
+ * sem_type.adb (Covers): In an inlined body, a composite type matches
+ a private type whose full view is a composite type.
+ (Interface_Present_In_Ancestor): Protect the frontend against
+@@ -2449,9 +2461,9 @@
+ subprogram Complete_Subprograms_Derivation already does the
+ job associated with the second call.
+
+- * exp_strm.adb (Build_Elementary_Input_Call): Add an explicit
+- conversion to the full view when generating an operation for a
+- discriminant whose type may currently be private.
++ * exp_strm.adb (Build_Elementary_Input_Call): Add an explicit
++ conversion to the full view when generating an operation for a
++ discriminant whose type may currently be private.
+
+ 2005-09-01 Ed Schonberg
+ Javier Miranda
+@@ -2836,7 +2848,6 @@
+ 2005-07-07 Olivier Hainque
+
+ PR ada/22301
+-
+ * raise.c: Only include unwind.h if IN_RTS, and provide dummy type
+ definitions for the Unwind wrappers in the compiler case.
+
+@@ -2948,10 +2959,10 @@
+ N_Object_Declaration, only perform the checks if the Object_Definition
+ is not an Access_Definition.
+
+- * sem_ch3.adb (Access_Subprogram_Declaration): Add test for the case
+- where the parent of an the access definition is an N_Object_Declaration
+- when determining the Associated_Node_For_Itype and scope of an
+- anonymous access-to-subprogram type.
++ * sem_ch3.adb (Access_Subprogram_Declaration): Add test for the case
++ where the parent of an the access definition is an N_Object_Declaration
++ when determining the Associated_Node_For_Itype and scope of an
++ anonymous access-to-subprogram type.
+
+ * exp_ch6.adb (Expand_N_Subprogram_Declaration): Set the
+ Corresponding_Spec on the body created for a null procedure. Add ???
+@@ -3134,7 +3145,6 @@
+ 2005-07-04 Robert Dewar
+
+ PR ada/22039
+-
+ * s-sopco3.ads, s-sopco4.ads, s-sopco5.ads: Minor documentation fix
+
+ 2005-07-04 Matthew Gingell
+@@ -3186,19 +3196,19 @@
+
+ 2005-07-04 Sergey Rybin
+
+- * gnat_ugn.texi: Add description of --eol gnatpp option
++ * gnat_ugn.texi: Add description of --eol gnatpp option
+
+ 2005-07-04 Eric Botcazou
+ Thomas Quinot
+
+- * gnat_rm.texi: Add a note that pragma Unreferenced is not appropriate
++ * gnat_rm.texi: Add a note that pragma Unreferenced is not appropriate
+ if the user wants all calls of a subprogram to be flagged,
+ independently of whether they are made from within the same unit or
+ another unit.
+- Mention restriction for pragma Linker_Alias on some platforms.
+- Document pragma Linker_Constructor and Linker_Destructor.
+- Rewrite documentation of Weak_External, Linker_Section and
+- Linker_Alias pragmas.
++ Mention restriction for pragma Linker_Alias on some platforms.
++ Document pragma Linker_Constructor and Linker_Destructor.
++ Rewrite documentation of Weak_External, Linker_Section and
++ Linker_Alias pragmas.
+
+ 2005-07-04 Arnaud Charlet
+
+@@ -4165,8 +4175,8 @@
+ s-valwch.ads, s-widwch.adb, s-widwch.ads, s-wwdcha.adb, s-wwdwch.adb:
+ Rewrite to correspond to new wide character names in AI-395
+
+- * par-ch12.adb (P_Formal_Subprogram_Declaration): Recognize null
+- default procedures.
++ * par-ch12.adb (P_Formal_Subprogram_Declaration): Recognize null
++ default procedures.
+
+ 2005-06-14 Ed Schonberg
+ Robert Dewar
+@@ -4255,7 +4265,6 @@
+ 2005-06-14 Thomas Quinot
+
+ PR ada/6717
+-
+ * g-socket.ads, g-socket.adb (Inet_Addr): Special case the all-ones
+ broadcast address.
+ (Create_Selector): Bind listening socket used to create the signalling
+@@ -4327,15 +4336,15 @@
+ For objects and parameters of a generic private type, retain the '*'
+ indicator to distinguish such an entity from its type.
+
+- * ali.ads (Xref_Entity_Record): New fields Iref_File_Num and Iref_Line,
+- to store information about instantiated entities.
++ * ali.ads (Xref_Entity_Record): New fields Iref_File_Num and Iref_Line,
++ to store information about instantiated entities.
+
+- * ali.adb (Scan_ALI): Add support for parsing the reference to the
+- generic parent
++ * ali.adb (Scan_ALI): Add support for parsing the reference to the
++ generic parent
+
+- * xref_lib.adb (Skip_To_Matching_Closing_Bracket): New subprogram
+- (Parse_Identifier_Info, Parse_Token): Add support for the generic parent
+- information.
++ * xref_lib.adb (Skip_To_Matching_Closing_Bracket): New subprogram
++ (Parse_Identifier_Info, Parse_Token): Add support for the generic parent
++ information.
+
+ 2005-06-10 Doug Rupp
+ Arnaud Charlet
+@@ -4398,7 +4407,6 @@
+ 2005-06-14 Robert Dewar
+
+ PR ada/15613
+-
+ * par-ch2.adb (Scan_Pragma_Argument): New procedure
+ (P_Pragma): Implement RM 2.8(4) check for no pos args after named args
+
+@@ -4444,11 +4452,11 @@
+ characters are now considered graphic characters and hence yield false
+ in this call.
+
+- * nmake.adt: Modify header so that xnmake does not generate output
+- files with multiple blank lines.
++ * nmake.adt: Modify header so that xnmake does not generate output
++ files with multiple blank lines.
+
+- * treeprs.adt: Remove a blank line so that output from xtreeprs does
+- not have an extra blank line
++ * treeprs.adt: Remove a blank line so that output from xtreeprs does
++ not have an extra blank line
+
+ 2005-06-14 Gary Dismukes
+
+@@ -4480,7 +4488,6 @@
+ Ed Schonberg
+
+ PR ada/10671
+-
+ * sem_prag.adb: Implement pragma Persistent_BSS
+ Remove obsolete pragma Persistent_Data, Persistent_Object
+ Set Ada_Version_Explicit, for implementation of AI-362
+@@ -4545,8 +4552,8 @@
+ * nmake.adt: Modify header so that xnmake does not generate output
+ files with multiple blank lines.
+
+- * treeprs.adt: Remove a blank line so that output from xtreeprs does
+- not have an extra blank line
++ * treeprs.adt: Remove a blank line so that output from xtreeprs does
++ not have an extra blank line
+
+ 2005-06-14 Sergey Rybin
+
+@@ -4570,7 +4577,7 @@
+ Add UNNECESSARY_BLANK_LINES for -gnatyu
+ Add qualifiers /ALL_PROJECTS (-U) for GNAT PRETTY and GNAT METRIC
+
+- * ug_words: Add entry for -gnaty/Y [NO]ADA_2005_COMPATIBILITY
++ * ug_words: Add entry for -gnaty/Y [NO]ADA_2005_COMPATIBILITY
+
+ 2005-06-14 Vincent Celier
+
+@@ -4671,7 +4678,7 @@
+ object directories of project files before directories in ADA_*_PATH
+ environment variables.
+
+- * g-trasym.ads: Document that IRIX is supported
++ * g-trasym.ads: Document that IRIX is supported
+
+ 2005-06-10 Arnaud Charlet
+
+@@ -4766,9 +4773,9 @@
+
+ 2005-04-16 Laurent GUERBY
+
+- PR ada/18847
+- * a-nudira.adb (Value): Check for valid string.
+- * a-nuflra.adb (Value): Likewise.
++ PR ada/18847
++ * a-nudira.adb (Value): Check for valid string.
++ * a-nuflra.adb (Value): Likewise.
+
+ 2005-04-11 Richard Sandiford
+
+@@ -4941,7 +4948,6 @@
+ Generic_Dispatching_Constructor.
+
+ PR ada/20300
+-
+ * sem_ch8.adb (Find_Direct_Name): Go to root type for check of
+ character type cases.
+ (Analyze_Subprogram_Renaming): Add special handling for
+@@ -5241,13 +5247,12 @@
+
+ * Makefile.in: (ia64-hp-*vms*): Use s-crtl-vms64.ads.
+
+- * 5xcrtl.ads: Renamed to...
+- * s-crtl-vms64.ads: ...this new file
++ * 5xcrtl.ads: Renamed to...
++ * s-crtl-vms64.ads: ...this new file
+
+ 2005-03-17 Robert Dewar
+
+ PR ada/19519
+-
+ * namet.adb (Copy_One_Character): Set proper wide character encoding
+ for upper half character if we have upper half encoding.
+
+@@ -5623,7 +5628,6 @@
+ 2005-03-15 Robert Dewar
+
+ PR ada/13470
+-
+ * a-stunau.ads, a-stunau.adb:
+ Change interface to allow efficient (and correct) implementation
+ The previous changes to allow extra space in unbounded strings had
+@@ -5786,7 +5790,6 @@
+ PR ada/19408
+ PR ada/19140
+ PR ada/20255
+-
+ * decl.c (gnat_to_gnu_field): Reject aliased components with a
+ representation clause that prescribes a size not equal to the rounded
+ size of their types.
+@@ -5945,7 +5948,6 @@
+
+ PR ada/20226
+ PR ada/20344
+-
+ * init.c (__gnat_initialize): Do not call __gnat_install_SEH_handler()
+ when IN_RTS. This is to work around a bootstrap path problem.
+
+@@ -6656,8 +6658,7 @@
+ 2005-02-09 Eric Botcazou
+ Richard Kenner
+
+- Fix for c330001 - PR ada/19386
+-
++ PR ada/19386
+ * decl.c:
+ (gnat_to_gnu_field): Do not necessarily invoke make_packable_type
+ on the field if Pragma Component_Alignment (Storage_Unit).
+@@ -6757,7 +6758,6 @@
+ 2005-02-09 Arnaud Charlet
+
+ PR ada/16592
+-
+ * Makefile.in: Link all gnat tools with -static-libgcc, since
+ -shared-libgcc is now used by default on some systems (e.g. linux with
+ recent binutils).
+@@ -8547,7 +8547,6 @@
+ 2004-10-04 Bernard Banner
+
+ PR ada/13897
+-
+ * Makefile.in: Add section for powerpc linux
+ Add variant i-vxwork-x86.ads
+
+@@ -8823,7 +8822,6 @@
+ 2004-09-23 Robert Dewar
+
+ PR ada/17540
+-
+ * sem_prag.adb (Process_Import_Or_Interface): Don't set Is_Public here,
+ instead do this at freeze time (we won't do it if there is an address
+ clause).
+@@ -8868,7 +8866,6 @@
+ 2004-09-20 Robert Dewar