/usr/src/gcc-4.8/debian/patches/gcc-ice-dump.diff is in gcc-4.8-source 4.8.5-4ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # DP: For ICEs, dump the preprocessed source file to stderr
# DP: when in a distro build environment.
Index: b/src/gcc/gcc.c
===================================================================
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -6253,9 +6253,24 @@ retry_ice (const char *prog, const char
if (WIFEXITED (status)
&& WEXITSTATUS (status) == SUCCESS_EXIT_CODE)
{
+ char *deb_build_options = getenv("DEB_BUILD_OPTIONS");
+
fnotice (stderr, "Preprocessed source stored into %s file,"
" please attach this to your bugreport.\n",
temp_filenames[attempt * 2]);
+ if (deb_build_options)
+ {
+ char *cmd = XNEWVEC (char, 50 + strlen (temp_filenames[attempt * 2]));
+
+ sprintf (cmd, "/bin/cat %s >&2", temp_filenames[attempt * 2]);
+ fprintf (stderr, "=== BEGIN GCC DUMP ===\n");
+ fflush (stderr);
+ system (cmd);
+ fflush (stderr);
+ fprintf (stderr, "=== END GCC DUMP ===\n");
+ fflush (stderr);
+ free (cmd);
+ }
/* Make sure it is not deleted. */
free (temp_filenames[attempt * 2]);
temp_filenames[attempt * 2] = NULL;
|