Commit 57dfdff0 by Joseph Myers Committed by Joseph Myers

optc-save-gen.awk: New.

	* optc-save-gen.awk: New.  Based on optc-gen.awk.  Don't generate
	parts of output shared with the driver.
	* optc-gen.awk: Don't generate parts of output not shared with the
	driver.
	* opth-gen.awk: Remove GCC_DRIVER conditionals.
	* doc/options.texi (SourcerInclude): Mention options-save.c.
	* Makefile.in (GCC_OBJS): Use options.o instead of gcc-options.o.
	(OBJS): Add options-save.o.
	(options-save.c, options-save.o): New.
	(options.o): Update dependencies.
	(gcc-options.o): Remove.
	(mostlyclean): Remove options-save.c.

From-SVN: r174085
parent 9166988f
2011-05-23 Joseph Myers <joseph@codesourcery.com>
* optc-save-gen.awk: New. Based on optc-gen.awk. Don't generate
parts of output shared with the driver.
* optc-gen.awk: Don't generate parts of output not shared with the
driver.
* opth-gen.awk: Remove GCC_DRIVER conditionals.
* doc/options.texi (SourcerInclude): Mention options-save.c.
* Makefile.in (GCC_OBJS): Use options.o instead of gcc-options.o.
(OBJS): Add options-save.o.
(options-save.c, options-save.o): New.
(options.o): Update dependencies.
(gcc-options.o): Remove.
(mostlyclean): Remove options-save.c.
2011-05-23 Jakub Jelinek <jakub@redhat.com>
PR debug/49032
......
......@@ -1168,7 +1168,7 @@ CXX_TARGET_OBJS=@cxx_target_objs@
FORTRAN_TARGET_OBJS=@fortran_target_objs@
# Object files for gcc driver.
GCC_OBJS = gcc.o opts-common.o gcc-options.o vec.o ggc-none.o
GCC_OBJS = gcc.o opts-common.o options.o vec.o ggc-none.o
# Language-specific object files shared by all C-family front ends.
C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
......@@ -1341,6 +1341,7 @@ OBJS = \
omp-low.o \
optabs.o \
options.o \
options-save.o \
opts-common.o \
opts-global.o \
opts.o \
......@@ -2269,6 +2270,12 @@ options.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
-f $(srcdir)/optc-gen.awk \
-v header_name="config.h system.h coretypes.h tm.h" < $< > $@
options-save.c: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
$(srcdir)/optc-save-gen.awk
$(AWK) -f $(srcdir)/opt-functions.awk -f $(srcdir)/opt-read.awk \
-f $(srcdir)/optc-save-gen.awk \
-v header_name="config.h system.h coretypes.h tm.h" < $< > $@
options.h: s-options-h ; @true
s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
$(srcdir)/opth-gen.awk
......@@ -2278,13 +2285,11 @@ s-options-h: optionlist $(srcdir)/opt-functions.awk $(srcdir)/opt-read.awk \
$(SHELL) $(srcdir)/../move-if-change tmp-options.h options.h
$(STAMP) $@
options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) $(FLAGS_H) \
options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(OPTS_H) intl.h $(OPTIONS_C_EXTRA)
gcc-options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(OPTS_H) intl.h \
$(OPTIONS_C_EXTRA)
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(OUTPUT_OPTION) \
-DGCC_DRIVER options.c
options-save.o: options-save.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TARGET_H) $(FLAGS_H) \
$(TM_H) $(OPTS_H) intl.h $(OPTIONS_C_EXTRA)
dumpvers: dumpvers.c
......@@ -4443,7 +4448,7 @@ mostlyclean: lang.mostlyclean
-rm -f build/*
-rm -f mddeps.mk
# Delete other built files.
-rm -f specs.h options.c options.h
-rm -f specs.h options.c options.h options-save.c
# Delete the stamp and temporary files.
-rm -f s-* tmp-* stamp-* stmp-*
-rm -f */stamp-* */tmp-*
......
......@@ -71,7 +71,8 @@ name of the include file.
@item
A variable record to record any additional files that the
@file{options.c} file should include. This is useful to provide
@file{options.c} or @file{options-save.c} file should include. This
is useful to provide
inline functions needed for target variables and/or @code{#ifdef}
sequences to properly set up the initialization. These records have
two fields: the string @samp{SourceInclude} and the name of the
......
......@@ -46,7 +46,7 @@ if (n_extra_h_includes > 0) {
print "#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)"
print "#ifndef GENERATOR_FILE"
print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
print "#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
print "struct GTY(()) gcc_options"
print "#else"
print "struct gcc_options"
......@@ -127,7 +127,7 @@ print ""
# Also, order the structure so that pointer fields occur first, then int
# fields, and then char fields to provide the best packing.
print "#if !defined(GCC_DRIVER) && !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
print "#if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS)"
print ""
print "/* Structure to save/restore optimization and target specific options. */";
print "struct GTY(()) cl_optimization";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment