aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDouglas B Rupp <rupp@gnat.com>2001-11-19 17:09:00 -0500
committerRichard Kenner <kenner@gcc.gnu.org>2001-11-19 17:09:00 -0500
commit6baf9874a1d0a5506f566707fbc2fbdd7d084045 (patch)
tree4976016af7b8daf7a99091b4b735da509930168b /gcc
parent419fef71cbe7c562b50e1561a2ea250996d7785b (diff)
downloadgcc-6baf9874a1d0a5506f566707fbc2fbdd7d084045.zip
gcc-6baf9874a1d0a5506f566707fbc2fbdd7d084045.tar.gz
gcc-6baf9874a1d0a5506f566707fbc2fbdd7d084045.tar.bz2
toplev.c (DUMPFILE_FORMAT): Define default.
* toplev.c (DUMPFILE_FORMAT): Define default. (open_dump_file): Use DUMPFILE_FORMAT in sprintf. (close_dump_file, compile_file): Likewise. * config/alpha/xm-vms.h (DUMPFILE_FORMAT): Define. * doc/hostconfig.texi (DUMPFILE_FORMAT): Document From-SVN: r47185
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/alpha/xm-vms.h6
-rw-r--r--gcc/doc/hostconfig.texi9
-rw-r--r--gcc/toplev.c11
4 files changed, 28 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 58d47b0..237fdd0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+Mon Nov 19 16:57:44 2001 Douglas B. Rupp <rupp@gnat.com>
+
+ * toplev.c (DUMPFILE_FORMAT): Define default.
+ (open_dump_file): Use DUMPFILE_FORMAT in sprintf.
+ (close_dump_file, compile_file): Likewise.
+ * config/alpha/xm-vms.h (DUMPFILE_FORMAT): Define.
+ * doc/hostconfig.texi (DUMPFILE_FORMAT): Document
+
2001-11-19 Jeff Law <law@redhat.com>
* gcse.c (cprop_jump): Clear JUMP_LABEL field when we create
diff --git a/gcc/config/alpha/xm-vms.h b/gcc/config/alpha/xm-vms.h
index 5ab7ab8..225eb5d 100644
--- a/gcc/config/alpha/xm-vms.h
+++ b/gcc/config/alpha/xm-vms.h
@@ -42,10 +42,8 @@ Boston, MA 02111-1307, USA. */
#undef SUCCESS_EXIT_CODE
#define SUCCESS_EXIT_CODE 0
#undef FATAL_EXIT_CODE
-#define FATAL_EXIT_CODE (1)
-#ifdef exit
+#define FATAL_EXIT_CODE 1
#undef exit
-#endif
#define exit __posix_exit
void __posix_exit (int);
@@ -71,3 +69,5 @@ void __posix_exit (int);
#define HOST_EXECUTABLE_SUFFIX ".exe"
#define HOST_OBJECT_SUFFIX ".obj"
+
+#define DUMPFILE_FORMAT "_%02d_"
diff --git a/gcc/doc/hostconfig.texi b/gcc/doc/hostconfig.texi
index f7a1c42..0aed7e1 100644
--- a/gcc/doc/hostconfig.texi
+++ b/gcc/doc/hostconfig.texi
@@ -232,6 +232,15 @@ different buffer, the old path should be freed and the new buffer should
have been allocated with malloc.
@end table
+@findex DUMPFILE_FORMAT
+@item DUMPFILE_FORMAT
+Define this macro to be a C string representing the format to use
+for constructing the index part of the dump file name on your host machine.
+If you do not define this macro, GCC will use @samp{.%02d.}. The full
+filename will be the prefix of the assembler file name concatenated with
+the string resulting from applying this format concatenated with a string
+unique to each dump file kind, e.g. @samp{rtl}.
+
@findex bzero
@findex bcmp
In addition, configuration files for system V define @code{bcopy},
diff --git a/gcc/toplev.c b/gcc/toplev.c
index a3bdba6..0876467 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -232,6 +232,11 @@ int input_file_stack_tick;
const char *dump_base_name;
+/* Format to use to print dumpfile index value */
+#ifndef DUMPFILE_FORMAT
+#define DUMPFILE_FORMAT ".%02d."
+#endif
+
/* Bit flags that specify the machine subtype we are compiling for.
Bits are tested using macros TARGET_... defined in the tm.h file
and set by `-m...' switches. Must be defined in rtlanal.c. */
@@ -1857,7 +1862,7 @@ open_dump_file (index, decl)
if (rtl_dump_file != NULL)
fclose (rtl_dump_file);
- sprintf (seq, ".%02d.", index);
+ sprintf (seq, DUMPFILE_FORMAT, index);
if (! dump_file[index].initialized)
{
@@ -1911,7 +1916,7 @@ close_dump_file (index, func, insns)
char seq[16];
char *suffix;
- sprintf (seq, ".%02d.", index);
+ sprintf (seq, DUMPFILE_FORMAT, index);
suffix = concat (seq, dump_file[index].extension, NULL);
print_rtl_graph_with_bb (dump_base_name, suffix, insns);
free (suffix);
@@ -5144,7 +5149,7 @@ finalize ()
char seq[16];
char *suffix;
- sprintf (seq, ".%02d.", i);
+ sprintf (seq, DUMPFILE_FORMAT, i);
suffix = concat (seq, dump_file[i].extension, NULL);
finish_graph_dump_file (dump_base_name, suffix);
free (suffix);