Debian Bug report logs - #504487
gcc-4.3: build cross toolchain for powerpc fails

version graph

Package: gcc-4.3; Maintainer for gcc-4.3 is Debian GCC Maintainers <debian-gcc@lists.debian.org>;

Reported by: Uwe Kleine-König <ukleinek@strlen.de>

Date: Tue, 4 Nov 2008 12:09:06 UTC

Severity: wishlist

Found in versions gcc-4.3/4.3.2-1, gcc-4.3/4.3.4-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, ukleinek@informatik.uni-freiburg.de, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 12:09:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Kleine-König <ukleinek@strlen.de>:
New Bug report received and forwarded. Copy sent to ukleinek@informatik.uni-freiburg.de, Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 12:09:10 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Uwe Kleine-König <ukleinek@strlen.de>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 04 Nov 2008 13:06:43 +0100
Package: gcc-4.3
Version: 4.3.2-1
Severity: wishlist

Hello,

I tried building a cross toolchain for powerpc following the steps on
http://www.emdebian.org/tools/crossdev.html (i.e. installing
binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).

I succeeded with gcc-4.2 for powerpc and arm and gcc-4.3 for arm.
gcc-4.3 for powerpc fails with

	/home/ukleinek/debsrc/gcc-4.3-4.3.2/build/./gcc/xgcc -B/home/ukleinek/debsrc/gcc-4.3-4.3.2/build/./gcc/ -B/usr/powerpc-linux-gnu/bin/ -B/usr/powerpc-linux-gnu/lib/ -isystem /usr/powerpc-linux-gnu/include -isystem /usr/powerpc-linux-gnu/sys-include -O2  -O2 -g -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o 64/libgcc_s.so.1.tmp -O2 -g -g -O2 -m64 -fPIC -mstrict-align -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o darwin-ldouble_s.o ppc64-fp_s.o adddf3_s.o addsf3_s.o divdf3_s.o divsf3_s.o eqdf2_s.o eqsf2_s.o extendsfdf2_s.o fixdfsi_s.o fixsfsi_s.o floatsidf_s.o floatsisf_s.o floatunsidf_s.o floatunsisf_s.o gedf2_s.o gesf2_s.o ledf2_s.o lesf2_s.o muldf3_s.o mulsf3_s.o negdf2_s.o negsf2_s.o subdf3_s.o subsf3_s.o truncdfsf2_s.o unorddf2_s.o unordsf2_s.o tramp_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s.o emutls_s.o -lc && rm -f 64/libgcc_s.so && if [ -f 64/libgcc_s.so.1 ]; then mv -f 64/libgcc_s.so.1 64/libgcc_s.so.1.backup; else true; fi && mv 64/libgcc_s.so.1.tmp 64/libgcc_s.so.1 && ln -s libgcc_s.so.1 64/libgcc_s.so
	/usr/powerpc-linux-gnu/bin/ld: skipping incompatible /usr/powerpc-linux-gnu/lib/libc.so when searching for -lc
	/usr/powerpc-linux-gnu/bin/ld: skipping incompatible /usr/powerpc-linux-gnu/lib/libc.a when searching for -lc
	/usr/powerpc-linux-gnu/bin/ld: skipping incompatible /usr/powerpc-linux-gnu/bin/../../lib/libc.so when searching for -lc
	/usr/powerpc-linux-gnu/bin/ld: skipping incompatible /usr/powerpc-linux-gnu/bin/../../lib/libc.a when searching for -lc
	/usr/powerpc-linux-gnu/bin/ld: cannot find -lc
	collect2: ld returned 1 exit status
	make[6]: *** [libgcc_s.so] Error 1
	make[6]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2/build/powerpc-linux-gnu/64/libgcc'
	make[5]: *** [multi-do] Error 1
	make[5]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2/build/powerpc-linux-gnu/libgcc'
	make[4]: *** [all-multi] Error 2
	make[4]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2/build/powerpc-linux-gnu/libgcc'
	make[3]: *** [all-target-libgcc] Error 2
	make[3]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2/build'
	make[2]: *** [all] Error 2
	make[2]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2/build'
	s=`cat status`; rm -f status; test $s -eq 0
	make[1]: *** [stamps/05-build-stamp] Error 1
	make[1]: Leaving directory `/home/ukleinek/debsrc/gcc-4.3-4.3.2'
	make: *** [stamps/05-build-stamp] Error 2
	dpkg-buildpackage: failure: debian/rules build gave error exit status 2

I have:

	ukleinek@cassiopeia:~/debsrc/gcc-4.3-4.3.2$ dpkg -l binutils-\* | grep ^ii
	ii  binutils-arm-linux-gnu                  2.18.1~cvs20080103-7       The GNU binary utilities, for arm-linux-gnu target
	ii  binutils-multiarch                      2.18.1~cvs20080103-7       Binary utilities that support multi-arch targets
	ii  binutils-powerpc-linux-gnu              2.18.1~cvs20080103-7       The GNU binary utilities, for powerpc-linux-gnu ta

	ukleinek@cassiopeia:~/debsrc/gcc-4.3-4.3.2$ dpkg -l \*-cross | grep ^ii
	ii  apt-cross                               0.12.0                     retrieve, build and install libraries for cross-compiling
	ii  dpkg-cross                              2.3.0.1                    tools for cross compiling Debian packages
	ii  gcc-4.3-base-arm-cross                  4.3.2-1                    The GNU Compiler Collection (base package) (for cross-com
	ii  gcc-4.3-base-powerpc-cross              4.3.2-1                    The GNU Compiler Collection (base package) (for cross-com
	ii  libc6-arm-cross                         2.7-15                     GNU C Library: Shared libraries (for cross-compiling)
	ii  libc6-dev-arm-cross                     2.7-15                     GNU C Library: Development Libraries and Header Files (fo
	ii  libc6-dev-powerpc-cross                 2.7-15                     GNU C Library: Development Libraries and Header Files (fo
	ii  libc6-dev-ppc64-powerpc-cross           2.7-15                     GNU C Library: 64bit Development Libraries for PowerPC64 
	ii  libc6-powerpc-cross                     2.7-15                     GNU C Library: Shared libraries (for cross-compiling)
	ii  libc6-ppc64-powerpc-cross               2.7-15                     GNU C Library: 64bit Shared libraries for PowerPC64 (for 
	ii  libgcc1-arm-cross                       1:4.3.2-1                  GCC support library
	ii  libgcc1-powerpc-cross                   1:4.3.2-1                  GCC support library (for cross-compiling)
	ii  libstdc++6-4.3-dev-arm-cross            4.3.2-1                    The GNU Standard C++ Library v3 (development files)
	ii  libstdc++6-4.3-pic-arm-cross            4.3.2-1                    The GNU Standard C++ Library v3 (shared library subset ki
	ii  libstdc++6-arm-cross                    4.3.2-1                    The GNU Standard C++ Library v3
	ii  linux-libc-dev-arm-cross                2.6.26-8                   Linux support headers for userspace development (for cros
	ii  linux-libc-dev-powerpc-cross            2.6.26-8                   Linux support headers for userspace development (for cros

I'm not sure which information to include additionally, so please ask if
you need something more.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing-proposed-updates
  APT policy: (900, 'testing-proposed-updates'), (900, 'proposed-updates'), (900, 'testing'), (900, 'stable'), (200, 'unstable'), (2, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gcc-4.3 depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  cpp-4.3             4.3.2-1              The GNU C preprocessor
ii  gcc-4.3-base        4.3.2-1              The GNU Compiler Collection (base 
ii  libc6               2.7-15               GNU C Library: Shared libraries
ii  libgcc1             1:4.3.2-1            GCC support library
ii  libgomp1            4.3.2-1              GCC OpenMP (GOMP) support library

Versions of packages gcc-4.3 recommends:
ii  libc6-dev                     2.7-15     GNU C Library: Development Librari

Versions of packages gcc-4.3 suggests:
ii  gcc-4.3-doc                  4.3.2.nf1-1 documentation for the GNU compiler
pn  gcc-4.3-locales              <none>      (no description available)
ii  gcc-4.3-multilib             4.3.2-1     The GNU C compiler (multilib files
pn  libgcc1-dbg                  <none>      (no description available)
pn  libgomp1-dbg                 <none>      (no description available)
pn  libmudflap0-4.3-dev          <none>      (no description available)
pn  libmudflap0-dbg              <none>      (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 13:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thiemo Seufer <ths@networkno.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 13:12:03 GMT) Full text and rfc822 format available.

Message #10 received at 504487@bugs.debian.org (full text, mbox):

From: Thiemo Seufer <ths@networkno.de>
To: Uwe Kleine-König <ukleinek@strlen.de>, 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 4 Nov 2008 14:09:08 +0100
Uwe Kleine-König wrote:
> Package: gcc-4.3
> Version: 4.3.2-1
> Severity: wishlist
> 
> Hello,
> 
> I tried building a cross toolchain for powerpc following the steps on
> http://www.emdebian.org/tools/crossdev.html (i.e. installing
> binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).

I see this problem on powerpc, mips and mipsel, but not on i386.
I haven't tested sparc and s390. A workaround (when 64-bit isn't
needed) is to disable multilibs.


Thiemo



Index: gcc-4.3-4.3.1-2/debian/rules.defs
===================================================================
--- gcc-4.3-4.3.1-2.orig/debian/rules.defs	2008-08-09 14:30:01.000000000 +0200
+++ gcc-4.3-4.3.1-2/debian/rules.defs	2008-08-09 17:10:39.000000000 +0200
@@ -934,7 +934,11 @@
 biarch_cpu := $(patsubst $(DEB_TARGET_GNU_CPU)=%,%, \
 			 $(filter $(DEB_TARGET_GNU_CPU)=%,$(biarch_map)))
 
+ifeq ($(DEB_CROSS),yes)
+biarch64_archs := /i386/sparc/s390/
+else
 biarch64_archs := /i386/powerpc/sparc/s390/mips/mipsel/
+endif
 
 ifneq (yes,$(call envfilt, biarch, , ,yes))
   biarch64_archs :=
@@ -1042,7 +1046,11 @@
   export TARGET64_MACHINE
 endif
 
+ifeq ($(DEB_CROSS),yes)
+biarchn32_archs :=
+else
 biarchn32_archs := /mips/mipsel/
+endif
 ifneq (yes,$(call envfilt, biarch, , ,yes))
   biarchn32_archs :=
 endif




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 14:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 14:15:04 GMT) Full text and rfc822 format available.

Message #15 received at 504487@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: Thiemo Seufer <ths@networkno.de>, 504487@bugs.debian.org
Cc: Uwe Kleine-König <ukleinek@strlen.de>
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 4 Nov 2008 15:15:21 +0100
On Tue, Nov 04, 2008 at 02:09:08PM +0100, Thiemo Seufer wrote:
> Uwe Kleine-König wrote:
> > Package: gcc-4.3
> > Version: 4.3.2-1
> > Severity: wishlist
> > 
> > Hello,
> > 
> > I tried building a cross toolchain for powerpc following the steps on
> > http://www.emdebian.org/tools/crossdev.html (i.e. installing
> > binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> > GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).
> 
> I see this problem on powerpc, mips and mipsel, but not on i386.
> I haven't tested sparc and s390. A workaround (when 64-bit isn't
> needed) is to disable multilibs.

This will break _any_ biarch compiling which matches the setup as in
Debian. You need to find a way without touching the patches which are
applied.

Bastian

-- 
You're dead, Jim.
		-- McCoy, "The Tholian Web", stardate unknown




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 14:18:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 14:18:03 GMT) Full text and rfc822 format available.

Message #20 received at 504487@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: Uwe Kleine-König <ukleinek@strlen.de>, 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 4 Nov 2008 15:16:40 +0100
On Tue, Nov 04, 2008 at 01:06:43PM +0100, Uwe Kleine-König wrote:
> I tried building a cross toolchain for powerpc following the steps on
> http://www.emdebian.org/tools/crossdev.html (i.e. installing
> binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).

You miss the 64bit libc. The other variant is to build without shared
libgcc.

Bastian

-- 
Kirk to Enterprise -- beam down yeoman Rand and a six-pack.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 14:24:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Bastian Blank <waldi@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 14:24:10 GMT) Full text and rfc822 format available.

Message #25 received at 504487@bugs.debian.org (full text, mbox):

From: Bastian Blank <waldi@debian.org>
To: Uwe Kleine-König <ukleinek@strlen.de>, 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 4 Nov 2008 15:25:13 +0100
On Tue, Nov 04, 2008 at 01:06:43PM +0100, Uwe Kleine-König wrote:
> I tried building a cross toolchain for powerpc following the steps on
> http://www.emdebian.org/tools/crossdev.html (i.e. installing
> binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).

Does defining DEB_CROSS_NO_BIARCH help?

Bastian

-- 
Those who hate and fight must stop themselves -- otherwise it is not stopped.
		-- Spock, "Day of the Dove", stardate unknown




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 22:33:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Kleine-König <ukleinek@strlen.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 22:33:10 GMT) Full text and rfc822 format available.

Message #30 received at 504487@bugs.debian.org (full text, mbox):

From: Uwe Kleine-König <ukleinek@strlen.de>
To: Bastian Blank <waldi@debian.org>
Cc: 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Tue, 4 Nov 2008 23:31:03 +0100
Hello Bastian,

On Tue, Nov 04, 2008 at 03:16:40PM +0100, Bastian Blank wrote:
> On Tue, Nov 04, 2008 at 01:06:43PM +0100, Uwe Kleine-König wrote:
> > I tried building a cross toolchain for powerpc following the steps on
> > http://www.emdebian.org/tools/crossdev.html (i.e. installing
> > binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> > GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).
> 
> You miss the 64bit libc.
This is not the error:

	ukleinek@cassiopeia:~$ dpkg -l libc6-p* | grep ^ii
	ii  libc6-powerpc-cross                     2.7-15                     GNU C Library: Shared libraries (for cross-compiling)
	ii  libc6-ppc64-powerpc-cross               2.7-15                     GNU C Library: 64bit Shared libraries for PowerPC64 (


>                          The other variant is to build without shared
> libgcc.
Is this something that's interesting to test?  If yes, how do I do it?

Best regards
Uwe




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Tue, 04 Nov 2008 23:12:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Uwe Kleine-König <ukleinek@strlen.de>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Tue, 04 Nov 2008 23:12:05 GMT) Full text and rfc822 format available.

Message #35 received at 504487@bugs.debian.org (full text, mbox):

From: Uwe Kleine-König <ukleinek@strlen.de>
To: Bastian Blank <waldi@debian.org>
Cc: 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Wed, 5 Nov 2008 00:09:22 +0100
On Tue, Nov 04, 2008 at 03:25:13PM +0100, Bastian Blank wrote:
> On Tue, Nov 04, 2008 at 01:06:43PM +0100, Uwe Kleine-König wrote:
> > I tried building a cross toolchain for powerpc following the steps on
> > http://www.emdebian.org/tools/crossdev.html (i.e. installing
> > binutils-$arch-linux-gnu and libc6-dev-$arch-cross, then export
> > GCC_TARGET=arch, debian/rules control, dpkg-buildpackage -b -rfakeroot).
> 
> Does defining DEB_CROSS_NO_BIARCH help?
Yes, then the build completes.

If I understand correctly with the resulting toolchain I cannot build
64bit binaries, right?  This is OK for me.  Anything I can do to help
closing the bug?  E.g. a more complete build log?

Thanks for you help
Uwe




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Wed, 25 Feb 2009 13:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hector Oron <hector.oron@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Wed, 25 Feb 2009 13:09:02 GMT) Full text and rfc822 format available.

Message #40 received at 504487@bugs.debian.org (full text, mbox):

From: Hector Oron <hector.oron@gmail.com>
To: Uwe Kleine-König <ukleinek@strlen.de>, 504487@bugs.debian.org
Cc: Bastian Blank <waldi@debian.org>
Subject: Re: Bug#504487: gcc-4.3: build cross toolchain for powerpc fails
Date: Wed, 25 Feb 2009 14:06:21 +0100
Hello,

  With Arthur Loiret help we have been working again to fix cross
toolchains, it looks like that dpkg-cross was fooling us,

# dpkg -c powerpc/libc6-ppc64-powerpc-cross_2.7-18_all.deb
drwxr-xr-x root/root         0 2009-02-25 12:38 ./
drwxr-xr-x root/root         0 2009-02-25 12:38 ./usr/
drwxr-xr-x root/root         0 2009-02-25 12:38 ./usr/share/
drwxr-xr-x root/root         0 2009-02-25 12:38 ./usr/share/doc/
drwxr-xr-x root/root         0 2009-02-25 12:38
./usr/share/doc/libc6-ppc64-powerpc-cross/
-rw-r--r-- root/root       278 2009-02-25 12:38
./usr/share/doc/libc6-ppc64-powerpc-cross/README

  I went thru this with Neil Williams a while ago, it looked like
dpkg-cross has not been patched yet.

Kind regards

-- 
 Héctor Orón




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Thu, 27 Aug 2009 19:09:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Batrosz Janda <bartosz.janda@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Thu, 27 Aug 2009 19:09:12 GMT) Full text and rfc822 format available.

Message #45 received at 504487@bugs.debian.org (full text, mbox):

From: Batrosz Janda <bartosz.janda@gmail.com>
To: 504487@bugs.debian.org
Subject: [gcc-4.3]
Date: Thu, 27 Aug 2009 20:57:08 +0200
Package: gcc-4.3
Version: 4.3.4-1

--- Please enter the report below this line. ---

This bug still exist even in version 4.4.
I think that the error is here:
"-B/usr/powerpc-linux-gnu/lib/"

and should be:
"-B/usr/powerpc-linux-gnu/lib64/"

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.30-1-amd64

Debian Release: squeeze/sid
  990 testing         www.debian-multimedia.org 
  990 testing         security.debian.org 
  990 testing         ftp.pl.debian.org 
  500 unstable        www.debian-multimedia.org 
  500 unstable        ftp.pl.debian.org 
  500 testing-proposed-updates ftp.pl.debian.org 
  500 stable          dl.google.com 
    1 experimental    ftp.pl.debian.org 

--- Package information. ---
Depends               (Version) | Installed
===============================-+-===============
gcc-4.3-base        (= 4.3.4-1) | 4.3.4-1
cpp-4.3             (= 4.3.4-1) | 4.3.4-1
binutils            (>= 2.19.1) | 2.19.51.20090723-1
libgcc1          (>= 1:4.3.4-1) | 1:4.4.1-1
libgomp1           (>= 4.3.4-1) | 4.4.1-1
libc6                  (>= 2.3) | 2.9-23


Recommends      (Version) | Installed
=========================-+-===========
libc6-dev        (>= 2.5) | 2.9-23


Suggests                   (Version) | Installed
====================================-+-=============
gcc-4.3-multilib                     | 4.3.4-1
libmudflap0-4.3-dev     (>= 4.3.4-1) | 
gcc-4.3-doc             (>= 4.3.4-1) | 4.3.2.nf1-1
gcc-4.3-locales         (>= 4.3.4-1) | 
libgcc1-dbg                          | 
libgomp1-dbg                         | 
libmudflap0-dbg                      | 











Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Thu, 24 Jun 2010 11:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthias Klose <doko@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Thu, 24 Jun 2010 11:36:03 GMT) Full text and rfc822 format available.

Message #50 received at 504487@bugs.debian.org (full text, mbox):

From: Matthias Klose <doko@debian.org>
To: 504487@bugs.debian.org
Subject: Re: Bug#504487: gcc-4.x: build cross toolchain for powerpc fails
Date: Thu, 24 Jun 2010 13:33:25 +0200
> I think that the error is here: "-B/usr/powerpc-linux-gnu/lib/"
> and should be: "-B/usr/powerpc-linux-gnu/lib64/"

have a look at config-ml.in, how the CC, CXX, GFORTRAN macros are mangled for 
multilib builds.  Maybe this could be used to mangle the -B args as well for the 
biarch/triarch cases.




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GCC Maintainers <debian-gcc@lists.debian.org>:
Bug#504487; Package gcc-4.3. (Wed, 25 Aug 2010 15:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hector Oron <hector.oron@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian GCC Maintainers <debian-gcc@lists.debian.org>. (Wed, 25 Aug 2010 15:42:06 GMT) Full text and rfc822 format available.

Message #55 received at 504487@bugs.debian.org (full text, mbox):

From: Hector Oron <hector.oron@gmail.com>
To: 504487@bugs.debian.org, Debian Bug Tracking System <control@bugs.debian.org>
Subject: gcc-4.3 and gcc-4.4: multilib cross fixes
Date: Wed, 25 Aug 2010 16:38:41 +0100
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




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Mon Apr 21 02:56:21 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.