#! /bin/sh -e
# 
#
# DP: Author: NIIBE Yutaka <gniibe@fsij.org>
# DP: Status: experimental, only tested for Debian m32r

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 -p1 < $0;;
       -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
	*)
		echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac

exit 0

--- gcc-3.4.3/gcc/config/m32r/t-linux~	2004-11-24 22:17:07.000000000 +0900
+++ gcc-3.4.3/gcc/config/m32r/t-linux	2004-11-24 22:18:51.000000000 +0900
@@ -48,3 +48,6 @@ SHLIB_MAPFILES += $(srcdir)/config/m32r/
 LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \
   $(srcdir)/unwind-sjlj.c $(srcdir)/gthr-gnat.c $(srcdir)/unwind-c.c
 LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c gthr-gnat.c
+
+# We're GNU system, where GNU C library is native C library.
+CROSS_SYSTEM_HEADER_DIR = $(gcc_tooldir)/include
