#! /bin/sh -e
# 
#
# DP: Author: NIIBE Yutaka
# DP: Status: Not yet in CVS
# DP: Stack protection support

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

2004-11-12  NIIBE Yutaka  <gniibe@fsij.org>

	* config/m32r/linux.h (TARGET_ASM_FILE_END): Defined for stack
	protection.

--- gcc-3.4.2/gcc/config/m32r/linux.h.orig	2003-12-31 19:33:02.000000000 +0900
+++ gcc-3.4.2/gcc/config/m32r/linux.h	2004-11-12 11:32:02.000000000 +0900
@@ -102,3 +102,4 @@
                                                                                 
 #define TARGET_OS_CPP_BUILTINS() LINUX_TARGET_OS_CPP_BUILTINS()
 
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
