mirror of git://gcc.gnu.org/git/gcc.git
Makefile.in (options.c): Tell optc-gen.awk to include config.h, system.h, coretypes.h and tm.h.
* Makefile.in (options.c): Tell optc-gen.awk to include config.h, system.h, coretypes.h and tm.h. (options.o): Update dependencies accordingly. * optc-gen.awk: Allow header_name to be a list of filenames. Handle the "Condition" flag. * opts.h (CL_DISABLED): New flag. * opts.c (handle_option): Print an error for CL_DISABLED options. * doc/options.texi: Document the "Condition" option flag. From-SVN: r99774
This commit is contained in:
parent
8b37cc6429
commit
aeb70e782a
|
@ -1,3 +1,14 @@
|
||||||
|
2005-05-16 Richard Sandiford <rsandifo@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in (options.c): Tell optc-gen.awk to include config.h,
|
||||||
|
system.h, coretypes.h and tm.h.
|
||||||
|
(options.o): Update dependencies accordingly.
|
||||||
|
* optc-gen.awk: Allow header_name to be a list of filenames.
|
||||||
|
Handle the "Condition" flag.
|
||||||
|
* opts.h (CL_DISABLED): New flag.
|
||||||
|
* opts.c (handle_option): Print an error for CL_DISABLED options.
|
||||||
|
* doc/options.texi: Document the "Condition" option flag.
|
||||||
|
|
||||||
2005-05-16 Paolo Bonzini <bonzini@gnu.org>
|
2005-05-16 Paolo Bonzini <bonzini@gnu.org>
|
||||||
|
|
||||||
* tree-inline.c (estimate_num_insns_1): Handle VEC_COND_EXPR.
|
* tree-inline.c (estimate_num_insns_1): Handle VEC_COND_EXPR.
|
||||||
|
|
|
@ -1569,7 +1569,7 @@ s-options: $(ALL_OPT_FILES) Makefile $(srcdir)/opt-gather.awk
|
||||||
|
|
||||||
options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk
|
options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/optc-gen.awk
|
||||||
$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk \
|
$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/optc-gen.awk \
|
||||||
-v header_name="options.h" < $< > $@
|
-v header_name="config.h system.h coretypes.h tm.h" < $< > $@
|
||||||
|
|
||||||
options.h: s-options-h ; @true
|
options.h: s-options-h ; @true
|
||||||
s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
|
s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
|
||||||
|
@ -1578,7 +1578,7 @@ s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opth-gen.awk
|
||||||
$(SHELL) $(srcdir)/../move-if-change tmp-options.h options.h
|
$(SHELL) $(srcdir)/../move-if-change tmp-options.h options.h
|
||||||
$(STAMP) $@
|
$(STAMP) $@
|
||||||
|
|
||||||
options.o: options.c options.h opts.h intl.h
|
options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) opts.h intl.h
|
||||||
|
|
||||||
dumpvers: dumpvers.c
|
dumpvers: dumpvers.c
|
||||||
|
|
||||||
|
|
|
@ -191,4 +191,11 @@ The state of the option should be printed by @option{-fverbose-asm}.
|
||||||
@item Undocumented
|
@item Undocumented
|
||||||
The option is deliberately missing documentation and should not
|
The option is deliberately missing documentation and should not
|
||||||
be included in the @option{--help} output.
|
be included in the @option{--help} output.
|
||||||
|
|
||||||
|
@item Condition(@var{cond})
|
||||||
|
The option should only be accepted if preprocessor condition
|
||||||
|
@var{cond} is true. Note that any C declarations associated with the
|
||||||
|
option will be present even if @var{cond} is false; @var{cond} simply
|
||||||
|
controls whether the option is accepted and whether it is printed in
|
||||||
|
the @option{--help} output.
|
||||||
@end table
|
@end table
|
||||||
|
|
|
@ -57,7 +57,9 @@ END {
|
||||||
print "/* This file is auto-generated by opts.sh. */"
|
print "/* This file is auto-generated by opts.sh. */"
|
||||||
print ""
|
print ""
|
||||||
print "#include <intl.h>"
|
print "#include <intl.h>"
|
||||||
print "#include " quote header_name quote
|
n_headers = split(header_name, headers, " ")
|
||||||
|
for (i = 1; i <= n_headers; i++)
|
||||||
|
print "#include " quote headers[i] quote
|
||||||
print "#include " quote "opts.h" quote
|
print "#include " quote "opts.h" quote
|
||||||
print ""
|
print ""
|
||||||
|
|
||||||
|
@ -135,10 +137,20 @@ for (i = 0; i < n_opts; i++) {
|
||||||
else
|
else
|
||||||
hlp = quote help[i] quote;
|
hlp = quote help[i] quote;
|
||||||
|
|
||||||
printf(" { %c-%s%c,\n %s,\n %s, %u, %s, %s, %s }%s\n",
|
printf(" { %c-%s%c,\n %s,\n %s, %u,\n",
|
||||||
quote, opts[i], quote, hlp, back_chain[i], len,
|
quote, opts[i], quote, hlp, back_chain[i], len)
|
||||||
switch_flags(flags[i]),
|
condition = opt_args("Condition", flags[i])
|
||||||
var_ref(flags[i]), var_set(flags[i]), comma)
|
cl_flags = switch_flags(flags[i])
|
||||||
|
if (condition != "")
|
||||||
|
printf("#if %s\n" \
|
||||||
|
" %s,\n" \
|
||||||
|
"#else\n" \
|
||||||
|
" CL_DISABLED,\n" \
|
||||||
|
"#endif\n",
|
||||||
|
condition, cl_flags, cl_flags)
|
||||||
|
else
|
||||||
|
printf(" %s,\n", cl_flags)
|
||||||
|
printf(" %s, %s }%s\n", var_ref(flags[i]), var_set(flags[i]), comma)
|
||||||
}
|
}
|
||||||
|
|
||||||
print "};"
|
print "};"
|
||||||
|
|
|
@ -315,6 +315,14 @@ handle_option (const char **argv, unsigned int lang_mask)
|
||||||
/* We've recognized this switch. */
|
/* We've recognized this switch. */
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|
||||||
|
/* Check to see if the option is disabled for this configuration. */
|
||||||
|
if (option->flags & CL_DISABLED)
|
||||||
|
{
|
||||||
|
error ("command line option %qs"
|
||||||
|
" is not supported by this configuration", opt);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
/* Sort out any argument the switch takes. */
|
/* Sort out any argument the switch takes. */
|
||||||
if (option->flags & CL_JOINED)
|
if (option->flags & CL_JOINED)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,6 +52,7 @@ extern const struct cl_option cl_options[];
|
||||||
extern const unsigned int cl_options_count;
|
extern const unsigned int cl_options_count;
|
||||||
extern const char *const lang_names[];
|
extern const char *const lang_names[];
|
||||||
|
|
||||||
|
#define CL_DISABLED (1 << 21) /* Disabled in this configuration. */
|
||||||
#define CL_TARGET (1 << 22) /* Target-specific option. */
|
#define CL_TARGET (1 << 22) /* Target-specific option. */
|
||||||
#define CL_REPORT (1 << 23) /* Report argument with -fverbose-asm */
|
#define CL_REPORT (1 << 23) /* Report argument with -fverbose-asm */
|
||||||
#define CL_JOINED (1 << 24) /* If takes joined argument. */
|
#define CL_JOINED (1 << 24) /* If takes joined argument. */
|
||||||
|
|
Loading…
Reference in New Issue