#! /bin/sh -e

# DP: overwrite baseline detection for i386: use the i486 headers

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 -p0 < $0
        #cd ${dir}gcc && autoconf
        ;;
    -unpatch)
        patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
        #rm ${dir}gcc/configure
        ;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- libstdc++-v3/configure.target~	2003-06-19 19:55:35.000000000 +0200
+++ libstdc++-v3/configure.target	2003-06-20 09:15:08.000000000 +0200
@@ -91,6 +91,14 @@
     ;;
 esac
 
+# Debian adjustments
+echo "LIBSTDCXX TARGET CPU: $target_cpu"
+case "${target_cpu}" in
+  i386)
+    # we use the i486 ABI ...
+    try_cpu=i486
+    ;;
+esac
 
 # Now look for the file(s) usually tied to a CPU model, and make
 # default choices for those if they haven't been explicitly set
