summaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-14 20:18:43 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-14 20:18:43 +0000
commitff05e09e2d0d3b01e2dbc1d0d6d869cd0b1ce745 (patch)
tree93e6840750fcec57ca9299b96d2ddd12e82c2805 /gcc/Makefile.in
parent3d2931b52bc6e77b35fac2cabaf7e5e91db63f9a (diff)
downloadgcc-ff05e09e2d0d3b01e2dbc1d0d6d869cd0b1ce745.tar.gz
* config.gcc (extra_options): New variable for listing option files.
Add ${cpu_type}/${cpu_type}.opt to it if that file exists. * configure.ac (extra_opt_files): New AC_SUBST variable. (tm_file_list, tm_include_list): Include options.h first. * configure: Regenerate. * Makefile.in (extra_opt_files, ALL_OPT_FILES): New variables. (s-options): Use $(ALL_OPT_FILES) instead of $(lang_opt_files) (s-options-h): New rule. (options.h): Depend on it. (TEXI_GCCINT_FILES): Add options.texi. * hooks.h (hook_bool_size_t_constcharptr_int_true): Declare. * hooks.c (hook_bool_size_t_constcharptr_int_true): New function. * target.h (gcc_target): Add default_target_flags and handle_option. * target-def.h (TARGET_DEFAULT_TARGET_FLAGS) (TARGET_HANDLE_OPTION): New macros. (TARGET_INITIALIZER): Include them. * opt-functions.awk (opt_args, nth_arg): New functions. (switch_flags): Handle the "Target" flag. (var_args): Delete. (var_name): Use opt_args and nth_arg. (var_set, var_ref): Likewise. Handle "Mask" and "InverseMask". * opth-gen.awk: Declare target_flags. Declare MASK_* and TARGET_* macros for the "Mask" and "InverseMask" options. * opts.h (cl_var_cond): New enum. (cl_option): Replace the "has_set_value" and "set_value" fields with "var_cond" and "var_value". (CL_TARGET): New macro. (option_enabled, print_filtered_help): Declare. (decode_options): Move definition. * opts.c (handle_option): Search for the original option before removing any "no-" prefix. Handle CL_TARGET. Adjust for the new var_cond and var_value fields. Use targetm.handle_option to handle target options. (decode_options): Set target_flags to targetm.default_target_flags. (print_filtered_help): Make global. Handle CL_TARGET. (option_enabled): New function. * toplev.c (target_switches): Guard with #ifdef TARGET_SWITCHES. (display_target_options, set_target_switch, print_switch_values) (default_pch_valid_p): Guard uses of target_switches with #ifdef TARGET_SWITCHES. Also... (display_target_options): Display the CL_TARGET entries in cl_options. (set_target_option): Don't complain about the "" option when TARGET_SWITCHES is undefined. (print_switch_values): Use option_enabled. (default_pch_valid_p): Check cl_options[] when looking for something that has changed the value of target_flags. * c.opt: Remove documentation from top of file. * doc/gccint.texi: Add an "Options" chapter. Include options.texi. * doc/sourecebuild.texi: Refer to the new options documentation instead of c.opt. Document machine-specific .opt files. * doc/tm.texi (target_flags): Say that this variable is declared by options.h. (TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Document. (TARGET_SWITCHES, TARGET_OPTIONS): Refer to the option files as an alternative. * doc/options.texi: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96448 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 1b72ac8132e..fbdc9e11ac9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -425,6 +425,7 @@ GCC_THREAD_FILE=@thread_file@
OBJC_BOEHM_GC=@objc_boehm_gc@
GTHREAD_FLAGS=@gthread_flags@
extra_modes_file=@extra_modes_file@
+extra_opt_files=@extra_opt_files@
host_hook_obj=@out_host_hook_obj@
# Be prepared for gcc2 merges.
gcc_version=@gcc_version@
@@ -880,6 +881,9 @@ SUBDIR_FLAGS_TO_PASS = $(ORDINARY_FLAGS_TO_PASS) \
#
# Lists of files for various purposes.
+# All option source files
+ALL_OPT_FILES=$(lang_opt_files) $(extra_opt_files)
+
# Target specific, C specific object file
C_TARGET_OBJS=@c_target_objs@
@@ -1529,19 +1533,21 @@ s-specs : Makefile
$(STAMP) s-specs
optionlist: s-options ; @true
-s-options: $(lang_opt_files) Makefile $(srcdir)/opt-gather.awk
- $(AWK) -f $(srcdir)/opt-gather.awk $(lang_opt_files) > tmp-optionlist
+s-options: $(ALL_OPT_FILES) Makefile $(srcdir)/opt-gather.awk
+ $(AWK) -f $(srcdir)/opt-gather.awk $(ALL_OPT_FILES) > tmp-optionlist
$(SHELL) $(srcdir)/../move-if-change tmp-optionlist optionlist
$(STAMP) s-options
-
options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk
$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk \
-v header_name="options.h" < $< > $@
-options.h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
+options.h: s-options-h ; @true
+s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/opth-gen.awk \
- < $< > $@
+ < $< > tmp-options.h
+ $(SHELL) $(srcdir)/../move-if-change tmp-options.h options.h
+ $(STAMP) $@
options.o: options.c options.h opts.h intl.h
@@ -2977,7 +2983,7 @@ TEXI_GCCINT_FILES = gccint.texi gcc-common.texi contribute.texi makefile.texi \
c-tree.texi rtl.texi md.texi tm.texi hostconfig.texi fragments.texi \
configfiles.texi collect2.texi headerdirs.texi funding.texi gnu.texi \
gpl.texi fdl.texi contrib.texi languages.texi sourcebuild.texi \
- gty.texi libgcc.texi cfg.texi tree-ssa.texi
+ gty.texi libgcc.texi cfg.texi tree-ssa.texi options.texi
TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi