diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2004-06-05 20:58:06 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2004-06-05 20:58:06 +0000 |
commit | c6e8380069ff630939beec0b5872a37f5b710189 (patch) | |
tree | f9776b653c83d7c1faa17b330fe162333d109cc2 /gcc | |
parent | dbeff3e56d566719bb3f0c1ba29362d61fe3ff85 (diff) | |
download | gcc-c6e8380069ff630939beec0b5872a37f5b710189.zip gcc-c6e8380069ff630939beec0b5872a37f5b710189.tar.gz gcc-c6e8380069ff630939beec0b5872a37f5b710189.tar.bz2 |
Makefile.am: Add makedepend.
libcpp:
* Makefile.am: Add makedepend.
* Makefile.in, aclocal.m4: Regenerate.
* charset.c: Insert a space to avoid a warning.
* directives.c: Include mkdeps.h.
(_cpp_handle_directive): Reenable macro expander if appropriate.
(undefine_macros): Inline body of _cpp_free_definition for speed.
Do not call undef callback or _cpp_warn_if_unused_macro.
(cpp_get_deps): New interface.
* files.c (search_cache): Add pfile argument. Check for file
that would be found by "" or <> search here...
(_cpp_find_file): ...not here. Correct recorded start_dir of
files found by directory-of-current-file search that would be
found by "" or <> search.
* init.c (cpp_add_dependency_target): Delete.
* internal.h (struct lexer_state): Add discarding_output flag.
* lex.c (lex_identifier): Compute hash function while scanning.
* macro.c (cpp_scan_nooutput): Disable macro expansion outside
directives.
* makedepend.c: New file.
* mkdeps.c (struct deps): Add vpath vector.
(apply_vpath, deps_add_vpath): New function.
(deps_free): Free vpath vector.
(deps_add_dep, deps_add_target): Use apply_vpath.
* symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
(ht_lookup_with_hash): New function.
* cpplib.h, mkdeps.h: Update prototypes.
* symtab.h: Update prototypes.
(HT_HASHSTEP, HT_FINISH): New macros.
gcc:
* Makefile.in (MKDEPS_H): New shorthand.
(c-opts.o): Update dependencies.
* c-opts.c: Include mkdeps.h.
(handle_deferred_opts): Use cpp_get_deps and deps_add_target,
not cpp_add_dependency_target.
From-SVN: r82654
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/Makefile.in | 3 | ||||
-rw-r--r-- | gcc/c-opts.c | 12 |
3 files changed, 28 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9fb018e..1ad247d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-06-05 Zack Weinberg <zack@codesourcery.com> + + * Makefile.in (MKDEPS_H): New shorthand. + (c-opts.o): Update dependencies. + * c-opts.c: Include mkdeps.h. + (handle_deferred_opts): Use cpp_get_deps and deps_add_target, + not cpp_add_dependency_target. + 2004-06-05 Steven Bosscher <stevenb@suse.de> * config/v850/v850.c (v850_use_dfa_pipeline_interface): New. @@ -9,7 +17,7 @@ * doc/install.texi: Document GMP as prerequisite. Document --with-gmp and --with-gmp-dir configure options. * fortran/gfortran.texi: Remove section "Compiling and testing", - remove TOC reference to it. + remove TOC reference to it. 2004-06-05 Graham Stott <graham.stott@btinternet.com> @@ -19,15 +27,15 @@ 2004-06-05 Danny Smith <dannysmith@users.sourceforge.net> * toplev.c (init_asm_output): Add explicit 'b' to mode when - opening asm_out_file. + opening asm_out_file. * c-pch.c (c_common_write_pch): Remove unnecessary fflush before reading asm_out_file. Replace fflush after reading asm_out_file with fseek. * hosthooks-def.h (HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY): Define - default and add to HOST_HOOKS_INITIALIZER. + default and add to HOST_HOOKS_INITIALIZER. * hosthooks.h (gt_pch_alloc_granularity): Declare hook function. * ggc-common.c (default_gt_pch_alloc_granularity): New function. - (gt_pch_save): Use host_hooks.gt_pch_alloc_granularity + (gt_pch_save): Use host_hooks.gt_pch_alloc_granularity to set mmi.offset padding. * config.gcc (i[34567]86-*-mingw32*): Set target_gtfiles to $(srcdir)/config/i386/winnt.c. @@ -109,9 +117,9 @@ for TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, with reversed sense. * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): Likewise. * doc/tm.texi (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): Rewrite - documentation to reflect the new macro name and to clarify its + documentation to reflect the new macro name and to clarify its meaning. - + 2004-06-03 Steven Bosscher <stevenb@suse.de> * rtl.def (VAR_LOCATION): Make RTX_EXTRA. @@ -182,7 +190,7 @@ Update callers. Use new worklist. (process_ssa_edge_worklist): New function. - (tree_ssa_ccp): Move worklist processing core to + (tree_ssa_ccp): Move worklist processing core to process_ssa_edge_worklist, and just call that for the two worklists. 2004-06-03 Steven Bosscher <stevenb@suse.de> diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e37c971..2fa566a 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -714,6 +714,7 @@ SYSTEM_H = system.h hwint.h $(srcdir)/../include/libiberty.h PREDICT_H = predict.h predict.def CPPLIB_H = $(srcdir)/../libcpp/include/cpplib.h \ $(srcdir)/../libcpp/include/line-map.h +MKDEPS_H = $(srcdir)/../libcpp/include/mkdeps.h SYMTAB_H = $(srcdir)/../libcpp/include/symtab.h TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) TREE_GIMPLE_H = tree-gimple.h tree-iterator.h @@ -1416,7 +1417,7 @@ c-pretty-print.o : c-pretty-print.c $(C_PRETTY_PRINT_H) \ c-opts.o : c-opts.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ $(TREE_H) c-pragma.h flags.h toplev.h langhooks.h \ tree-inline.h $(DIAGNOSTIC_H) intl.h debug.h $(C_COMMON_H) \ - opts.h options.h $(PARAMS_H) + opts.h options.h $(PARAMS_H) $(MKDEPS_H) $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $< $(OUTPUT_OPTION) @TARGET_SYSTEM_ROOT_DEFINE@ diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 47c7024..b9c462a 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -37,6 +37,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "debug.h" /* For debug_hooks. */ #include "opts.h" #include "options.h" +#include "mkdeps.h" #ifndef DOLLARS_IN_IDENTIFIERS # define DOLLARS_IN_IDENTIFIERS true @@ -1322,13 +1323,22 @@ static void handle_deferred_opts (void) { size_t i; + struct deps *deps; + + /* Avoid allocating the deps buffer if we don't need it. + (This flag may be true without there having been -MT or -MQ + options, but we'll still need the deps buffer.) */ + if (!deps_seen) + return; + + deps = cpp_get_deps (parse_in); for (i = 0; i < deferred_count; i++) { struct deferred_opt *opt = &deferred_opts[i]; if (opt->code == OPT_MT || opt->code == OPT_MQ) - cpp_add_dependency_target (parse_in, opt->arg, opt->code == OPT_MQ); + deps_add_target (deps, opt->arg, opt->code == OPT_MQ); } } |