diff options
author | Joseph Myers <joseph@codesourcery.com> | 2011-06-23 11:41:42 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2011-06-23 11:41:42 +0100 |
commit | 4c77620d6dedebfb9f5092de3da0c9870587a734 (patch) | |
tree | 7b93802244815ada4c0d9017f18aa9c00fd3c497 /gcc/params.c | |
parent | 6f20ac347a219ef84e43bfdc11c010a6e79adc7b (diff) | |
download | gcc-4c77620d6dedebfb9f5092de3da0c9870587a734.zip gcc-4c77620d6dedebfb9f5092de3da0c9870587a734.tar.gz gcc-4c77620d6dedebfb9f5092de3da0c9870587a734.tar.bz2 |
params.c: Include common/common-target.h.
* params.c: Include common/common-target.h. Don't include tm.h.
(lang_independent_params): Move from toplev.c.
(global_init_params): New.
* params.h (global_init_params): Declare.
* target.def (default_params): Move to common-target.def.
* toplev.c (lang_independent_options): Remove.
(lang_independent_params): Move to params.c.
(general_init): Use global_init_params.
* common/common-target.def (option_default_params): Move from
target.def.
* common/config/ia64/ia64-common.c: Include params.h.
(ia64_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move
from ia64.c.
* common/config/rs6000/rs6000-common.c: Include params.h.
(rs6000_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move
from rs6000.c.
* common/config/sh/sh-common.c: Include params.h.
(sh_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move
from sh.c.
* common/config/spu/spu-common.c: Include params.h.
(spu_option_default_params, TARGET_OPTION_DEFAULT_PARAMS): Move
from spu.c.
* config/ia64/ia64.c (ia64_option_default_params,
TARGET_OPTION_DEFAULT_PARAMS): Move to ia64-common.c.
* config/rs6000/rs6000.c (rs6000_option_default_params,
TARGET_OPTION_DEFAULT_PARAMS): Move to rs6000-common.c.
* config/sh/sh.c (sh_option_default_params,
TARGET_OPTION_DEFAULT_PARAMS): Move to sh-common.c.
* config/spu/spu.c (spu_option_default_params,
TARGET_OPTION_DEFAULT_PARAMS): Move to spu-common.c.
* Makefile.in (OBJS): Remove params.o.
(OBJS-libcommon-target): Add params.o.
(params.o, $(common_out_object_file)): Update dependencies.
* doc/tm.texi: Regenerate.
From-SVN: r175330
Diffstat (limited to 'gcc/params.c')
-rw-r--r-- | gcc/params.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/params.c b/gcc/params.c index 95af6ce..793ddef 100644 --- a/gcc/params.c +++ b/gcc/params.c @@ -1,5 +1,5 @@ /* params.c - Run-time parameters. - Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Copyright (C) 2001, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Mark Mitchell <mark@codesourcery.com>. @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" -#include "tm.h" +#include "common/common-target.h" #include "params.h" #include "diagnostic-core.h" @@ -38,6 +38,14 @@ static size_t num_compiler_params; default values determined. */ static bool params_finished; +static const param_info lang_independent_params[] = { +#define DEFPARAM(ENUM, OPTION, HELP, DEFAULT, MIN, MAX) \ + { OPTION, DEFAULT, MIN, MAX, HELP }, +#include "params.def" +#undef DEFPARAM + { NULL, 0, 0, 0, NULL } +}; + /* Add the N PARAMS to the current list of compiler parameters. */ void @@ -56,6 +64,16 @@ add_params (const param_info params[], size_t n) num_compiler_params += n; } +/* Add all parameters and default values that can be set in both the + driver and the compiler proper. */ + +void +global_init_params (void) +{ + add_params (lang_independent_params, LAST_PARAM); + targetm_common.option_default_params (); +} + /* Note that all parameters have been added and all default values set. */ |