On 04-Dec-12 23:09, Rafael Esp?ndola wrote:
> very good :) I see the gcc packages but not the patch. Maybe you have
> forgot to upload it?

I will attach the gcc patches to this mail. Usually the patches get
uploaded by my autobuilding script automatically, but I built the
gcc-3.4 and gcc-4.0 packages 'by hand' using dpkg-buildpackage and did
not upload the patches manually. As soon as my autobuilder has compiled
the gcc packages, the patches will appear on alioth.

Please note that I disabled 'nof' in my gcc patches. The patches also 
contain a small part which I use for the amd64 archive I maintain.
Those parts can of course be ignored for ppc64.

> > Do you have any idea how to fix the java FTBFS?
> I did a ./debian/rules patch and right now the source is building in a
> ppc64 gentoo with the same arguments used in the debian package.
> Gentoo has a newer bintuils and that may make a difference.

I will patch 'binutils' up to a newer version and then try it again.

Regards
Andreas Jochens
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/control ./debian/control
--- ../tmp-orig/gcc-3.4-3.4.3/debian/control    2004-12-13 07:41:25.632177800 
+0000
+++ ./debian/control    2004-12-11 09:09:18.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
 Uploaders: Matthias Klose <[EMAIL PROTECTED]>, Gerhard Tonn <[EMAIL PROTECTED]>
 Standards-Version: 3.6.1
-Build-Depends: libc6.1-dev (>= 2.3.2.ds1-16) [alpha ia64] | libc0.3-dev (>= 
2.3.2.ds1-16) | libc0.1-dev (>= 2.3.2.ds1-16) | libc12-dev (>= 2.3.2.ds1-16) | 
libc6-dev (>= 2.3.2.ds1-16), libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], 
amd64-libs-dev [i386], ia32-libs-dev [amd64], libunwind7-dev [ia64], m4, 
autoconf2.13, autoconf, automake1.4, automake1.7, libtool, autotools-dev, gawk, 
dejagnu (>= 1.4.3) [!hurd-i386 !kfreebsd-gnu !knetbsd-gnu], expect (>= 5.38.0) 
[!hurd-i386 !kfreebsd-gnu !knetbsd-gnu], bzip2, binutils (>= 2.15-5) | 
binutils-multiarch (>= 2.15-5), binutils-hppa64 [hppa], debhelper (>= 4.1), 
gperf (>= 2.7-3), bison (>= 1:1.875a-1) | bison (<< 1:1.50), flex, gettext, 
texinfo (>= 4.3), zlib1g-dev, libgc-dev [!avr !kfreebsd-gnu !knetbsd-gnu], 
xlibs-dev, gnat-3.3 [!arm !m68k !m32r !hurd-i386 !kfreebsd-gnu !knetbsd-gnu 
!netbsd-elf-gnu] | gnat-3.4 [!arm !m68k !m32r !hurd-i386 !kfreebsd-gnu 
!knetbsd-gnu !netbsd-elf-gnu] | gnat [i386 powerpc sparc], libncurses5-dev 
[!netbsd-elf-gnu], libgmp3-dev, tetex-bin [!netbsd-elf-gnu], locales 
[!kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu !hurd-i386], procps [!hurd-i386 
!kfreebsd-gnu !knetbsd-gnu], help2man [!netbsd-elf-gnu], sharutils, 
libgtk2.0-dev (>= 2.4.4-2) [!mips !mipsel !m32r !hurd-i386 !kfreebsd-gnu 
!knetbsd-gnu !netbsd-elf-gnu], libart-2.0-dev [!mips !mipsel !m32r !hurd-i386 
!kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu], g++-3.3 [!amd64], g77-3.3 
[!amd64], gobjc-3.3 [!amd64], realpath (>= 1.9.12)
+Build-Depends: libc6.1-dev (>= 2.3.2.ds1-16) [alpha ia64] | libc0.3-dev (>= 
2.3.2.ds1-16) | libc0.1-dev (>= 2.3.2.ds1-16) | libc12-dev (>= 2.3.2.ds1-16) | 
libc6-dev (>= 2.3.2.ds1-16), libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], 
libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], amd64-libs-dev [i386], 
libunwind7-dev [ia64], m4, autoconf2.13, autoconf, automake1.4, automake1.7, 
libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [!hurd-i386 !kfreebsd-gnu 
!knetbsd-gnu], expect (>= 5.38.0) [!hurd-i386 !kfreebsd-gnu !knetbsd-gnu], 
bzip2, binutils (>= 2.15-5) | binutils-multiarch (>= 2.15-5), binutils-hppa64 
[hppa], debhelper (>= 4.1), gperf (>= 2.7-3), bison (>= 1:1.875a-1) | bison (<< 
1:1.50), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev [!avr 
!kfreebsd-gnu !knetbsd-gnu], xlibs-dev, gnat-3.3 [!arm !m68k !m32r !powerpc64 
!hurd-i386 !kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu] | gnat-3.4 [!arm !m68k 
!m32r !powerpc64 !hurd-i386 !kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu] | gnat 
[i386 powerpc sparc], libncurses5-dev [!netbsd-elf-gnu], libgmp3-dev, tetex-bin 
[!netbsd-elf-gnu], locales [!kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu 
!hurd-i386], procps [!hurd-i386 !kfreebsd-gnu !knetbsd-gnu], help2man 
[!netbsd-elf-gnu], sharutils, libgtk2.0-dev (>= 2.4.4-2) [!mips !mipsel !m32r 
!powerpc64 !hurd-i386 !kfreebsd-gnu !knetbsd-gnu !netbsd-elf-gnu], 
libart-2.0-dev [!mips !mipsel !m32r !powerpc64 !hurd-i386 !kfreebsd-gnu 
!knetbsd-gnu !netbsd-elf-gnu], g++-3.3 [!amd64 !ppc64], g77-3.3 [!amd64 
!ppc64], gobjc-3.3 [!amd64 !ppc64], realpath (>= 1.9.12)
 Build-Depends-Indep: doxygen (>= 1.3.7)
 
 Package: gcc-3.4-base
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/control.m4 ./debian/control.m4
--- ../tmp-orig/gcc-3.4-3.4.3/debian/control.m4 2004-12-13 07:41:25.657174000 
+0000
+++ ./debian/control.m4 2004-12-09 19:45:51.000000000 +0000
@@ -41,7 +41,7 @@
 ifdef(`TARGET',`dnl cross
 Build-Depends: LIBC_BUILD_DEP, m4, autoconf2.13, autoconf, automake1.4, 
automake1.7, libtool, autotools-dev, gawk, bzip2, dpkg-cross (>= 1.18.1), 
BINUTILS_BUILD_DEP, debhelper (>= 4.1), , bison (>= 1:1.875a-1) | bison (<< 
1:1.50), flex`', realpath (>= 1.9.12)BD64
 ',`dnl native
-Build-Depends: LIBC_BUILD_DEP, libc6-dev-sparc64 [sparc], libc6-dev-s390x 
[s390], amd64-libs-dev [i386], ia32-libs-dev [amd64], libunwind7-dev [ia64], 
m4, autoconf2.13, autoconf, automake1.4, automake1.7, libtool, autotools-dev, 
gawk, dejagnu (>= 1.4.3) [check_no_archs], expect (>= 5.38.0) [check_no_archs], 
bzip2, BINUTILS_BUILD_DEP, binutils-hppa64 [hppa], debhelper (>= 4.1), gperf 
(>= 2.7-3), bison (>= 1:1.875a-1) | bison (<< 1:1.50), flex, gettext, texinfo 
(>= 4.3), zlib1g-dev, libgc-dev [libgc_no_archs], xlibs-dev, gnat-3.3 
[ada_no_archs] | gnat-3.4 [ada_no_archs] | gnat [i386 powerpc sparc], 
libncurses5-dev [pascal_no_archs], libgmp3-dev, tetex-bin [pascal_no_archs], 
locales [locale_no_archs !hurd-i386], procps [check_no_archs], help2man 
[pascal_no_archs], sharutils, libgtk2.0-dev (>= 2.4.4-2) [java_no_archs], 
libart-2.0-dev [java_no_archs], g++-3.3 [!amd64], g77-3.3 [!amd64], gobjc-3.3 
[!amd64], realpath (>= 1.9.12)
+Build-Depends: LIBC_BUILD_DEP, libc6-dev-i386 [amd64], libc6-dev-powerpc 
[ppc64], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], amd64-libs-dev 
[i386], libunwind7-dev [ia64], m4, autoconf2.13, autoconf, automake1.4, 
automake1.7, libtool, autotools-dev, gawk, dejagnu (>= 1.4.3) [check_no_archs], 
expect (>= 5.38.0) [check_no_archs], bzip2, BINUTILS_BUILD_DEP, binutils-hppa64 
[hppa], debhelper (>= 4.1), gperf (>= 2.7-3), bison (>= 1:1.875a-1) | bison (<< 
1:1.50), flex, gettext, texinfo (>= 4.3), zlib1g-dev, libgc-dev 
[libgc_no_archs], xlibs-dev, gnat-3.3 [ada_no_archs] | gnat-3.4 [ada_no_archs] 
| gnat [i386 powerpc sparc], libncurses5-dev [pascal_no_archs], libgmp3-dev, 
tetex-bin [pascal_no_archs], locales [locale_no_archs !hurd-i386], procps 
[check_no_archs], help2man [pascal_no_archs], sharutils, libgtk2.0-dev (>= 
2.4.4-2) [java_no_archs], libart-2.0-dev [java_no_archs], g++-3.3 [!amd64 
!ppc64], g77-3.3 [!amd64 !ppc64], gobjc-3.3 [!amd64 !ppc64], realpath (>= 
1.9.12)
 Build-Depends-Indep: doxygen (>= 1.3.7)
 ')dnl
 
@@ -119,8 +119,8 @@
 Architecture: any
 Section: libs
 Priority: optional
-Depends: ia32-libs (>= 0.7)
-Description: GCC support library (ia32)
+Depends: ${shlibs:Depends}
+Description: GCC support library (32 bit version)
  Shared version of the support library, a library of internal subroutines
  that GCC uses to overcome shortcomings of particular machines, or
  special needs for some languages.
@@ -524,7 +524,7 @@
 Section: ifdef(`TARGET',`devel',`libs')
 Priority: ifdef(`TARGET',`extra',PRI(optional))
 Depends: gcc`'PV-base (>= CV), lib32gcc`'GCC_SO
-Description: The GNU Standard C++ Library v3 (ia32)
+Description: The GNU Standard C++ Library v3 (32 bit version)
  This package contains an additional runtime library for C++ programs
  built with the GNU compiler.
 ifdef(`TARGET', `dnl
@@ -538,7 +538,7 @@
 Section: libs
 Priority: optional
 Depends: gcc`'PV-base (>= CV), lib32gcc`'GCC_SO
-Description: The GNU Standard C++ Library v3 (ia32)
+Description: The GNU Standard C++ Library v3 (32 bit version)
  This package contains an additional runtime library for C++ programs
  built with the GNU compiler.
 ifdef(`TARGET', `dnl
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/patches/amd64-biarch.dpatch 
./debian/patches/amd64-biarch.dpatch
--- ../tmp-orig/gcc-3.4-3.4.3/debian/patches/amd64-biarch.dpatch        
2004-12-13 07:41:25.442072528 +0000
+++ ./debian/patches/amd64-biarch.dpatch        2004-12-09 18:17:51.000000000 
+0000
@@ -86,3 +86,14 @@
  esac
  
  # Remove extraneous blanks from multidirs.
+--- linux64.h  2003-11-29 03:08:10.000000000 +0000
++++ gcc/config/i386/linux64.h  2004-10-07 17:57:27.295477928 +0000
+@@ -61,7 +61,7 @@
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+       %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} 
\
++      %{!m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
+     %{static:-static}}"
+ 
+ #define MULTILIB_DEFAULTS { "m64" }
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/patches/i386-biarch.dpatch 
./debian/patches/i386-biarch.dpatch
--- ../tmp-orig/gcc-3.4-3.4.3/debian/patches/i386-biarch.dpatch 2004-12-13 
07:41:25.438073136 +0000
+++ ./debian/patches/i386-biarch.dpatch 2004-12-09 18:17:51.000000000 +0000
@@ -100,7 +100,7 @@
    %{!shared: \
 @@ -63,8 +67,22 @@ Boston, MA 02111-1307, USA.  */
        %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
-       %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} 
\
+       %{!m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
      %{static:-static}}"
 +#else
 +#define LINK_SPEC "%{m64:-m elf_x86_64} %{!m64:-m elf_i386} \
@@ -109,7 +109,7 @@
 +    %{!static: \
 +      %{rdynamic:-export-dynamic} \
 +      %{!m64:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
-+      %{m64:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
++      %{m64:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
 +    %{static:-static}}"
 +#endif
  
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/patches/ppc64-biarch.dpatch 
./debian/patches/ppc64-biarch.dpatch
--- ../tmp-orig/gcc-3.4-3.4.3/debian/patches/ppc64-biarch.dpatch        
1970-01-01 00:00:00.000000000 +0000
+++ ./debian/patches/ppc64-biarch.dpatch        2004-12-10 19:04:24.000000000 
+0000
@@ -0,0 +1,219 @@
+#! /bin/sh -e
+ 
+# DP: biarch patches for powerpc/ppc64
+ 
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+    dir="$3/"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch)
+        patch $pdir -f --no-backup-if-mismatch -p1 < $0
+        #cd ${dir}gcc && autoconf
+        ;;
+    -unpatch)
+        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+        #rm ${dir}gcc/configure
+        ;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+
+diff -urN tmp/gcc/config/rs6000/t-linux64 src/gcc/config/rs6000/t-linux64
+--- tmp/gcc/config/rs6000/t-linux64    2004-03-17 15:16:48.000000000 +0000
++++ src/gcc/config/rs6000/t-linux64    2004-11-22 07:56:52.681533760 +0000
+@@ -11,9 +11,9 @@
+-MULTILIB_OPTIONS        = m64/m32 msoft-float
+-MULTILIB_DIRNAMES       = 64 32 nof
++MULTILIB_OPTIONS        = m64/m32
++MULTILIB_DIRNAMES       = 64 32
+ MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+-MULTILIB_EXCEPTIONS     = m64/msoft-float
+-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES   = ../lib64 ../lib nof
+-MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
++#MULTILIB_EXCEPTIONS     = m64/msoft-float
++#MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
++MULTILIB_OSDIRNAMES   = ../lib ../lib32
++#MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
+ 
+ # We want fine grained libraries, so use the new code to build the
+diff -urN tmp/gcc/config/rs6000/linux64.h src/gcc/config/rs6000/linux64.h
+--- tmp/gcc/config/rs6000/linux64.h    2004-10-03 03:43:56.000000000 +0000
++++ src/gcc/config/rs6000/linux64.h    2004-11-22 07:54:22.832314304 +0000
+@@ -353,7 +353,7 @@
+ 
+ #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+-  %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
++  %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}}}"
+ 
+ #undef  TOC_SECTION_ASM_OP
+ #define TOC_SECTION_ASM_OP \
+
+diff -urN gcc-3.4.3/config-ml.in src/config-ml.in
+--- gcc-3.4.3/config-ml.in     2004-01-05 00:41:14.000000000 +0000
++++ src/config-ml.in   2004-12-10 18:59:35.651141848 +0000
+@@ -400,7 +400,47 @@
+         ;;
+       esac
+       ;;
+-powerpc*-*-* | rs6000*-*-*)
++powerpc64-*-*)
++      case " $multidirs " in
++      *" 32 "*)
++        # We will not be able to create libraries with -m32 if
++        # we cannot even link a trivial program.  It usually
++        # indicates the 32bit libraries are missing.
++        if echo 'main() {}' > conftest.c &&
++           ${CC-gcc} -m32 conftest.c -o conftest; then
++         echo Enable only libstdc++.
++         old_multidirs="${multidirs}"
++         multidirs=""
++         for x in ${old_multidirs}; do
++           case "$x" in
++           *32* ) case ${ml_realsrcdir} in
++                     *"libstdc++-v3" ) multidirs="${multidirs} ${x}" ;;
++                     *"libf2c" ) multidirs="${multidirs} ${x}" ;;
++                     *"libobjc" ) multidirs="${multidirs} ${x}" ;;
++                     *"libiberty" ) multidirs="${multidirs} ${x}" ;;
++                     *"zlib" ) multidirs="${multidirs} ${x}" ;;
++                     *) : ;;
++                  esac 
++                  ;;
++           *) multidirs="${multidirs} ${x}" ;;
++           esac
++         done
++        else
++          echo Could not link program with -m32, disabling it.
++          old_multidirs="${multidirs}"
++          multidirs=""
++          for x in ${old_multidirs}; do
++            case "$x" in
++            *m32* ) : ;;
++            *) multidirs="${multidirs} ${x}" ;;
++            esac
++          done
++        fi
++        rm -f conftest.c conftest
++        ;;
++      esac
++      ;;
++powerpc-*-* | rs6000*-*-*)
+       if [ x$enable_aix64 = xno ]
+       then
+         old_multidirs="${multidirs}"
+--- ppc64-fp.c 2004-03-11 03:14:52.000000000 +0000
++++ src/gcc/config/rs6000/ppc64-fp.c   2004-11-22 22:22:10.488086024 +0000
+@@ -33,19 +33,19 @@
+ #if defined(__powerpc64__)
+ #include "config/fp-bit.h"
+ 
+-extern DItype __fixtfdi (TFtype);
++/*extern DItype __fixtfdi (TFtype);*/
+ extern DItype __fixdfdi (DFtype);
+ extern DItype __fixsfdi (SFtype);
+ extern USItype __fixunsdfsi (DFtype);
+ extern USItype __fixunssfsi (SFtype);
+-extern TFtype __floatditf (DItype);
++/*extern TFtype __floatditf (DItype);*/
+ extern DFtype __floatdidf (DItype);
+ extern SFtype __floatdisf (DItype);
+-extern DItype __fixunstfdi (TFtype);
++/*extern DItype __fixunstfdi (TFtype);*/
+ 
+ static DItype local_fixunssfdi (SFtype);
+ static DItype local_fixunsdfdi (DFtype);
+-
++/*
+ DItype
+ __fixtfdi (TFtype a)
+ {
+@@ -53,7 +53,7 @@
+     return - __fixunstfdi (-a);
+   return __fixunstfdi (a);
+ }
+-
++*/
+ DItype
+ __fixdfdi (DFtype a)
+ {
+@@ -87,7 +87,7 @@
+                        - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 
1);
+   return (SItype) a;
+ }
+-
++/*
+ TFtype
+ __floatditf (DItype u)
+ {
+@@ -99,7 +99,7 @@
+ 
+   return (TFtype) dh + (TFtype) dl;
+ }
+-
++*/
+ DFtype
+ __floatdidf (DItype u)
+ {
+@@ -137,29 +137,29 @@
+   return (SFtype) f;
+ }
+ 
+-DItype
+-__fixunstfdi (TFtype a)
+-{
+-  if (a < 0)
+-    return 0;
+-
+-  /* Compute high word of result, as a flonum.  */
+-  const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8)));
+-  /* Convert that to fixed (but not to DItype!),
+-     and shift it into the high word.  */
+-  UDItype v = (USItype) b;
+-  v <<= (sizeof (SItype) * 8);
+-  /* Remove high part from the TFtype, leaving the low part as flonum.  */
+-  a -= (TFtype) v;
+-  /* Convert that to fixed (but not to DItype!) and add it in.
+-     Sometimes A comes out negative.  This is significant, since
+-     A has more bits than a long int does.  */
+-  if (a < 0)
+-    v -= (USItype) (-a);
+-  else
+-    v += (USItype) a;
+-  return v;
+-}
++//DItype
++//__fixunstfdi (TFtype a)
++//{
++//  if (a < 0)
++//    return 0;
++//
++//  /* Compute high word of result, as a flonum.  */
++//  const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8)));
++//  /* Convert that to fixed (but not to DItype!),
++//     and shift it into the high word.  */
++//  UDItype v = (USItype) b;
++//  v <<= (sizeof (SItype) * 8);
++//  /* Remove high part from the TFtype, leaving the low part as flonum.  */
++//  a -= (TFtype) v;
++//  /* Convert that to fixed (but not to DItype!) and add it in.
++//     Sometimes A comes out negative.  This is significant, since
++//     A has more bits than a long int does.  */
++//  if (a < 0)
++//    v -= (USItype) (-a);
++//  else
++//    v += (USItype) a;
++//  return v;
++//}
+ 
+ /* This version is needed to prevent recursion; fixunsdfdi in libgcc
+    calls fixdfdi, which in turn calls calls fixunsdfdi.  */
+
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-ada.mk 
./debian/rules.d/binary-ada.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-ada.mk      2004-12-13 
07:41:20.313189680 +0000
+++ ./debian/rules.d/binary-ada.mk      2004-12-09 18:17:51.000000000 +0000
@@ -108,8 +108,8 @@
        for lib in lib{gnat,gnarl}; do \
          vlib=$$lib-$(GNAT_VERSION); \
          dh_link -p$(p_gnat) \
-           /$(PF)/$(libdir)/$$vlib.so.1 /$(gcc_lib_dir)/adalib/$$vlib.so \
-           /$(PF)/$(libdir)/$$vlib.so.1 /$(gcc_lib_dir)/adalib/$$lib.so; \
+           /$(PF)/$(libdir)/$$vlib.so.1 /$(PF)/$(libdir)/$$vlib.so \
+           /$(PF)/$(libdir)/$$vlib.so.1 /$(PF)/$(libdir)/$$lib.so; \
        done
 endif
 
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-gcc.mk 
./debian/rules.d/binary-gcc.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-gcc.mk      2004-12-13 
07:41:20.322188312 +0000
+++ ./debian/rules.d/binary-gcc.mk      2004-12-09 19:37:40.000000000 +0000
@@ -29,7 +29,7 @@
 ifeq ($(biarch),yes)
     files_gcc += $(gcc_lib_dir)/64/{libgcc*,libgcov.a,*.o}
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
     files_gcc += $(gcc_lib_dir)/64/{libgcc*,*.o}
 endif
 
@@ -83,7 +83,7 @@
        ln -sf /$(lib64)/libgcc_s.so.$(GCC_SONAME) 
$(d)/$(gcc_lib_dir)/libgcc_s_64.so
        ln -sf /$(lib64)/libgcc_s.so.$(GCC_SONAME) 
$(d)/$(gcc_lib_dir)/64/libgcc_s.so
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        mkdir -p $(d_gcc)/$(gcc_lib_dir)
        mv $(d)/$(gcc_lib_dir)/32 $(d_gcc)/$(gcc_lib_dir)/
        dh_link -p$(p_gcc) \
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libgcc-cross.mk 
./debian/rules.d/binary-libgcc-cross.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libgcc-cross.mk     
2004-12-13 07:41:20.326187704 +0000
+++ ./debian/rules.d/binary-libgcc-cross.mk     2004-12-09 19:38:18.000000000 
+0000
@@ -2,7 +2,7 @@
 ifeq ($(with_lib64gcc),yes)
   arch_binaries        := $(arch_binaries) lib64gcc
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32gcc
 endif
 
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libgcc.mk 
./debian/rules.d/binary-libgcc.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libgcc.mk   2004-12-13 
07:41:20.323188160 +0000
+++ ./debian/rules.d/binary-libgcc.mk   2004-12-09 19:36:04.000000000 +0000
@@ -2,7 +2,7 @@
 ifeq ($(with_lib64gcc),yes)
   arch_binaries        := $(arch_binaries) lib64gcc
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32gcc
 endif
 
@@ -136,10 +136,10 @@
        rm -rf $(d_l32gcc)
        dh_installdirs -p$(p_l32gcc) \
                $(docdir)/$(p_l32gcc) \
-               emul/ia32-linux/usr/lib
+               usr/lib32
 
        mv $(d)/$(PF)/lib32/libgcc_s.so.$(GCC_SONAME) \
-               $(d_l32gcc)/emul/ia32-linux/usr/lib/.
+               $(d_l32gcc)/usr/lib32/.
 
        dh_installdocs -p$(p_l32gcc)
        dh_installchangelogs -p$(p_l32gcc)
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libstdcxx-cross.mk 
./debian/rules.d/binary-libstdcxx-cross.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libstdcxx-cross.mk  
2004-12-13 07:41:20.328187400 +0000
+++ ./debian/rules.d/binary-libstdcxx-cross.mk  2004-12-09 19:38:08.000000000 
+0000
@@ -4,7 +4,7 @@
 ifeq ($(with_lib64cxx),yes)
   arch_binaries  := $(arch_binaries) lib64stdcxx
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32stdcxx
 endif
 
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libstdcxx.mk 
./debian/rules.d/binary-libstdcxx.mk
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.d/binary-libstdcxx.mk        
2004-12-13 07:41:20.331186944 +0000
+++ ./debian/rules.d/binary-libstdcxx.mk        2004-12-09 19:37:03.000000000 
+0000
@@ -4,7 +4,7 @@
 ifeq ($(with_lib64cxx),yes)
   arch_binaries  := $(arch_binaries) lib64stdcxx
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32stdcxx
 endif
 
@@ -88,7 +88,7 @@
     dirs_pic += $(gcc_lib_dir)
     files_pic += $(gcc_lib_dir)/64/libstdc++_pic.a
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
     dirs_dev += $(gcc_lib_dir)/32/
     files_dev += $(gcc_lib_dir)/32/libstdc++.{a,so} \
         $(gcc_lib_dir)/32/libsupc++.a
@@ -235,10 +235,10 @@
        rm -rf $(d_lib32)
        dh_installdirs -p$(p_lib32) \
                $(docdir)/$(p_lib32) \
-               emul/ia32-linux/usr/lib
+               usr/lib32
 
        mv $(d)/$(PF)/lib32/libstdc++.so.* \
-               $(d_lib32)/emul/ia32-linux/usr/lib/.
+               $(d_lib32)/usr/lib32/.
 
        dh_installdocs -p$(p_lib32)
        echo "See /$(docdir)/$(p_base) for more information" \
@@ -292,7 +292,7 @@
 ifeq ($(with_lib64cxx),yes)
        mv $(d)/$(PF)/lib64/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/64/.
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        mv $(d)/$(PF)/lib32/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/32/.
 endif
 
@@ -308,7 +308,7 @@
                /$(PF)/lib64/libstdc++.so.$(CXX_SONAME) \
                /$(gcc_lib_dir)/64/libstdc++.so
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        dh_link -p$(p_dev) \
                /$(PF)/lib32/libstdc++.so.$(CXX_SONAME) \
                /$(gcc_lib_dir)/32/libstdc++.so
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.defs ./debian/rules.defs
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.defs 2004-12-13 07:41:25.661173392 
+0000
+++ ./debian/rules.defs 2004-12-11 09:05:11.000000000 +0000
@@ -102,9 +102,9 @@
 # ... and some libraries, which do not change (libffi2, libg2c, libobjc1).
 with_common_libs := built from gcc-3.3
 
-# Build common_pkgs and common_libs for amd64/gcc-3.4
-ifeq ($(DEB_TARGET_GNU_CPU),x86_64)
-  ifneq ($(BUILD_CC_VERSION),3.3)
+# Build common_pkgs and common_libs if gcc-3.4 is the default compiler
+ifeq ($(DEB_TARGET_GNU_CPU),$(findstring $(DEB_TARGET_GNU_CPU),powerpc64 
x86_64))
+  ifeq ($(BUILD_CC_VERSION),3.4)
     with_common_pkgs := yes
     with_common_libs := yes
   endif
@@ -209,7 +209,7 @@
   with_java := yes
 endif
 
-java_no_cpus := mips mipsel m32r
+java_no_cpus := mips mipsel m32r powerpc64
 java_no_systems := hurd-i386 kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
 ifeq ($(DEB_TARGET_GNU_CPU), $(findstring 
$(DEB_TARGET_GNU_CPU),$(java_no_cpus)))
   with_java := disabled for architecture $(DEB_TARGET_GNU_CPU)
@@ -422,7 +422,7 @@
 endif
 
 with_libgnat := yes
-ada_no_cpus := arm m68k m32r
+ada_no_cpus := arm m68k m32r powerpc64
 ada_no_systems := hurd-i386 kfreebsd-gnu knetbsd-gnu netbsd-elf-gnu
 ifeq ($(DEB_TARGET_GNU_CPU), $(findstring 
$(DEB_TARGET_GNU_CPU),$(ada_no_cpus)))
   with_ada := disabled for architecure $(DEB_TARGET_GNU_CPU)
@@ -492,7 +492,7 @@
 #endif
 
 # run testsuite --------------------
-with_check := yes
+with_check := no
 # If you don't want to run the gcc testsuite, set `with_check' to `no'
 #with_check := disabled by hand
 ifeq ($(with_base_only),yes)
@@ -540,11 +540,11 @@
   #with_lib64g2c       := yes
 endif
 
-ifeq ($(DEB_TARGET_ARCH),amd64)
-  biarch_ia32 := yes
+ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),amd64 ppc64))
+  biarch_32 := yes
 endif
 #ifeq ($(DEB_TARGET_ARCH),ia64)
-#  biarch_ia32 := yes
+#  biarch_32 := yes
 #endif
 
 # hppa64 build --------------------
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.parameters 
./debian/rules.parameters
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.parameters   2004-12-13 
07:41:25.466068880 +0000
+++ ./debian/rules.parameters   2004-12-09 18:34:25.000000000 +0000
@@ -1,15 +1,15 @@
 # configuration parameters taken from upstream source files
 VER            := 3.4.4
 BASE_VERSION   := 3.4
-SOURCE_VERSION := 3.4.3-2
-DEB_VERSION    := 3.4.3-2
-DEB_EVERSION   := 1:3.4.3-2
+SOURCE_VERSION := 3.4.3-4
+DEB_VERSION    := 3.4.3-4
+DEB_EVERSION   := 1:3.4.3-4
 GPC_BASE_VERSION       := 2.1
-DEB_GPC_VERSION        := 3.4.3-2
+DEB_GPC_VERSION        := 3.4.3-4
 DEB_SOVERSION  := 3.4.1-3
 DEB_SOEVERSION := 1:3.4.1-3
 DEB_LIBGCC_SOVERSION   := 1:3.4.1-3
-DEB_LIBGCC_VERSION     := 1:3.4.3-2
+DEB_LIBGCC_VERSION     := 1:3.4.3-4
 DEB_STDCXX_SOVERSION   := 3.4.3-1
 DEB_FFI_SOVERSION      := 3.4.1-3
 GCC_SONAME     := 1
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules.patch ./debian/rules.patch
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules.patch        2004-12-13 
07:41:25.650175064 +0000
+++ ./debian/rules.patch        2004-12-09 18:17:51.000000000 +0000
@@ -82,6 +82,9 @@
 ifeq ($(DEB_TARGET_GNU_CPU),m32r)
   debian_patches += autoreconf m32r-gotoff m32r-stack m32r-libffi m32r-fixes 
m32r-limits
 endif
+ifeq ($(DEB_TARGET_ARCH),ppc64)
+  debian_patches += ppc64-biarch
+endif
 ifeq ($(DEB_TARGET_GNU_CPU),alpha)
   debian_patches += # alpha-ieee
 endif
diff -urN ../tmp-orig/gcc-3.4-3.4.3/debian/rules2 ./debian/rules2
--- ../tmp-orig/gcc-3.4-3.4.3/debian/rules2     2004-12-13 07:41:25.638176888 
+0000
+++ ./debian/rules2     2004-12-10 19:11:21.000000000 +0000
@@ -44,7 +44,7 @@
 ifeq ($(with_ada),yes)
   CC           = gnatgcc $(CPPFLAGS)
 else
-  CC           = cc $(CPPFLAGS)
+  CC           = gcc-3.4 $(CPPFLAGS)
 endif
 
 ifeq ($(DEB_HOST_ARCH), $(findstring $(DEB_HOST_ARCH),m68k))
@@ -148,7 +148,7 @@
 endif
 
 ifeq ($(DEB_TARGET_GNU_CPU), $(findstring $(DEB_TARGET_GNU_CPU),powerpc64))
-  CONFARGS += --disable-softfloat
+  CONFARGS += --disable-softfloat --disable-nof
 endif
 
 ifeq ($(DEB_TARGET_GNU_TYPE),ia64-linux)
@@ -594,7 +594,7 @@
     DEJAGNU_RUNTESTFLAGS = RUNTESTFLAGS="--target_board 'unix unix/-m64'"
   endif
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   uname_m := $(shell uname -m)
   ifeq ($(uname_m), $(findstring $(uname_m),x86_64))
     DEJAGNU_RUNTESTFLAGS = RUNTESTFLAGS="--target_board 'unix unix/-m32'"
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/control gcc-4.0-4.0ds1/debian/control
--- tmp-orig/gcc-4.0-4.0ds1/debian/control      2004-12-11 14:15:55.000000000 
+0000
+++ gcc-4.0-4.0ds1/debian/control       2004-12-10 18:38:45.000000000 +0000
@@ -4,7 +4,7 @@
 Maintainer: Debian GCC maintainers <debian-gcc@lists.debian.org>
 Uploaders: Matthias Klose <[EMAIL PROTECTED]>
 Standards-Version: 3.6.1
-Build-Depends: libc6.1-dev (>= 2.3.2.ds1-19) [alpha ia64] | libc0.3-dev (>= 
2.3.2.ds1-19) | libc0.1-dev | libc12-dev (>= 2.3.2.ds1-19) | libc6-dev (>= 
2.3.2.ds1-19), libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], 
amd64-libs-dev [i386], ia32-libs-dev [amd64], libunwind7-dev [ia64], m4, 
autoconf, automake1.9, libtool, autogen, gawk, dejagnu (>= 1.4.3) [!hurd-i386], 
expect (>= 5.38.0) [!hurd-i386], bzip2, binutils (>= 2.15-5) | 
binutils-multiarch (>= 2.15-5), binutils-hppa64 [hppa], debhelper (>= 4.1), 
gperf (>= 2.7-3), bison (>= 1:1.875a-1), flex, gettext, texinfo (>= 4.3), 
zlib1g-dev, libgc-dev [!knetbsd-i386], xlibs-dev, gnat-3.3 [!arm !hppa !m68k 
!mips !mipsel !s390 !sparc !kfreebsd-i386 !knetbsd-i386 !netbsd-i386] | 
gnat-3.4 [!arm !hppa !m68k !mips !mipsel !s390 !sparc !kfreebsd-i386 
!knetbsd-i386 !netbsd-i386], libncurses5-dev [!netbsd-i386], libmpfr-dev | 
libgmp3-dev (<< 4.1.4-3), tetex-bin [!netbsd-i386], locales [!hurd-i386 
!knetbsd-i386 !netbsd-i386], procps [!darwin-i386 !freebsd-i386 !hurd-i386 
!kfreebsd-i386 !knetbsd-i386 !netbsd-i386 !openbsd-i386 !darwin-powerpc], 
help2man [!netbsd-i386], sharutils, libgtk2.0-dev [!mips !mipsel !knetbsd-i386 
!netbsd-i386], libart-2.0-dev [!mips !mipsel !knetbsd-i386 !netbsd-i386], 
g++-3.4, gobjc-3.4, type-handling (>= 0.2.1), realpath (>= 1.9.12), chrpath
+Build-Depends: libc6.1-dev (>= 2.3.2.ds1-19) [alpha ia64] | libc0.3-dev (>= 
2.3.2.ds1-19) | libc0.1-dev | libc12-dev (>= 2.3.2.ds1-19) | libc6-dev (>= 
2.3.2.ds1-19), libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], 
libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], amd64-libs-dev [i386], 
libunwind7-dev [ia64], m4, autoconf, automake1.9, libtool, autogen, gawk, 
dejagnu (>= 1.4.3) [!hurd-i386], expect (>= 5.38.0) [!hurd-i386], bzip2, 
binutils (>= 2.15-5) | binutils-multiarch (>= 2.15-5), binutils-hppa64 [hppa], 
debhelper (>= 4.1), gperf (>= 2.7-3), bison (>= 1:1.875a-1), flex, gettext, 
texinfo (>= 4.3), zlib1g-dev, libgc-dev [!knetbsd-i386], xlibs-dev, gnat-4.0 
[!arm !hppa !m68k !mips !mipsel !ppc64 !s390 !sparc !kfreebsd-i386 
!knetbsd-i386 !netbsd-i386] | gnat-3.3 [!arm !hppa !m68k !mips !mipsel !ppc64 
!s390 !sparc !kfreebsd-i386 !knetbsd-i386 !netbsd-i386], libncurses5-dev 
[!netbsd-i386], libmpfr-dev | libgmp3-dev (<< 4.1.4-3), tetex-bin 
[!netbsd-i386], locales [!hurd-i386 !knetbsd-i386 !netbsd-i386], procps 
[!darwin-i386 !freebsd-i386 !hurd-i386 !kfreebsd-i386 !knetbsd-i386 
!netbsd-i386 !openbsd-i386 !darwin-powerpc], help2man [!netbsd-i386], 
sharutils, libgtk2.0-dev [!mips !mipsel !knetbsd-i386 !netbsd-i386], 
libart-2.0-dev [!mips !mipsel !knetbsd-i386 !netbsd-i386], g++-3.4, gobjc-3.4, 
type-handling (>= 0.2.1), realpath (>= 1.9.12), chrpath
 Build-Depends-Indep: doxygen (>= 1.3.9.1)
 
 Package: gcc-4.0-base
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/control.m4 
gcc-4.0-4.0ds1/debian/control.m4
--- tmp-orig/gcc-4.0-4.0ds1/debian/control.m4   2004-12-11 14:15:55.000000000 
+0000
+++ gcc-4.0-4.0ds1/debian/control.m4    2004-12-10 18:33:16.000000000 +0000
@@ -41,7 +41,7 @@
 ifdef(`TARGET',`dnl cross
 Build-Depends: LIBC_BUILD_DEP, m4, autoconf, automake1.9, libtool, 
autotools-dev, autogen, gawk, bzip2, dpkg-cross (>= 1.18.1), 
BINUTILS_BUILD_DEP, debhelper (>= 4.1), bison (>= 1:1.875a-1) | bison (<< 
1:1.50), flex, realpath (>= 1.9.12), chrpath`'BD64
 ',`dnl native
-Build-Depends: LIBC_BUILD_DEP, libc6-dev-sparc64 [sparc], libc6-dev-s390x 
[s390], amd64-libs-dev [i386], ia32-libs-dev [amd64], libunwind7-dev [ia64], 
m4, autoconf, automake1.9, libtool, autogen, gawk, dejagnu (>= 1.4.3) 
[check_no_archs], expect (>= 5.38.0) [check_no_archs], bzip2, 
BINUTILS_BUILD_DEP, binutils-hppa64 [hppa], debhelper (>= 4.1), gperf (>= 
2.7-3), bison (>= 1:1.875a-1), flex, gettext, texinfo (>= 4.3), zlib1g-dev, 
libgc-dev [libgc_no_archs], xlibs-dev, gnat-3.3 [ada_no_archs] | gnat-3.4 
[ada_no_archs], libncurses5-dev [pascal_no_archs], libmpfr-dev | libgmp3-dev 
(<< 4.1.4-3), tetex-bin [pascal_no_archs], locales [locale_no_archs], procps 
[linux_gnu_archs], help2man [pascal_no_archs], sharutils, libgtk2.0-dev 
[java_no_archs], libart-2.0-dev [java_no_archs], g++-3.4, gobjc-3.4, 
type-handling (>= 0.2.1), realpath (>= 1.9.12), chrpath
+Build-Depends: LIBC_BUILD_DEP, libc6-dev-i386 [amd64], libc6-dev-powerpc 
[ppc64], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], amd64-libs-dev 
[i386], libunwind7-dev [ia64], m4, autoconf, automake1.9, libtool, autogen, 
gawk, dejagnu (>= 1.4.3) [check_no_archs], expect (>= 5.38.0) [check_no_archs], 
bzip2, BINUTILS_BUILD_DEP, binutils-hppa64 [hppa], debhelper (>= 4.1), gperf 
(>= 2.7-3), bison (>= 1:1.875a-1), flex, gettext, texinfo (>= 4.3), zlib1g-dev, 
libgc-dev [libgc_no_archs], xlibs-dev, gnat-4.0 [ada_no_archs] | gnat-3.3 
[ada_no_archs], libncurses5-dev [pascal_no_archs], libmpfr-dev | libgmp3-dev 
(<< 4.1.4-3), tetex-bin [pascal_no_archs], locales [locale_no_archs], procps 
[linux_gnu_archs], help2man [pascal_no_archs], sharutils, libgtk2.0-dev 
[java_no_archs], libart-2.0-dev [java_no_archs], g++-3.4, gobjc-3.4, 
type-handling (>= 0.2.1), realpath (>= 1.9.12), chrpath
 Build-Depends-Indep: doxygen (>= 1.3.9.1)
 ')dnl
 
@@ -117,8 +117,8 @@
 Architecture: any
 Section: libs
 Priority: optional
-Depends: ia32-libs (>= 0.7)
-Description: GCC support library (ia32)
+Depends: ${shlibs:Depends}
+Description: GCC support library (32 bit Version)
  Shared version of the support library, a library of internal subroutines
  that GCC uses to overcome shortcomings of particular machines, or
  special needs for some languages.
@@ -518,7 +518,7 @@
 Section: ifdef(`TARGET',`devel',`libs')
 Priority: ifdef(`TARGET',`extra',PRI(optional))
 Depends: gcc`'PV-base (>= CV), lib32gcc`'GCC_SO`'LS
-Description: The GNU Standard C++ Library v3 (ia32)
+Description: The GNU Standard C++ Library v3 (32 bit Version)
  This package contains an additional runtime library for C++ programs
  built with the GNU compiler.
 ifdef(`TARGET', `dnl
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/patches/amd64-biarch.dpatch 
gcc-4.0-4.0ds1/debian/patches/amd64-biarch.dpatch
--- tmp-orig/gcc-4.0-4.0ds1/debian/patches/amd64-biarch.dpatch  2004-12-11 
14:15:55.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/patches/amd64-biarch.dpatch   2004-12-07 
17:02:49.000000000 +0000
@@ -86,3 +86,15 @@
  esac
  
  # Remove extraneous blanks from multidirs.
+--- linux64.h  2003-11-29 03:08:10.000000000 +0000
++++ gcc/config/i386/linux64.h  2004-10-07 17:57:27.295477928 +0000
+@@ -61,7 +61,7 @@
+     %{!static: \
+       %{rdynamic:-export-dynamic} \
+       %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+-      %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} 
\
++      %{!m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux-x86-64.so.2}}} \
+     %{static:-static}}"
+ 
+ #define MULTILIB_DEFAULTS { "m64" }
+
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/patches/ppc64-biarch.dpatch 
gcc-4.0-4.0ds1/debian/patches/ppc64-biarch.dpatch
--- tmp-orig/gcc-4.0-4.0ds1/debian/patches/ppc64-biarch.dpatch  1970-01-01 
00:00:00.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/patches/ppc64-biarch.dpatch   2004-12-12 
07:14:14.000000000 +0000
@@ -0,0 +1,223 @@
+#! /bin/sh -e
+ 
+# DP: biarch patches for powerpc/ppc64
+ 
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+    pdir="-d $3"
+    dir="$3/"
+elif [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch)
+        patch $pdir -f --no-backup-if-mismatch -p1 < $0
+        #cd ${dir}gcc && autoconf
+        ;;
+    -unpatch)
+        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
+        #rm ${dir}gcc/configure
+        ;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1
+esac
+exit 0
+
+
+diff -urN tmp/gcc/config/rs6000/t-linux64 src/gcc/config/rs6000/t-linux64
+--- tmp/gcc/config/rs6000/t-linux64    2004-12-04 08:05:46.000000000 +0000
++++ src/gcc/config/rs6000/t-linux64    2004-12-04 08:07:52.180889736 +0000
+@@ -8,13 +8,13 @@
+ 
+ SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc64.ver
+ 
+-MULTILIB_OPTIONS        = m64/m32 msoft-float
+-MULTILIB_DIRNAMES       = 64 32 nof
++MULTILIB_OPTIONS        = m64/m32
++MULTILIB_DIRNAMES       = 64 32
+ MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+-MULTILIB_EXCEPTIONS     = m64/msoft-float
+-MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+-MULTILIB_OSDIRNAMES   = ../lib64 ../lib nof
+-MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
++#MULTILIB_EXCEPTIONS     = m64/msoft-float
++#MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
++MULTILIB_OSDIRNAMES   = ../lib ../lib32
++#MULTILIB_MATCHES        = $(MULTILIB_MATCHES_FLOAT)
+ 
+ # We want fine grained libraries, so use the new code to build the
+ # floating point emulation libraries.
+diff -urN tmp/gcc/config/rs6000/linux64.h src/gcc/config/rs6000/linux64.h
+--- tmp/gcc/config/rs6000/linux64.h    2004-10-03 03:43:56.000000000 +0000
++++ src/gcc/config/rs6000/linux64.h    2004-11-22 07:54:22.832314304 +0000
+@@ -353,7 +353,7 @@
+ 
+ #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+-  %{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}"
++  %{!dynamic-linker:-dynamic-linker /lib/ld64.so.1}}}"
+ 
+ #undef  TOC_SECTION_ASM_OP
+ #define TOC_SECTION_ASM_OP \
+
+diff -urN tmp/config-ml.in src/config-ml.in
+--- tmp/config-ml.in   2004-11-09 08:07:29.000000000 +0000
++++ src/config-ml.in   2004-12-12 07:12:44.631147816 +0000
+@@ -400,7 +400,47 @@
+         ;;
+       esac
+       ;;
+-powerpc*-*-* | rs6000*-*-*)
++powerpc64-*-*)
++      case " $multidirs " in
++      *" 32 "*)
++        # We will not be able to create libraries with -m32 if
++        # we cannot even link a trivial program.  It usually
++        # indicates the 32bit libraries are missing.
++        if echo 'main() {}' > conftest.c &&
++           ${CC-gcc} -m32 conftest.c -o conftest; then
++         echo Enable only libstdc++.
++         old_multidirs="${multidirs}"
++         multidirs=""
++         for x in ${old_multidirs}; do
++           case "$x" in
++           *32* ) case ${ml_realsrcdir} in
++                     *"libstdc++-v3" ) multidirs="${multidirs} ${x}" ;;
++                     *"libf2c" ) multidirs="${multidirs} ${x}" ;;
++                     *"libobjc" ) multidirs="${multidirs} ${x}" ;;
++                     *"libiberty" ) multidirs="${multidirs} ${x}" ;;
++                     *"zlib" ) multidirs="${multidirs} ${x}" ;;
++                     *) : ;;
++                  esac 
++                  ;;
++           *) multidirs="${multidirs} ${x}" ;;
++           esac
++         done
++        else
++          echo Could not link program with -m32, disabling it.
++          old_multidirs="${multidirs}"
++          multidirs=""
++          for x in ${old_multidirs}; do
++            case "$x" in
++            *m32* ) : ;;
++            *) multidirs="${multidirs} ${x}" ;;
++            esac
++          done
++        fi
++        rm -f conftest.c conftest
++        ;;
++      esac
++      ;;
++powerpc-*-* | rs6000*-*-*)
+       if [ x$enable_aix64 = xno ]
+       then
+         old_multidirs="${multidirs}"
+--- ppc64-fp.c 2004-03-11 03:14:52.000000000 +0000
++++ src/gcc/config/rs6000/ppc64-fp.c   2004-11-22 22:22:10.488086024 +0000
+@@ -33,19 +33,19 @@
+ #if defined(__powerpc64__)
+ #include "config/fp-bit.h"
+ 
+-extern DItype __fixtfdi (TFtype);
++/*extern DItype __fixtfdi (TFtype);*/
+ extern DItype __fixdfdi (DFtype);
+ extern DItype __fixsfdi (SFtype);
+ extern USItype __fixunsdfsi (DFtype);
+ extern USItype __fixunssfsi (SFtype);
+-extern TFtype __floatditf (DItype);
++/*extern TFtype __floatditf (DItype);*/
+ extern DFtype __floatdidf (DItype);
+ extern SFtype __floatdisf (DItype);
+-extern DItype __fixunstfdi (TFtype);
++/*extern DItype __fixunstfdi (TFtype);*/
+ 
+ static DItype local_fixunssfdi (SFtype);
+ static DItype local_fixunsdfdi (DFtype);
+-
++/*
+ DItype
+ __fixtfdi (TFtype a)
+ {
+@@ -53,7 +53,7 @@
+     return - __fixunstfdi (-a);
+   return __fixunstfdi (a);
+ }
+-
++*/
+ DItype
+ __fixdfdi (DFtype a)
+ {
+@@ -87,7 +87,7 @@
+                        - (- ((SItype)(((USItype)1 << ((4 * 8) - 1)) - 1)) - 
1);
+   return (SItype) a;
+ }
+-
++/*
+ TFtype
+ __floatditf (DItype u)
+ {
+@@ -99,7 +99,7 @@
+ 
+   return (TFtype) dh + (TFtype) dl;
+ }
+-
++*/
+ DFtype
+ __floatdidf (DItype u)
+ {
+@@ -137,29 +137,29 @@
+   return (SFtype) f;
+ }
+ 
+-DItype
+-__fixunstfdi (TFtype a)
+-{
+-  if (a < 0)
+-    return 0;
+-
+-  /* Compute high word of result, as a flonum.  */
+-  const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8)));
+-  /* Convert that to fixed (but not to DItype!),
+-     and shift it into the high word.  */
+-  UDItype v = (USItype) b;
+-  v <<= (sizeof (SItype) * 8);
+-  /* Remove high part from the TFtype, leaving the low part as flonum.  */
+-  a -= (TFtype) v;
+-  /* Convert that to fixed (but not to DItype!) and add it in.
+-     Sometimes A comes out negative.  This is significant, since
+-     A has more bits than a long int does.  */
+-  if (a < 0)
+-    v -= (USItype) (-a);
+-  else
+-    v += (USItype) a;
+-  return v;
+-}
++//DItype
++//__fixunstfdi (TFtype a)
++//{
++//  if (a < 0)
++//    return 0;
++//
++//  /* Compute high word of result, as a flonum.  */
++//  const TFtype b = (a / (((UDItype) 1) << (sizeof (SItype) * 8)));
++//  /* Convert that to fixed (but not to DItype!),
++//     and shift it into the high word.  */
++//  UDItype v = (USItype) b;
++//  v <<= (sizeof (SItype) * 8);
++//  /* Remove high part from the TFtype, leaving the low part as flonum.  */
++//  a -= (TFtype) v;
++//  /* Convert that to fixed (but not to DItype!) and add it in.
++//     Sometimes A comes out negative.  This is significant, since
++//     A has more bits than a long int does.  */
++//  if (a < 0)
++//    v -= (USItype) (-a);
++//  else
++//    v += (USItype) a;
++//  return v;
++//}
+ 
+ /* This version is needed to prevent recursion; fixunsdfdi in libgcc
+    calls fixdfdi, which in turn calls calls fixunsdfdi.  */
+
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-gcc.mk 
gcc-4.0-4.0ds1/debian/rules.d/binary-gcc.mk
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-gcc.mk        2004-12-11 
14:15:54.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/rules.d/binary-gcc.mk 2004-12-10 18:23:05.000000000 
+0000
@@ -35,7 +35,7 @@
 ifeq ($(biarch),yes)
     files_gcc += $(gcc_lib_dir)/64/{libgcc*,libgcov.a,*.o}
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
     files_gcc += $(gcc_lib_dir)/64/{libgcc*,*.o}
 endif
 
@@ -77,7 +77,7 @@
        ln -sf /$(lib64)/libgcc_s.so.$(GCC_SONAME) 
$(d)/$(gcc_lib_dir)/libgcc_s_64.so
        ln -sf /$(lib64)/libgcc_s.so.$(GCC_SONAME) 
$(d)/$(gcc_lib_dir)/64/libgcc_s.so
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        mkdir -p $(d_gcc)/$(gcc_lib_dir)
        mv $(d)/$(gcc_lib_dir)/32 $(d_gcc)/$(gcc_lib_dir)/
        dh_link -p$(p_gcc) \
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc-cross.mk 
gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc-cross.mk
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc-cross.mk       
2004-12-11 14:15:54.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc-cross.mk        2004-12-10 
18:24:07.000000000 +0000
@@ -2,7 +2,7 @@
 ifeq ($(with_lib64gcc),yes)
   arch_binaries        := $(arch_binaries) lib64gcc
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32gcc
 endif
 
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc.mk 
gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc.mk
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc.mk     2004-12-11 
14:15:54.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/rules.d/binary-libgcc.mk      2004-12-10 
18:23:51.000000000 +0000
@@ -2,7 +2,7 @@
 ifeq ($(with_lib64gcc),yes)
   arch_binaries        := $(arch_binaries) lib64gcc
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32gcc
 endif
 
@@ -130,11 +130,11 @@
        rm -rf $(d_l32gcc)
        dh_installdirs -p$(p_l32gcc) \
                $(docdir)/$(p_l32gcc) \
-               emul/ia32-linux/usr/lib
+               usr/lib32
 
        install -d $(d)/lib64
        mv $(d)/$(PF)/lib32/libgcc_s.so.$(GCC_SONAME) \
-               $(d_l32gcc)/emul/ia32-linux/usr/lib/.
+               $(d_l32gcc)/usr/lib32/.
 
        dh_installdocs -p$(p_l32gcc)
        dh_installchangelogs -p$(p_l32gcc)
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx-cross.mk 
gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx-cross.mk
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx-cross.mk    
2004-12-11 14:15:54.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx-cross.mk     2004-12-10 
18:24:59.000000000 +0000
@@ -4,7 +4,7 @@
 ifeq ($(with_lib64cxx),yes)
   arch_binaries  := $(arch_binaries) lib64stdcxx
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32stdcxx
 endif
 
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx.mk 
gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx.mk
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx.mk  2004-12-11 
14:15:54.000000000 +0000
+++ gcc-4.0-4.0ds1/debian/rules.d/binary-libstdcxx.mk   2004-12-10 
18:24:48.000000000 +0000
@@ -5,7 +5,7 @@
 ifeq ($(with_lib64cxx),yes)
   arch_binaries  := $(arch_binaries) lib64stdcxx
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
   arch_binaries        := $(arch_binaries) lib32stdcxx
 endif
 
@@ -81,7 +81,7 @@
     dirs_pic += $(gcc_lib_dir)
     files_pic += $(gcc_lib_dir)/64/libstdc++_pic.a
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
     dirs_dev += $(gcc_lib_dir)/32/
     files_dev += $(gcc_lib_dir)/32/libstdc++.{a,so} \
         $(gcc_lib_dir)/32/libsupc++.a
@@ -228,10 +228,10 @@
        rm -rf $(d_lib32)
        dh_installdirs -p$(p_lib32) \
                $(docdir)/$(p_lib32) \
-               emul/ia32-linux/usr/lib
+               usr/lib32
 
        mv $(d)/$(PF)/lib32/libstdc++.so.* \
-               $(d_lib32)/emul/ia32-linux/usr/lib/.
+               $(d_lib32)/usr/lib32/.
 
        dh_installdocs -p$(p_lib32)
        echo "See /$(docdir)/$(p_base) for more information" \
@@ -287,7 +287,7 @@
 ifeq ($(with_lib64cxx),yes)
        mv $(d)/$(PF)/lib64/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/64/.
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        mv $(d)/$(PF)/lib32/lib*c++*.{a,so} $(d)/$(gcc_lib_dir)/32/.
 endif
 
@@ -305,7 +305,7 @@
                /$(PF)/lib64/libstdc++.so.$(CXX_SONAME) \
                /$(gcc_lib_dir)/64/libstdc++.so
 endif
-ifeq ($(biarch_ia32),yes)
+ifeq ($(biarch_32),yes)
        dh_link -p$(p_dev) \
                /$(PF)/lib32/libstdc++.so.$(CXX_SONAME) \
                /$(gcc_lib_dir)/32/libstdc++.so
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.defs 
gcc-4.0-4.0ds1/debian/rules.defs
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.defs   2004-12-11 14:15:55.000000000 
+0000
+++ gcc-4.0-4.0ds1/debian/rules.defs    2004-12-10 18:32:05.000000000 +0000
@@ -440,7 +440,7 @@
 endif
 
 with_libgnat := yes
-ada_no_cpus := arm m68k hppa mips mipsel s390 sparc
+ada_no_cpus := arm m68k hppa mips mipsel s390 sparc powerpc64
 ada_no_systems := hurd-i386 kfreebsd-gnu knetbsd-gnu netbsdelf-gnu
 ifneq (, $(filter $(DEB_TARGET_GNU_CPU),$(ada_no_cpus)))
   with_ada := disabled for architecure $(DEB_TARGET_GNU_CPU)
@@ -510,7 +510,7 @@
 endif
 
 # run testsuite --------------------
-with_check := yes
+with_check := no
 # If you don't want to run the gcc testsuite, set `with_check' to `no'
 #with_check := disabled by hand
 ifeq ($(with_base_only),yes)
@@ -559,11 +559,11 @@
   #with_lib64gcj       := yes
 endif
 
-ifeq ($(DEB_TARGET_ARCH),amd64)
-  biarch_ia32 := yes
+ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),amd64 ppc64))
+  biarch_32 := yes
 endif
 #ifeq ($(DEB_TARGET_ARCH),ia64)
-#  biarch_ia32 := yes
+#  biarch_32 := yes
 #endif
 
 # hppa64 build --------------------
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules.patch 
gcc-4.0-4.0ds1/debian/rules.patch
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules.patch  2004-12-11 14:15:55.000000000 
+0000
+++ gcc-4.0-4.0ds1/debian/rules.patch   2004-12-07 17:02:49.000000000 +0000
@@ -64,6 +64,9 @@
 ifeq ($(DEB_TARGET_ARCH),amd64)
   debian_patches += amd64-biarch # amd64-multilib
 endif
+ifeq ($(DEB_TARGET_ARCH),ppc64)
+  debian_patches += ppc64-biarch
+endif
 
 ifeq ($(DEB_TARGET_GNU_CPU),alpha)
   debian_patches += # alpha-ieee
diff -urN tmp-orig/gcc-4.0-4.0ds1/debian/rules2 gcc-4.0-4.0ds1/debian/rules2
--- tmp-orig/gcc-4.0-4.0ds1/debian/rules2       2004-12-11 14:15:55.000000000 
+0000
+++ gcc-4.0-4.0ds1/debian/rules2        2004-12-11 14:22:29.000000000 +0000
@@ -44,7 +44,7 @@
 ifeq ($(with_ada),yes)
   CC           = gnatgcc $(CPPFLAGS)
 else
-  CC           = cc $(CPPFLAGS)
+  CC           = gcc-3.4 $(CPPFLAGS)
 endif
 
 ifeq ($(DEB_HOST_ARCH), $(findstring $(DEB_HOST_ARCH),m68k))

Reply via email to