summaryrefslogtreecommitdiffstats
path: root/meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch')
-rw-r--r--meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch b/meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch
new file mode 100644
index 0000000000..87b8f06ea8
--- /dev/null
+++ b/meta/packages/gcc/gcc-4.3.1/debian/gcc-ice-apport.dpatch
@@ -0,0 +1,44 @@
1#! /bin/sh -e
2
3# DP: Report an ICE to apport (if apport is available
4# DP: and the environment variable GCC_NOAPPORT is not set)
5
6dir=
7if [ $# -eq 3 -a "$2" = '-d' ]; then
8 pdir="-d $3"
9 dir="$3/"
10elif [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14case "$1" in
15 -patch)
16 patch $pdir -f --no-backup-if-mismatch -p0 < $0
17 ;;
18 -unpatch)
19 patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
20 ;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1
24esac
25exit 0
26
27--- gcc/gcc.c~ 2007-08-05 22:17:07.000000000 +0200
28+++ gcc/gcc.c 2007-08-12 15:03:16.000000000 +0200
29@@ -6119,6 +6119,15 @@
30 {
31 notice ("Preprocessed source stored into %s file, please attach this to your bugreport.\n",
32 temp_filenames[attempt * 2]);
33+ if (!getenv ("GCC_NOAPPORT")
34+ && !access ("/usr/share/apport/gcc_ice_hook", R_OK | X_OK))
35+ {
36+ char *cmd = xmalloc (50 + strlen (temp_filenames[attempt * 2]) + strlen (new_argv[0]));
37+ sprintf (cmd, "/usr/share/apport/gcc_ice_hook %s %s",
38+ new_argv[0], temp_filenames[attempt * 2]);
39+ system (cmd);
40+ free (cmd);
41+ }
42 /* Make sure it is not deleted. */
43 free (temp_filenames[attempt * 2]);
44 temp_filenames[attempt * 2] = NULL;