Tags: patch thanks Hello,
Al Viro has worked out a patch[1] which fixes multilib cross compilers on GCC 4.3 and it has been included on GCC CVS HEAD, http://svn.debian.org/viewsvn/gcccvs/branches/sid/gcc-4.3/debian/changelog?view=markup This patch still needs testing for all arches and porting to GCC 4.5 diff -urN X/debian/patches/cross-biarch.patch gcc-4.3-4.3.2/debian/patches/cross-biarch.patch --- X/debian/patches/cross-biarch.dpatch 1969-12-31 19:00:00.000000000 -0500 +++ gcc-4.3-4.3.2/debian/patches/cross-biarch.dpatch 2010-08-24 09:19:26.000000000 -0400 @@ -0,0 +1,102 @@ +#! /bin/sh -e +# +# DP: Fix the location of target's libs in cross-build for biarch + +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 $pdir -f --no-backup-if-mismatch -p0 < $0 + cd ${dir} && autoconf + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + cd ${dir} && autoconf + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +--- config-ml.in 2010-08-24 01:48:38.000000000 -0400 ++++ config-ml.in 2010-08-24 03:56:12.000000000 -0400 +@@ -540,7 +540,12 @@ + else \ + if [ -d ../$${dir}/$${lib} ]; then \ + flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ +- if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ ++ libsuffix_="$${dir}"; \ ++ if [ "$${dir}" = "n32" ]; then libsuffix_=32; fi; \ ++ if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \ ++ -B$(build_tooldir)/lib/, \ ++ -B$(build_tooldir)/lib$${libsuffix_}/, \ ++ $(FLAGS_TO_PASS)) \ + CFLAGS="$(CFLAGS) $${flags}" \ + CCASFLAGS="$(CCASFLAGS) $${flags}" \ + FCFLAGS="$(FCFLAGS) $${flags}" \ +@@ -791,6 +796,13 @@ + GCJ_=$GCJ' ' + GFORTRAN_=$GFORTRAN' ' + else ++ if [ "${ml_dir}" = "." ]; then ++ FILTER_="s!X\\(.*\\)!\\1!p" ++ elif [ "${ml_dir}" = "n32" ]; then # mips n32 -> lib32 ++ FILTER_="s!X\\(.*\\)/!\\132/!p" ++ else ++ FILTER_="s!X\\(.*\\)/!\\1${ml_dir}/!p" ++ fi + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo "${ML_POPDIR}" | sed 's,.,.,g'` +@@ -799,6 +811,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; ++ -B*/lib/) ++ CC_="${CC_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -811,6 +825,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ CXX_="${CXX_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -823,6 +839,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ F77_="${F77_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -835,6 +853,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -847,6 +867,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) diff -urN X/debian/rules.patch gcc-4.3-4.3.2/debian/rules.patch --- X/debian/rules.patch 2010-08-24 01:16:53.000000000 -0400 +++ gcc-4.3-4.3.2/debian/rules.patch 2010-08-24 09:19:26.000000000 -0400 @@ -231,6 +231,9 @@ endif debian_patches += config-ml + ifeq ($(DEB_CROSS),yes) + debian_patches += cross-biarch + endif ifeq ($(DEB_TARGET_ARCH),powerpc) debian_patches += powerpc-biarch endif diff -urN X/debian/rules2 gcc-4.3-4.3.2/debian/rules2 --- X/debian/rules2 2010-08-24 01:16:53.000000000 -0400 +++ gcc-4.3-4.3.2/debian/rules2 2010-08-24 09:21:20.000000000 -0400 @@ -1719,6 +1719,10 @@ mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64 cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/ endif + ifeq ($(DEB_TARGET_ARCH),powerpc) + : # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu + cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/ + endif endif chmod 755 debian/dh_* diff -urN X/debian/rules.conf gcc-4.3-4.3.2/debian/rules.conf --- X/debian/rules.conf 2010-08-24 01:16:53.000000000 -0400 +++ gcc-4.3-4.3.2/debian/rules.conf 2010-08-24 14:25:39.000000000 -0400 @@ -485,7 +485,7 @@ ifeq ($(DEB_CROSS),yes) languages = c c++ objc objpp - addons = libgcc lib64gcc lib32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase + addons = libgcc lib64gcc lib32gcc libn32gcc libcxx lib32cxx lib64cxx libn32cxx cdev c++dev libobjc objcdev objppdev gccxbase else languages = ada c c++ fortran java objc objpp # pascal addons = gccbase cdev c++dev fdev libgcj libgcjdev gcjdoc libgnat libs \ diff -u X/debian/rules.d/binary-libstdcxx-cross.mk gcc-4.3-4.3.2/debian/rules.d/binary-libstdcxx-cross.mk --- X/debian/rules.d/binary-libstdcxx-cross.mk 2010-08-24 01:16:53.000000000 -0400 +++ gcc-4.3-4.3.2/debian/rules.d/binary-libstdcxx-cross.mk 2010-08-24 15:37:12.000000000 -0400 @@ -265,6 +265,57 @@ trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) +$(binary_stamp)-libn32stdcxx: $(install_stamp) + dh_testdir + dh_testroot + mv $(install_stamp) $(install_stamp)-tmp + + rm -rf $(d_libn32) + dh_installdirs -p$(p_libn32) $(dirs_lib32) + DH_COMPAT=2 dh_movefiles -p$(p_libn32) $(files_lib32) + + dh_installdirs -p$(p_dbgn32) \ + $(PF)/$(DEB_TARGET_GNU_TYPE)/lib32 + mv $(d)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/debug $(d_dbgn32)/$(PF)/$(DEB_TARGET_GNU_TYPE)/lib32/. + + mkdir -p $(d_dbgn32) + PATH=/usr/share/dpkg-cross:$$PATH dh_strip -p$(p_libn32) --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_libn32)/usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug + mv $(d_libn32)/usr/lib/debug/usr/$(DEB_TARGET_GNU_TYPE)/lib32/* $(d_libn32)/usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug/ + rm -rf $(d_libn32)/usr/lib32 + # End workaround + find $(d_libn32) + tar -C $(d_libn32) -c -f - usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug | tar -v -C $(d_dbgn32) -x -f - + rm -rf $(d_libn32)/usr/$(DEB_TARGET_GNU_TYPE)/lib32/debug + + dh_installdocs -p$(p_libn32) + echo "See /$(docdir)/$(p_base) for more information" \ + > $(d_libn32)/$(docdir)/$(p_libn32)/README.Debian + dh_installchangelogs -p$(p_libn32) + debian/dh_doclink -p$(p_dbgn32) $(p_libn32) + + debian/dh_rmemptydirs -p$(p_libn32) + dh_compress -p$(p_libn32) + dh_fixperms -p$(p_libn32) + dh_makeshlibs -p$(p_libn32) -V '$(p_libn32) (>= $(DEB_STDCXX_SOVERSION))' -n + sed s/$(cross_lib_arch)//g < debian/$(p_libn32)/DEBIAN/shlibs > debian/$(p_libn32)/DEBIAN/shlibs.fixed + mv debian/$(p_libn32)/DEBIAN/shlibs.fixed debian/$(p_libn32)/DEBIAN/shlibs + mkdir debian/$(p_libn32)-deps + ln -s "`readlink -e /usr/$(DEB_TARGET_GNU_TYPE)/lib32`" debian/$(p_libn32)-deps/lib + ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_shlibdeps -p$(p_libn32) -L$(p_libn32)-deps + sed 's/\(lib[^ ]*\) /\1$(cross_lib_arch) /g' < debian/$(p_libn32).substvars > debian/$(p_libn32).substvars.new + mv debian/$(p_libn32).substvars.new debian/$(p_libn32).substvars + dh_gencontrol -p$(p_libn32) -- -v$(DEB_VERSION) $(common_substvars) + #dh_gencontrol -p$(p_dbgn32) -- -v$(DEB_VERSION) $(common_substvars) + + dh_installdeb -p$(p_libn32) + dh_md5sums -p$(p_libn32) + dh_builddeb -p$(p_libn32) + + trap '' 1 2 3 15; touch $@; mv $(install_stamp)-tmp $(install_stamp) + # ---------------------------------------------------------------------- libcxxdev_deps = $(install_stamp) ifeq ($(with_libcxx),yes) [1] ftp://ftp.linux.org.uk/pub/people/viro/gcc-4.3-cross-biarch For GCC 4.4, it might be a bit early, but: diff -urN X-gcc/debian/control.m4 gcc-4.4-4.4.4/debian/control.m4 --- X-gcc/debian/control.m4 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/control.m4 2010-08-25 10:22:56.000000000 -0400 @@ -367,7 +367,7 @@ ifdef(`TARGET', `', ` ifenabled(`libgmath',` -Package: libgccmath`'GCCMATH_SO +Package: libgccmath`'GCCMATH_SO`'LS Architecture: i386 Section: libs Priority: PRI(optional) @@ -375,7 +375,7 @@ Description: GCC math support library Support library for GCC. -Package: lib32gccmath`'GCCMATH_SO +Package: lib32gccmath`'GCCMATH_SO`'LS Architecture: amd64 Section: libs Priority: PRI(optional) @@ -383,7 +383,7 @@ Description: GCC math support library (32bit) Support library for GCC. -Package: lib64gccmath`'GCCMATH_SO +Package: lib64gccmath`'GCCMATH_SO`'LS Architecture: i386 Section: libs Priority: PRI(optional) @@ -576,8 +576,8 @@ The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: lib32mudflap`'MF_SO -Architecture: biarch32_archs +Package: lib32mudflap`'MF_SO`'LS +Architecture: ifdef(`TARGET',`all',`biarch32_archs') Section: libs Priority: PRI(optional) Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends} @@ -587,17 +587,17 @@ The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: lib32mudflap`'MF_SO-dbg -Architecture: biarch32_archs +Package: lib32mudflap`'MF_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarch32_archs') Section: debug Priority: extra -Depends: BASEDEP, lib32mudflap`'MF_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib32mudflap`'MF_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC mudflap shared support libraries (32 bit debug symbols) The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: lib64mudflap`'MF_SO -Architecture: biarch64_archs +Package: lib64mudflap`'MF_SO`'LS +Architecture: ifdef(`TARGET',`all',`biarch64_archs') Section: libs Priority: PRI(optional) Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends} @@ -606,17 +606,17 @@ The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: lib64mudflap`'MF_SO-dbg -Architecture: biarch64_archs +Package: lib64mudflap`'MF_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarch64_archs') Section: debug Priority: extra -Depends: BASEDEP, lib64mudflap`'MF_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib64mudflap`'MF_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC mudflap shared support libraries (64 bit debug symbols) The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: libn32mudflap`'MF_SO -Architecture: biarchn32_archs +Package: libn32mudflap`'MF_SO`'LS +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Section: libs Priority: PRI(optional) Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends} @@ -625,11 +625,11 @@ The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. -Package: libn32mudflap`'MF_SO-dbg -Architecture: biarchn32_archs +Package: libn32mudflap`'MF_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Section: debug Priority: extra -Depends: BASEDEP, libn32mudflap`'MF_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, libn32mudflap`'MF_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC mudflap shared support libraries (n32 debug symbols) The libmudflap libraries are used by GCC for instrumenting pointer and array dereferencing operations. @@ -726,11 +726,11 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers in the GNU Compiler Collection. -Package: lib32gomp`'GOMP_SO-dbg -Architecture: biarch32_archs +Package: lib32gomp`'GOMP_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarch32_archs') Section: debug Priority: extra -Depends: BASEDEP, lib32gomp`'GOMP_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib32gomp`'GOMP_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC OpenMP (GOMP) support library (32 bit debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers in the GNU Compiler Collection. @@ -744,29 +744,29 @@ GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers in the GNU Compiler Collection. -Package: lib64gomp`'GOMP_SO-dbg -Architecture: biarch64_archs +Package: lib64gomp`'GOMP_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarch64_archs') Section: debug Priority: extra -Depends: BASEDEP, lib64gomp`'GOMP_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib64gomp`'GOMP_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC OpenMP (GOMP) support library (64bit debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers in the GNU Compiler Collection. Package: libn32gomp`'GOMP_SO`'LS Section: ifdef(`TARGET',`devel',`libs') -Architecture: biarchn32_archs +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Priority: ifdef(`TARGET',`extra',`PRI(optional)') Depends: BASEDEP, ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends} Description: GCC OpenMP (GOMP) support library (n32) GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers in the GNU Compiler Collection. -Package: libn32gomp`'GOMP_SO-dbg -Architecture: biarchn32_archs +Package: libn32gomp`'GOMP_SO-dbg`'LS +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Section: debug Priority: extra -Depends: BASEDEP, libn32gomp`'GOMP_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, libn32gomp`'GOMP_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: GCC OpenMP (GOMP) support library (n32 debug symbols) GOMP is an implementation of OpenMP for the C, C++, and Fortran 95 compilers @@ -874,7 +874,7 @@ ')`'dnl libobjc ifenabled(`lib64objc',` -Package: lib64objc`'OBJC_SO +Package: lib64objc`'OBJC_SO`'LS Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`biarch64_archs') Priority: ifdef(`TARGET',`extra',`PRI(optional)') @@ -884,7 +884,7 @@ Package: lib64objc`'OBJC_SO-dbg`'LS Section: debug -Architecture: biarch64_archs +Architecture: ifdef(`TARGET',`all',`biarch64_archs') Priority: extra Depends: BASEDEP, lib64objc`'OBJC_SO`'LS (= ${gcc:Version}), lib64gcc`'GCC_SO-dbg`'LS, ${misc:Depends} Description: Runtime library for GNU Objective-C applications (64 bit debug symbols) @@ -892,7 +892,7 @@ ')`'dnl lib64objc ifenabled(`lib32objc',` -Package: lib32objc`'OBJC_SO +Package: lib32objc`'OBJC_SO`'LS Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`biarch32_archs') Priority: ifdef(`TARGET',`extra',`PRI(optional)') @@ -903,7 +903,7 @@ Package: lib32objc`'OBJC_SO-dbg`'LS Section: debug -Architecture: biarch32_archs +Architecture: ifdef(`TARGET',`all',`biarch32_archs') Priority: extra Depends: BASEDEP, lib32objc`'OBJC_SO`'LS (= ${gcc:Version}), lib32gcc`'GCC_SO-dbg`'LS, ${misc:Depends} Description: Runtime library for GNU Objective-C applications (32 bit debug symbols) @@ -911,7 +911,7 @@ ')`'dnl lib32objc ifenabled(`libn32objc',` -Package: libn32objc`'OBJC_SO +Package: libn32objc`'OBJC_SO`'LS Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Priority: ifdef(`TARGET',`extra',`PRI(optional)') @@ -921,7 +921,7 @@ Package: libn32objc`'OBJC_SO-dbg`'LS Section: debug -Architecture: biarchn32_archs +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Priority: extra Depends: BASEDEP, libn32objc`'OBJC_SO`'LS (= ${gcc:Version}), libn32gcc`'GCC_SO-dbg`'LS, ${misc:Depends} Description: Runtime library for GNU Objective-C applications (n32 debug symbols) @@ -1011,11 +1011,11 @@ Library needed for GNU Fortran applications linked against the shared library. -Package: lib64gfortran`'FORTRAN_SO-dbg +Package: lib64gfortran`'FORTRAN_SO-dbg`'LS Section: debug -Architecture: biarch64_archs +Architecture: ifdef(`TARGET',`all',`biarch64_archs') Priority: extra -Depends: BASEDEP, lib64gfortran`'FORTRAN_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib64gfortran`'FORTRAN_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: Runtime library for GNU Fortran applications (64bit debug symbols) Library needed for GNU Fortran applications linked against the shared library. @@ -1032,11 +1032,11 @@ Library needed for GNU Fortran applications linked against the shared library. -Package: lib32gfortran`'FORTRAN_SO-dbg +Package: lib32gfortran`'FORTRAN_SO-dbg`'LS Section: debug -Architecture: biarch32_archs +Architecture: ifdef(`TARGET',`all',`biarch32_archs') Priority: extra -Depends: BASEDEP, lib32gfortran`'FORTRAN_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, lib32gfortran`'FORTRAN_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: Runtime library for GNU Fortran applications (32 bit debug symbols) Library needed for GNU Fortran applications linked against the shared library. @@ -1052,11 +1052,11 @@ Library needed for GNU Fortran applications linked against the shared library. -Package: libn32gfortran`'FORTRAN_SO-dbg +Package: libn32gfortran`'FORTRAN_SO-dbg`'LS Section: debug -Architecture: biarchn32_archs +Architecture: ifdef(`TARGET',`all',`biarchn32_archs') Priority: extra -Depends: BASEDEP, libn32gfortran`'FORTRAN_SO (= ${gcc:Version}), ${misc:Depends} +Depends: BASEDEP, libn32gfortran`'FORTRAN_SO`'LS (= ${gcc:Version}), ${misc:Depends} Description: Runtime library for GNU Fortran applications (n32 debug symbols) Library needed for GNU Fortran applications linked against the shared library. diff -urN X-gcc/debian/patches/cross-biarch.diff gcc-4.4-4.4.4/debian/patches/cross-biarch.diff --- X-gcc/debian/patches/cross-biarch.diff 1969-12-31 19:00:00.000000000 -0500 +++ gcc-4.4-4.4.4/debian/patches/cross-biarch.diff 2010-08-25 00:49:09.000000000 -0400 @@ -0,0 +1,79 @@ +# DP: Fix the location of target's libs in cross-build for biarch + +--- + +--- a/src/config-ml.in 2010-08-24 01:48:38.000000000 -0400 ++++ b/src/config-ml.in 2010-08-24 03:56:12.000000000 -0400 +@@ -540,7 +540,12 @@ + else \ + if [ -d ../$${dir}/$${lib} ]; then \ + flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ +- if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ ++ libsuffix_="$${dir}"; \ ++ if [ "$${dir}" = "n32" ]; then libsuffix_=32; fi; \ ++ if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \ ++ -B$(build_tooldir)/lib/, \ ++ -B$(build_tooldir)/lib$${libsuffix_}/, \ ++ $(FLAGS_TO_PASS)) \ + CFLAGS="$(CFLAGS) $${flags}" \ + CCASFLAGS="$(CCASFLAGS) $${flags}" \ + FCFLAGS="$(FCFLAGS) $${flags}" \ +@@ -791,6 +796,13 @@ + GCJ_=$GCJ' ' + GFORTRAN_=$GFORTRAN' ' + else ++ if [ "${ml_dir}" = "." ]; then ++ FILTER_="s!X\\(.*\\)!\\1!p" ++ elif [ "${ml_dir}" = "n32" ]; then # mips n32 -> lib32 ++ FILTER_="s!X\\(.*\\)/!\\132/!p" ++ else ++ FILTER_="s!X\\(.*\\)/!\\1${ml_dir}/!p" ++ fi + # Create a regular expression that matches any string as long + # as ML_POPDIR. + popdir_rx=`echo "${ML_POPDIR}" | sed 's,.,.,g'` +@@ -799,6 +811,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; ++ -B*/lib/) ++ CC_="${CC_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -811,6 +825,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ CXX_="${CXX_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -823,6 +839,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ F77_="${F77_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -835,6 +853,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) +@@ -847,6 +867,8 @@ + case $arg in + -[BIL]"${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; ++ -B*/lib/) ++ GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "$FILTER_"`' ' ;; + "${ML_POPDIR}"/*) + GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; + *) diff -urN X-gcc/debian/rules.d/binary-cxx.mk gcc-4.4-4.4.4/debian/rules.d/binary-cxx.mk --- X-gcc/debian/rules.d/binary-cxx.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-cxx.mk 2010-08-25 10:36:00.000000000 -0400 @@ -1,6 +1,9 @@ +# TODO: enable later (requires updating control generation) +ifneq ($(DEB_CROSS),yes) ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32))) arch_binaries := $(arch_binaries) cxx-multi endif +endif arch_binaries := $(arch_binaries) cxx dirs_cxx = \ diff -urN X-gcc/debian/rules.d/binary-fortran.mk gcc-4.4-4.4.4/debian/rules.d/binary-fortran.mk --- X-gcc/debian/rules.d/binary-fortran.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-fortran.mk 2010-08-25 10:51:27.000000000 -0400 @@ -12,9 +12,12 @@ endif ifeq ($(with_fdev),yes) + # TODO: enable later (requires updating control generation) + ifneq ($(DEB_CROSS),yes) ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32))) arch_binaries := $(arch_binaries) fdev-multi endif + endif arch_binaries := $(arch_binaries) fdev ifneq ($(DEB_CROSS),yes) ifneq ($(GFDL_INVARIANT_FREE),yes) @@ -31,9 +34,9 @@ p_f64lib= lib64gfortran$(FORTRAN_SONAME)$(cross_lib_arch) p_fn32lib= libn32gfortran$(FORTRAN_SONAME)$(cross_lib_arch) p_flibdbg = libgfortran$(FORTRAN_SONAME)-dbg$(cross_lib_arch) -p_f32libdbg = lib32gfortran$(FORTRAN_SONAME)-dbg -p_f64libdbg = lib64gfortran$(FORTRAN_SONAME)-dbg -p_fn32libdbg = libn32gfortran$(FORTRAN_SONAME)-dbg +p_f32libdbg = lib32gfortran$(FORTRAN_SONAME)-dbg$(cross_lib_arch) +p_f64libdbg = lib64gfortran$(FORTRAN_SONAME)-dbg$(cross_lib_arch) +p_fn32libdbg = libn32gfortran$(FORTRAN_SONAME)-dbg$(cross_lib_arch) d_g95 = debian/$(p_g95) d_g95_m = debian/$(p_g95_m) diff -urN X-gcc/debian/rules.d/binary-libgcc.mk gcc-4.4-4.4.4/debian/rules.d/binary-libgcc.mk --- X-gcc/debian/rules.d/binary-libgcc.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-libgcc.mk 2010-08-25 08:39:03.000000000 -0400 @@ -96,7 +96,7 @@ $(RPF)/lib64 ifeq ($(with_shared_libgcc),yes) - mv $(d)/$(PF)/lib64/libgcc_s.so.$(GCC_SONAME) $(d_l64gcc)/lib64/. + mv $(d)/$(PFL)/lib64/libgcc_s.so.$(GCC_SONAME) $(d_l64gcc)/$(RPF)/lib64/. endif debian/dh_doclink -p$(p_l64gcc) $(p_base) diff -urN X-gcc/debian/rules.d/binary-libgomp.mk gcc-4.4-4.4.4/debian/rules.d/binary-libgomp.mk --- X-gcc/debian/rules.d/binary-libgomp.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-libgomp.mk 2010-08-25 09:56:37.000000000 -0400 @@ -68,9 +68,9 @@ rm -rf $(d_l64gomp) $(d_l64gompdbg) dh_installdirs -p$(p_l64gomp) \ - $(PF)/lib64 + $(PFL)/lib64 DH_COMPAT=2 dh_movefiles -p$(p_l64gomp) \ - $(PF)/lib64/libgomp.so.* + $(PFL)/lib64/libgomp.so.* debian/dh_doclink -p$(p_l64gomp) $(p_base) debian/dh_doclink -p$(p_l64gompdbg) $(p_base) @@ -127,9 +127,9 @@ rm -rf $(d_ln32gomp) $(d_ln32gompdbg) dh_installdirs -p$(p_ln32gomp) \ - $(PF)/$(libn32) + $(PFL)/$(libn32) DH_COMPAT=2 dh_movefiles -p$(p_ln32gomp) \ - $(PF)/$(libn32)/libgomp.so.* + $(PFL)/$(libn32)/libgomp.so.* debian/dh_doclink -p$(p_ln32gomp) $(p_base) debian/dh_doclink -p$(p_ln32gompdbg) $(p_base) diff -urN X-gcc/debian/rules.d/binary-libstdcxx.mk gcc-4.4-4.4.4/debian/rules.d/binary-libstdcxx.mk --- X-gcc/debian/rules.d/binary-libstdcxx.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-libstdcxx.mk 2010-08-25 10:20:02.000000000 -0400 @@ -37,9 +37,9 @@ 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 = $(p_lib64)$(libstdc_ext)-dbg$(cross_lib_arch) -p_dbg32 = $(p_lib32)$(libstdc_ext)-dbg$(cross_lib_arch) -p_dbgn32= $(p_libn32)$(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) +p_dbgn32= libn32stdc++$(CXX_SONAME)$(libstdc_ext)-dbg$(cross_lib_arch) p_libd = libstdc++$(CXX_SONAME)$(libstdc_ext)-doc d_lib = debian/$(p_lib) @@ -200,12 +200,12 @@ rm -rf $(d_dbg64) dh_installdirs -p$(p_dbg64) \ - $(PF)/lib64 + $(PFL)/lib64 ifeq ($(with_lib64cxx),yes) - cp -a $(d)/$(PF)/lib64/libstdc++.so.* \ - $(d_dbg64)/$(PF)/lib64/. + cp -a $(d)/$(PFL)/lib64/libstdc++.so.* \ + $(d_dbg64)/$(PFL)/lib64/. dh_strip -p$(p_dbg64) --keep-debug - rm -f $(d_dbg64)/$(PF)/lib64/libstdc++.so.* + rm -f $(d_dbg64)/$(PFL)/lib64/libstdc++.so.* ifneq ($(with_common_libs),yes) : # remove the debug symbols for libstdc++ built by a newer version of GCC rm -rf $(d_dbg64)/usr/lib/debug/$(PF) @@ -215,8 +215,8 @@ > debian/$(p_dbg64).substvars ifeq ($(with_debug),yes) - mv $(d)/$(PF)/lib64/debug $(d_dbg64)/$(PF)/lib64/. - rm -f $(d_dbg64)/$(PF)/lib64/debug/libstdc++_pic.a + mv $(d)/$(PFL)/lib64/debug $(d_dbg64)/$(PFL)/lib64/. + rm -f $(d_dbg64)/$(PFL)/lib64/debug/libstdc++_pic.a endif debian/dh_doclink -p$(p_dbg64) $(p_base) @@ -328,10 +328,10 @@ dh_installdirs -p$(p_libn32) \ $(docdir) \ - $(PF)/$(libn32) + $(PFL)/$(libn32) - cp -a $(d)/$(PF)/$(libn32)/libstdc++.so.* \ - $(d_libn32)/$(PF)/$(libn32)/. + cp -a $(d)/$(PFL)/$(libn32)/libstdc++.so.* \ + $(d_libn32)/$(PFL)/$(libn32)/. debian/dh_doclink -p$(p_libn32) $(p_base) debian/dh_rmemptydirs -p$(p_libn32) @@ -356,21 +356,21 @@ rm -rf $(d_dbgn32) dh_installdirs -p$(p_dbgn32) \ - $(PF)/$(libn32) + $(PFL)/$(libn32) ifeq ($(with_libn32cxx),yes) - cp -a $(d)/$(PF)/$(libn32)/libstdc++.so.* \ - $(d_dbgn32)/$(PF)/$(libn32)/. + cp -a $(d)/$(PFL)/$(libn32)/libstdc++.so.* \ + $(d_dbgn32)/$(PFL)/$(libn32)/. dh_strip -p$(p_dbgn32) --keep-debug ifneq ($(with_common_libs),yes) : # remove the debug symbols for libstdc++ built by a newer version of GCC rm -rf $(d_dbgn32)/usr/lib/debug/$(PF) endif - rm -f $(d_dbgn32)/$(PF)/$(libn32)/libstdc++.so.* + rm -f $(d_dbgn32)/$(PFL)/$(libn32)/libstdc++.so.* endif ifeq ($(with_debug),yes) - mv $(d)/$(PF)/$(libn32)/debug $(d_dbgn32)/$(PF)/$(libn32)/. + mv $(d)/$(PFL)/$(libn32)/debug $(d_dbgn32)/$(PFL)/$(libn32)/. rm -f $(d_dbgn32)/$(libn32)/debug/libstdc++_pic.a endif diff -urN X-gcc/debian/rules.d/binary-objc.mk gcc-4.4-4.4.4/debian/rules.d/binary-objc.mk --- X-gcc/debian/rules.d/binary-objc.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-objc.mk 2010-08-25 10:48:40.000000000 -0400 @@ -1,6 +1,9 @@ +# TODO: enable later (requires updating control generation) +ifneq ($(DEB_CROSS),yes) ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32))) arch_binaries := $(arch_binaries) objc-multi endif +endif arch_binaries := $(arch_binaries) objc p_objc = gobjc$(pkg_ver)$(cross_bin_arch) @@ -24,7 +27,7 @@ dh_testroot mv $(install_stamp) $(install_stamp)-tmp - rm -f $(d)/$(PF)/$(libdir)/libobjc.{la,so} + rm -f $(d)/$(PFL)/$(libdir)/libobjc.{la,so} mv $(d)/$(PFL)/$(libdir)/libobjc*.a $(d)/$(gcc_lib_dir)/ rm -rf $(d_objc) @@ -72,14 +75,14 @@ $(gcc_lib_dir)/$(biarchsubdirs) ifeq ($(biarch64),yes) - rm -f $(d)/$(PF)/lib64/libobjc*.{la,so} + rm -f $(d)/$(PFL)/lib64/libobjc*.{la,so} mkdir -p $(d_objc_m)/$(gcc_lib_dir)/$(biarch64subdir) - mv $(d)/$(PF)/lib64/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarch64subdir)/ + mv $(d)/$(PFL)/lib64/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarch64subdir)/ dh_link -p$(p_objc_m) \ - /$(PF)/lib64/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarch64subdir)/libobjc.so + /$(PFL)/lib64/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarch64subdir)/libobjc.so ifeq ($(with_objc_gc),yes) dh_link -p$(p_objc_m) \ - /$(PF)/lib64/libobjc_gc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarch64subdir)/libobjc_gc.so + /$(PFL)/lib64/libobjc_gc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarch64subdir)/libobjc_gc.so endif endif ifeq ($(biarch32),yes) @@ -94,9 +97,9 @@ endif endif ifeq ($(biarchn32),yes) - rm -f $(d)/$(PF)/$(libn32)/libobjc*.{la,so} + rm -f $(d)/$(PFL)/$(libn32)/libobjc*.{la,so} mkdir -p $(d_objc_m)/$(gcc_lib_dir)/$(biarchn32subdir) - mv $(d)/$(PF)/$(libn32)/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarchn32subdir)/ + mv $(d)/$(PFL)/$(libn32)/libobjc*.a $(d_objc_m)/$(gcc_lib_dir)/$(biarchn32subdir)/ dh_link -p$(p_objc_m) \ /$(libn32)/libobjc.so.$(OBJC_SONAME) /$(gcc_lib_dir)/$(biarchn32subdir)/libobjc.so ifeq ($(with_objc_gc),yes) diff -urN X-gcc/debian/rules.d/binary-objcxx.mk gcc-4.4-4.4.4/debian/rules.d/binary-objcxx.mk --- X-gcc/debian/rules.d/binary-objcxx.mk 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.d/binary-objcxx.mk 2010-08-25 10:36:58.000000000 -0400 @@ -1,6 +1,9 @@ +# TODO: enable later (requires updating control generation) +ifneq ($(DEB_CROSS),yes) ifneq (,$(filter yes, $(biarch64) $(biarch32) $(biarchn32))) arch_binaries := $(arch_binaries) objcxx-multi endif +endif arch_binaries := $(arch_binaries) objcxx p_objcx = gobjc++$(pkg_ver)$(cross_bin_arch) diff -urN X-gcc/debian/rules.patch gcc-4.4-4.4.4/debian/rules.patch --- X-gcc/debian/rules.patch 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules.patch 2010-08-25 00:49:59.000000000 -0400 @@ -257,6 +257,9 @@ endif debian_patches += config-ml + ifeq ($(DEB_CROSS),yes) + debian_patches += cross-biarch + endif ifeq ($(DEB_TARGET_ARCH),powerpc) debian_patches += powerpc-biarch endif diff -urN X-gcc/debian/rules2 gcc-4.4-4.4.4/debian/rules2 --- X-gcc/debian/rules2 2010-08-25 00:48:45.000000000 -0400 +++ gcc-4.4-4.4.4/debian/rules2 2010-08-25 00:49:59.000000000 -0400 @@ -1921,6 +1921,10 @@ mkdir -p $(d)/$(PF)/s390-linux-gnu/lib64 cp -a $(d)/$(PF)/s390x-linux-gnu/lib64/* $(d)/$(PF)/s390-linux-gnu/lib64/ endif + ifeq ($(DEB_TARGET_ARCH),powerpc) + : # ppc 64bit build slaps libgcc and libstdc++ to powerpc64-linux-gnu + cp -a $(d)/$(PF)/powerpc64-linux-gnu/lib64/* $(d)/$(PF)/powerpc-linux-gnu/lib64/ + endif endif chmod 755 debian/dh_* [2] ftp://ftp.linux.org.uk/pub/people/viro/gcc-cross-patch-4.4 -- Héctor Orón "Our Sun unleashes tremendous flares expelling hot gas into the Solar System, which one day will disconnect us." -- Day DVB-T stop working nicely Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org