tags 636277 patch thanks I've converted the package for multiarch and fixed a build failure on Ubuntu.
Changelog: * Fix FTBFS with multiarch linux-libc-dev. - Add multiarch.dpatch to make gcc-3.3 aware of the multiarch include path. * Sync debian/control.m4 with debian/control. * Build libstdc++5 for multiarch. (Closes: #636277)
diff -u gcc-3.3-3.3.6ds1/debian/rules2 gcc-3.3-3.3.6ds1/debian/rules2 --- gcc-3.3-3.3.6ds1/debian/rules2 +++ gcc-3.3-3.3.6ds1/debian/rules2 @@ -141,6 +141,8 @@ CONFARGS += --disable-multilib endif +CONFARGS += --with-multiarch-defaults=$(DEB_HOST_MULTIARCH) + ifndef DEB_CROSS CONFARGS += $(TARGET_ALIAS) else diff -u gcc-3.3-3.3.6ds1/debian/control.m4 gcc-3.3-3.3.6ds1/debian/control.m4 --- gcc-3.3-3.3.6ds1/debian/control.m4 +++ gcc-3.3-3.3.6ds1/debian/control.m4 @@ -18,7 +18,7 @@ ifdef(`PRI', `', ` define(`PRI', `$1') ') -define(`MAINTAINER', `Debian GCC Maintainers <debian-gcc@lists.debian.org>') +define(`MAINTAINER', `Philipp Kern <pk...@debian.org>') define(`ifenabled', `ifelse(index(enabled_languages, `$1'), -1, `dnl', `$2')') @@ -28,12 +28,12 @@ Section: devel Priority: PRI(standard) Maintainer: MAINTAINER -Uploaders: Matthias Klose <d...@debian.org>, Gerhard Tonn <g...@debian.org> +Uploaders: Marc 'HE' Brockschmidt <h...@debian.org> Standards-Version: 3.6.2 ifdef(`TARGET',`dnl cross -Build-Depends: dpkg-dev (>= 1.13.9), LIBC_BUILD_DEP, m4, autoconf2.13, automake1.4 | automake (<< 1.5), libtool, autotools-dev, gawk, bzip2, dpkg-cross (>= 1.18.1), BINUTILS_BUILD_DEP, debhelper (>= 3.0.25), bison (>= 1:1.875), flex, realpath (>= 1.9.12), lsb-release`'TARGETBD +Build-Depends: dpkg-dev (>= 1.16.0), LIBC_BUILD_DEP, m4, autoconf2.13, automake1.4, libtool, autotools-dev, gawk, bzip2, dpkg-cross (>= 1.18.1), BINUTILS_BUILD_DEP, debhelper (>= 8.1.3), bison (>= 1:1.875), flex, realpath (>= 1.9.12), lsb-release`'TARGETBD ',`dnl native -Build-Depends: dpkg-dev (>= 1.13.9), LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP libunwind7-dev (>= 0.98.5-1) [ia64], libatomic-ops-dev [ia64], m4, autoconf2.13, automake1.4 | automake (<< 1.5), libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [check_no_archs], bzip2, BINUTILS_BUILD_DEP, binutils-hppa64 (>= BINUTILSV) [hppa], debhelper (>= 3.0.25), gperf (>= 2.7-3), bison (>= 1:1.875), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev [libgc_no_archs], gcc-3.4, locales [locale_no_archs !hurd-i386], procps [check_no_archs], sharutils, realpath (>= 1.9.12), lsb-release +Build-Depends: dpkg-dev (>= 1.16.0), LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP libunwind7-dev (>= 0.98.5-1) [ia64], libatomic-ops-dev [ia64], m4, autoconf2.13, automake1.4, libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [check_no_archs], bzip2, BINUTILS_BUILD_DEP, binutils-hppa64 (>= BINUTILSV) [hppa], debhelper (>= 8.1.3), gperf (>= 2.7-3), bison (>= 1:1.875), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev [libgc_no_archs], locales [locale_no_archs !hurd-i386], procps [check_no_archs], sharutils, realpath (>= 1.9.12), lsb-release Build-Depends-Indep: doxygen (>= 1.4.2-3), graphviz (>= 2.2), gsfonts-x11 ')dnl @@ -429,6 +429,8 @@ Architecture: ifdef(`TARGET',`all',`amd64 i386 lpia powerpc') Section: ifdef(`TARGET',`devel',`libs') Priority: ifdef(`TARGET',`extra',PRI(required)) +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends} Description: The GNU Standard C++ Library v3`'ifdef(`TARGET)',` (TARGET)', `') This package contains an additional runtime library for C++ programs diff -u gcc-3.3-3.3.6ds1/debian/rules.patch gcc-3.3-3.3.6ds1/debian/rules.patch --- gcc-3.3-3.3.6ds1/debian/rules.patch +++ gcc-3.3-3.3.6ds1/debian/rules.patch @@ -49,6 +49,8 @@ debian_patches += libtool-rpath +debian_patches += multiarch + ifeq ($(with_multiarch),yes) debian_patches += multiarch-include endif diff -u gcc-3.3-3.3.6ds1/debian/control gcc-3.3-3.3.6ds1/debian/control --- gcc-3.3-3.3.6ds1/debian/control +++ gcc-3.3-3.3.6ds1/debian/control @@ -4,13 +4,15 @@ Maintainer: Philipp Kern <pk...@debian.org> Uploaders: Marc 'HE' Brockschmidt <h...@debian.org> Standards-Version: 3.6.2 -Build-Depends: dpkg-dev (>= 1.13.9), libc6.1-dev (>= 2.3.2.ds1-16) [alpha ia64] | libc0.3-dev [hurd-i386] | libc0.1-dev [kfreebsd-i386] | libc12-dev (>= 2.0.ds1-1) [netbsd-i386] | libc6-dev (>= 2.3.2.ds1-16), libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libunwind7-dev (>= 0.98.5-1) [ia64], libatomic-ops-dev [ia64], m4, autoconf2.13, automake1.4, libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [!hurd-i386], bzip2, binutils (>= 2.15-7) | binutils-multiarch (>= 2.15-7), binutils-hppa64 (>= 2.15-7) [hppa], debhelper (>= 3.0.25), gperf (>= 2.7-3), bison (>= 1:1.875), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev [!avr], locales [!netbsd-i386 !hurd-i386 !hurd-i386], procps [!hurd-i386], sharutils, realpath (>= 1.9.12), lsb-release +Build-Depends: dpkg-dev (>= 1.16.0), libc6.1-dev (>= 2.3.2.ds1-16) [alpha ia64] | libc0.3-dev [hurd-i386] | libc0.1-dev [kfreebsd-i386] | libc12-dev (>= 2.0.ds1-1) [netbsd-i386] | libc6-dev (>= 2.3.2.ds1-16), libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libunwind7-dev (>= 0.98.5-1) [ia64], libatomic-ops-dev [ia64], m4, autoconf2.13, automake1.4, libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [!hurd-i386], bzip2, binutils (>= 2.15-7) | binutils-multiarch (>= 2.15-7), binutils-hppa64 (>= 2.15-7) [hppa], debhelper (>= 8.1.3), gperf (>= 2.7-3), bison (>= 1:1.875), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev [!avr], locales [!netbsd-i386 !hurd-i386 !hurd-i386], procps [!hurd-i386], sharutils, realpath (>= 1.9.12), lsb-release Build-Depends-Indep: doxygen (>= 1.4.2-3), graphviz (>= 2.2), gsfonts-x11 Package: libstdc++5 Architecture: amd64 i386 powerpc Section: libs Priority: optional +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends} Description: The GNU Standard C++ Library v3 This package contains an additional runtime library for C++ programs diff -u gcc-3.3-3.3.6ds1/debian/rules.d/binary-libstdcxx.mk gcc-3.3-3.3.6ds1/debian/rules.d/binary-libstdcxx.mk --- gcc-3.3-3.3.6ds1/debian/rules.d/binary-libstdcxx.mk +++ gcc-3.3-3.3.6ds1/debian/rules.d/binary-libstdcxx.mk @@ -115,7 +115,8 @@ rm -rf $(d_lib) dh_installdirs -p$(p_lib) $(dirs_lib) - dh_movefiles -p$(p_lib) $(files_lib) + DH_COMPAT=5 dh_install -p$(p_lib) --sourcedir=debian/tmp \ + $(files_lib) $(PF)/$(libdir)/$(DEB_HOST_MULTIARCH) dh_installdocs -p$(p_lib) echo "See /$(docdir)/$(p_base) for more information" \ only in patch2: unchanged: --- gcc-3.3-3.3.6ds1.orig/debian/patches/multiarch.dpatch +++ gcc-3.3-3.3.6ds1/debian/patches/multiarch.dpatch @@ -0,0 +1,72 @@ +#! /bin/sh -e + +# multiarch.dpatch +# +# Add multiarch support to GCC. + +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 && autoconf2.13 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + rm -f ${dir}gcc/configure + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +diff -Nur gcc-3.3.6ds1.orig/gcc/config.gcc gcc-3.3.6ds1/gcc/config.gcc +--- gcc-3.3.6ds1.orig/gcc/config.gcc 2004-04-29 06:42:47.000000000 +0200 ++++ gcc-3.3.6ds1/gcc/config.gcc 2011-03-30 19:47:22.279859357 +0200 +@@ -3040,6 +3040,13 @@ + fi + fi + ++multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'` ++if test x${with_multiarch_defaults} != x; then ++ multiarch_defaults=${with_multiarch_defaults} ++fi ++multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__" ++tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\"" ++ + # Save data on machine being used to compile GCC in build_xm_file. + # Save data on host machine in vars host_xm_file and host_xmake_file. + if test x$pass1done = x +diff -Nur gcc-3.3.6ds1.orig/gcc/configure.in gcc-3.3.6ds1/gcc/configure.in +--- gcc-3.3.6ds1.orig/gcc/configure.in 2004-04-01 18:55:22.000000000 +0200 ++++ gcc-3.3.6ds1/gcc/configure.in 2011-03-30 19:12:27.615379339 +0200 +@@ -301,6 +301,9 @@ + [], [enable_multilib=yes]) + AC_SUBST(enable_multilib) + ++AC_ARG_WITH(multiarch-defaults, ++[ --with-multiarch-defaults set the default multiarch directory.],) ++ + # Enable expensive internal checks + AC_ARG_ENABLE(checking, + [ --enable-checking[=LIST] +diff -Nur gcc-3.3.6ds1.orig/gcc/cppdefault.c gcc-3.3.6ds1/gcc/cppdefault.c +--- gcc-3.3.6ds1.orig/gcc/cppdefault.c 2004-05-24 11:40:58.000000000 -0400 ++++ gcc-3.3.6ds1/gcc/cppdefault.c 2004-05-24 11:58:39.000000000 -0400 +@@ -66,6 +70,9 @@ + /* Some systems have an extra dir of include files. */ + { SYSTEM_INCLUDE_DIR, 0, 0, 0, 1 }, + #endif ++#ifdef STANDARD_INCLUDE_DIR ++ { STANDARD_INCLUDE_DIR "/" MULTIARCH_DEFAULTS, STANDARD_INCLUDE_COMPONENT, 0, 0, 1 }, ++#endif + #ifdef STANDARD_INCLUDE_DIR + /* /usr/include comes dead last. */ + { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1 },