1 /* Command line option handling. Code involving global state that
2 should not be shared with the driver.
3 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
24 #include "coretypes.h"
25 #include "diagnostic-core.h"
29 #include "tm.h" /* Required by rtl.h. */
33 #include "tree-pass.h"
36 handle_common_deferred_options (void)
39 cl_deferred_option *opt;
40 VEC(cl_deferred_option,heap) *vec
41 = (VEC(cl_deferred_option,heap) *) common_deferred_options;
43 FOR_EACH_VEC_ELT (cl_deferred_option, vec, i, opt)
45 switch (opt->opt_index)
48 fix_register (opt->arg, 0, 1);
51 case OPT_fcall_saved_:
52 fix_register (opt->arg, 0, 0);
56 if (!dump_switch_p (opt->arg))
57 error ("unrecognized command line option %<-fdump-%s%>", opt->arg);
62 fix_register (opt->arg, 1, 1);
67 add_new_plugin (opt->arg);
69 error ("plugin support is disabled; configure with --enable-plugin");
73 case OPT_fplugin_arg_:
75 parse_plugin_arg_opt (opt->arg);
77 error ("plugin support is disabled; configure with --enable-plugin");
81 case OPT_fstack_limit:
82 /* The real switch is -fno-stack-limit. */
83 gcc_assert (!opt->value);
84 stack_limit_rtx = NULL_RTX;
87 case OPT_fstack_limit_register_:
89 int reg = decode_reg_name (opt->arg);
91 error ("unrecognized register name %qs", opt->arg);
93 stack_limit_rtx = gen_rtx_REG (Pmode, reg);
97 case OPT_fstack_limit_symbol_:
98 stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (opt->arg));