This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix driver's parameter handling for -dumpbase


On Tue, Oct 28, 2008 at 05:39:37PM -0200, Luis Machado wrote:
> 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.  */
> 

Ok.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]