#! /bin/sh -e
## 118_arm_pass_all.dpatch
##
## DP: Description: fix broken libtool pass_all handling for arm and other arches
## DP: Author: James Troup <james@nocrew.org>
## DP: Upstream status: Not submitted
## DP: Date: 2004-09-09

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/configure binutils-2.15/bfd/configure
--- /home/james/debian/packages/binutils/binutils-2.15/bfd/configure	2004-09-09 18:56:22.173249237 +0100
+++ binutils-2.15/bfd/configure	2004-09-09 18:59:29.250900134 +0100
@@ -1689,13 +1689,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/binutils/configure binutils-2.15/binutils/configure
--- /home/james/debian/packages/binutils/binutils-2.15/binutils/configure	2004-01-02 17:08:04.000000000 +0000
+++ binutils-2.15/binutils/configure	2004-09-09 18:59:53.432107497 +0100
@@ -1575,13 +1575,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/gas/configure binutils-2.15/gas/configure
--- /home/james/debian/packages/binutils/binutils-2.15/gas/configure	2004-05-17 20:36:07.000000000 +0100
+++ binutils-2.15/gas/configure	2004-09-09 19:00:13.324987211 +0100
@@ -3390,13 +3390,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/gprof/configure binutils-2.15/gprof/configure
--- /home/james/debian/packages/binutils/binutils-2.15/gprof/configure	2003-08-26 18:19:19.000000000 +0100
+++ binutils-2.15/gprof/configure	2004-09-09 19:01:03.443125010 +0100
@@ -1571,13 +1571,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/ld/configure binutils-2.15/ld/configure
--- /home/james/debian/packages/binutils/binutils-2.15/ld/configure	2003-04-24 13:36:07.000000000 +0100
+++ binutils-2.15/ld/configure	2004-09-09 19:00:51.726963084 +0100
@@ -1579,13 +1579,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
diff -urNad /home/james/debian/packages/binutils/binutils-2.15/opcodes/configure binutils-2.15/opcodes/configure
--- /home/james/debian/packages/binutils/binutils-2.15/opcodes/configure	2003-08-05 10:39:31.000000000 +0100
+++ binutils-2.15/opcodes/configure	2004-09-09 19:00:39.299912605 +0100
@@ -1690,13 +1690,7 @@
 
 # This must be Linux ELF.
 linux-gnu*)
-  case $host_cpu in
-  alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
-  esac
+  lt_cv_deplibs_check_method=pass_all
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
