This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix driver's parameter handling for -dumpbase
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 Oct 2008 17:39:37 -0200
- Subject: [PATCH] Fix driver's parameter handling for -dumpbase
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
Hi folks,
Currently, the driver doesn't expect any parameters for the -dumpbase
option, but the compiler does. So if one tries to change the base name
of the dumps by passing -dumpbase to the driver, the compiler will pick
the string next to it in the parameter list, leading to unexpected
output. This trivial patch fixes this by adding dumpbase to the list of
word switches that take arguments.
OK for mainline?
Thanks,
Luis
2008-10-28 Luis Machado <luisgpm@br.ibm.com>
* gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add "dumpbase" to the
list of word switches that take args.
Index: HEAD/gcc/gcc.h
===================================================================
--- HEAD.orig/gcc/gcc.h 2008-10-28 13:58:57.000000000 -0500
+++ HEAD/gcc/gcc.h 2008-10-28 13:59:37.000000000 -0500
@@ -51,7 +51,7 @@
|| !strcmp (STR, "isysroot") \
|| !strcmp (STR, "-param") || !strcmp (STR, "specs") \
|| !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ") \
- || !strcmp (STR, "fintrinsic-modules-path"))
+ || !strcmp (STR, "fintrinsic-modules-path") || !strcmp (STR, "dumpbase"))
/* These are exported by gcc.c. */