#! /bin/sh -e

# DP: Diable usage auf addr2line library (currently not packaged for Debian)

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

--- src/gcc/ada/adaint.c~	Sat Mar  2 00:38:10 2002
+++ src/gcc/ada/adaint.c	Fri Apr  5 18:36:10 2002
@@ -2214,7 +2214,7 @@
 }
 #endif
 
-#if defined (CROSS_COMPILE)  \
+#if 1 || defined (CROSS_COMPILE)  \
   || (! (defined (sparc) && defined (sun) && defined (__SVR4)) \
       && ! defined (linux) \
       && ! defined (sgi) \
--- src/gcc/ada/Makefile.in~	Thu Mar 14 12:46:04 2002
+++ src/gcc/ada/Makefile.in	Fri Apr  5 18:39:51 2002
@@ -1169,7 +1169,7 @@
   system.ads<5lsystem.ads
 
   MLIB_TGT=5lml-tgt
-  MISCLIB=-laddr2line -lbfd
+  MISCLIB=-lbfd
   THREADSLIB=-lpthread
   GNATLIB_SHARED=gnatlib-shared-dual
   GMEM_LIB=gmemlib
