aboutsummaryrefslogtreecommitdiff
path: root/gcc/mkdeps.c
AgeCommit message (Collapse)AuthorFilesLines
2001-08-03mkdeps.c (deps_add_default_target): Make local variable ``start'' a const ↵Andrew Cagney1-1/+1
char pointer. * mkdeps.c (deps_add_default_target): Make local variable ``start'' a const char pointer. * dwarf2out.c (compute_section_prefix): Localize use of ``p''. From-SVN: r44600
2001-04-19vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to TARGET_OBJECT_SUFFIX and...DJ Delorie1-4/+4
* config/alpha/vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to TARGET_OBJECT_SUFFIX and TARGET_EXECUTABLE_SUFFIX. * config/i386/cygwin.h: Likewise. * config/i386/mingw32.h: Likewise. * config/vax/vms.h: Likewise. * config/i386/djgpp.h: Remove NO_AUTO_EXE_SUFFIX. * config/alpha/xm-vms.h: Change OBJECT_SUFFIX and EXECUTABLE_SUFFIX to HOST_OBJECT_SUFFIX and HOST_EXECUTABLE_SUFFIX. * config/i386/xm-cygwin.h: Likewise. * config/i386/xm-djgpp.h: Likewise. * config/i386/xm-mingw32.h: Likewise. * config/vax/xm-vms.h: Likewise. * mkdeps.c (deps_add_default_target): Use TARGET_OBJECT_SUFFIX instead of OBJECT_SUFFIX. * collect2.c (find_a_file): Look for files matching the extension HOST_EXECUTABLE_SUFFIX instead of EXECUTABLE_SUFFIX. * gcc.c (DEFAULT_SWITCH_CURTAILS_COMPILATION): Depend on TARGET_EXECUTABLE_SUFFIX. (find_a_file): Use HOST_EXECUTABLE_SUFFIX. (make_relative_prefix): Likewise. (convert_filename): Use TARGET_ suffixes throughout. Remove NO_AUTO_EXE_SUFFIX. (process_command): Likewise. (do_spec_1): Likewise. * java/lang.c (init_parse): Likewise. * gcc.texi : Document four new options matching the pattern (HOST|TARGET)_(OBJECT|EXECUTABLE)_SUFFIX. Remove documentation for deleted macros OBJECT_SUFFIX and EXECUTABLE_SUFFIX. Remove documentation for NO_AUTO_EXE_SUFFIX. From-SVN: r41428
2001-03-10cppfiles.c (search_from): Use lbasename.Neil Booth1-1/+1
* cppfiles.c (search_from): Use lbasename. * mkdeps.c (deps_add_default_target): Use lbasename. From-SVN: r40364
2001-02-12mkdeps.c (deps_add_default_target): Robustify.Nathan Sidwell1-11/+10
* mkdeps.c (deps_add_default_target): Robustify. Add basename component only. * cpp.texi (-M): Describe how default target is generated. * invoke.texi (-M): Likewise. From-SVN: r39602
2001-01-06* mkdeps.c (deps_add_dep): Fix vector re-allocation.Neil Booth1-1/+1
From-SVN: r38748
2001-01-06cpp.texi: Update for -MQ.Neil Booth1-42/+19
* cpp.texi: Update for -MQ. * cppinit.c (cpp_create_reader): Always create pfile->deps. (cpp_cleanup): Always free pfile->deps. (initialize_dependency_output): Don't create pfile->deps. (cpp_handle_option): Similarly. (OPT_MQ): New. * gcc.c (cpp_options): Handle -MQ. (DEFAULT_WORD_SWITCH_TAKES_ARG): Add -MQ. * mkdeps.c (base_name): Remove. (deps_init): Don't allocate vector space until it's needed. (deps_free): Only free vectors if allocated. (deps_add_target, deps_add_dep): Update for initial allocation. (deps_add_default_target): Don't strip to the base_name. From-SVN: r38735
2001-01-05cpp.texi: Update for -MP.Neil Booth1-9/+16
* cpp.texi: Update for -MP. Clarify behaviour of -MT. * cppinit.c (initialize_dependency_output): Update. (cpp_finish): Output dummy targets for -MP. (OPT_MP): New. (cpp_handle_option): Handle -MP. Don't quote -MT options. * cpplib.h (struct cpp_options): Add deps_phony_targets. * gcc.c (cpp_options): Update to handle -MP. * mkdeps.c (deps_add_target, deps_add_default_target): Update to quote only the default target. (deps_phony_targets): Insert a preceding newline. Rename from deps_dummy_targets for consistency. * mkdeps.h: Update java: * lang.c (lang_decode_option): Change -MA to -MP. * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target): Update to new prototype; do quote targets. (jcf_dependency_write): Update. From-SVN: r38707
2001-01-04cpp.texi: Update for -MT.Neil Booth1-15/+39
* cpp.texi: Update for -MT. * cppinit.c (initialize_dependency_output): Add a default target if none has been given already. (no_tgt, OPT_MT): New. (cpp_handle_option): Handle -MT. Update -M etc. * cpplib.h (struct cpp_options): Remove deps_target. * gcc.c (cpp_options): Handle -MT. * mkdeps.c (struct deps): Move from mkdeps.h. (deps_calc_target): Rename deps_add_default_target. Add a default target if none has been specified already. * mkdeps.h (struct deps): Move to mkdeps.c. (deps_calc_target): Rename deps_add_default_target. From-SVN: r38681
2000-11-17mcore.c (mcore_expand_prolog): Call xmalloc/xrealloc, not malloc/realloc.Kaveh R. Ghazi1-1/+1
* mcore.c (mcore_expand_prolog): Call xmalloc/xrealloc, not malloc/realloc. * cpplib.c (glue_header_name): Likewise. * fixincl.c (run_compiles, start_fixer): Likewise. * fixlib.c (load_file_data): Likewise. * mkdeps.c (munge): Likewise. f: * malloc.c (malloc_init): Call xmalloc, not malloc. From-SVN: r37511
2000-03-11cppfiles.c (file_cleanup, [...]): Replace bcopy(), index() etc calls.Neil Booth1-2/+3
* cppfiles.c (file_cleanup, _cpp_find_include_file, remap_filename, _cpp_read_include_file, actual_directory, hack_vms_include_specification): Replace bcopy(), index() etc calls. Add casts to some allocations. Make some variables pointers to const [unsigned] char. * cpphash.c (_cpp_install, macro_cleanup, collect_expansion, collect_formal_parameters): Similarly. * cppinit.c (struct pending_option, append_include_chain, cpp_options_init, cpp_reader_init, initialize_standard_includes, cpp_start_read, new_pending_define, handle_option): Similarly. * cpplib.c (cpp_define, copy_comment, do_define, do_include, do_undef, do_error, do_warning, do_pragma, do_pragma_once, do_pragma_implementation, detect_if_not_defined, do_ifdef, skip_if_group, cpp_get_token, parse_string, do_assert, do_unassert): Similarly. * cpplib.h (cpp_buffer, cpp_options): Update types. Update function prototypes. * mkdeps.c (deps_add_target, deps_add_dep): cast allocations. From-SVN: r32477
2000-03-07[multiple changes]Zack Weinberg1-5/+5
2000-03-07 Neil Booth <NeilB@earthling.net> * cppexp.c (struct operation, left_shift, right_shift, cpp_parse_expr): Change some "char"s to "U_CHAR"s, and some "int"s to "unsigned int"s. * cpplib.c (detect_if_not_defined, do_assert, do_unassert): Similarly. * cpplib.h: Update for above. * mkdeps.c (deps_init, deps_calc_target): Cast pointers returned from allocations. * cppinit.c (opt_comp, parse_options): New functions. (handle_option): Use parse_option to parse a single command line option, that possibly takes an argument. (cpp_handle_options): Sort the array of command line options on first invocation (non-ASCII hosts only). (print_help): Update. 2000-03-07 Zack Weinberg <zack@wolery.cumb.org> * mkdeps.c (munge): Fix off-by-one bug and inconsistencies in backslash counting loops. Problem noted by Matt Kraai <kraai@ghs.com>. From-SVN: r32394
2000-03-07tree.h (INT_CST_LT, [...]): Remove unneeded casts.Richard Kenner1-1/+6
* tree.h (INT_CST_LT, INT_CST_LT_UNSIGNED): Remove unneeded casts. (struct tree_int_cst): int_cst_low is now unsigned HOST_WIDE_INT. (attribute_hash_list, type_hash_canon): hashcode is now unsigned. (type_hash_lookup, type_hash_add, type_hash_list): Likewise. (min_precision): Result is unsignd. (add_double, neg_double, mul_double): Low word is unsigned. (lshift_double, rshift_double, lrotate_double): Likewise. (rrotate_double, div_and_round_double): Likewise. (tree_floor_log2, compare_tree_int): New functions. (preserve_rtl_expr_temps): New declaration. * c-common.c (declare_hidden_char_array): Use compare_tree_int. (decl_attributes): Use tree_log2 to find alignment. Check for TREE_INT_CST_HIGH for format args. (min_precision): Now unsigned. Use tree_floor_log2. (truthvalue_conversion): Delete long-disabled code. * c-decl.c (finish_struct): Clean up tests on field width. (finish_function): Use compare_tree_int. * c-pragma.c (handle_pragma_token): Use tree_log2 for alignment. * c-typeck.c (comptypes): Use tree_int_cst_equal. (default_conversion, digest_init): Use compare_tree_int. (build_binary_op): Use integer_all_onesp and compare_tree_int. Fix type errors in forming masks. * calls.c (initialize_argument_information): Use compare_tree_int. * dbxout.c (dbxout_type): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * except.c (expand_eh_region_start_tree): Use compare_tree_int. * expr.c (is_zeros_p, case INTEGER_CST): Use integer_zerop. (store_field): Use compare_tree_int. (expand_expr, case CONSTRUCTOR): Use TYPE_SIZE_UNIT. (expand_expr, case ARRAY_REF): Use compare_tree_int. (do_jump, case BIT_AND_EXPR): Use tree_floor_log2. (do_store_flag): Use compare_tree_int. * fold-const.c (encode, decode): Low part is always unsigned. (force_fit_type, add_double, neg_double, mul_double): Likewise. (lshift_double, rshift_double, lrotate_double): Likewise. (rrotate_double, div_and_round_double, int_const_binop): Likewise. (fold_convert): Use compare_tree_int. (operand_equal_p, case INTEGER_CST): Use tree_int_cst_equal. (invert_truthvalue, case INTEGER_CST): Likewise. (fold): Use compare_tree_int; add casts for unsigned TREE_INT_CST_LOW. * mkdeps.c (deps_dummy_targets): Make I unsigned. * rtl.h (add_double, neg_double, mul_double): Low words are unsigned. (lshift_double, rshift_double, lrotate_double, rrotate_double): Likewise. * stmt.c (expand_decl): Use compare_tree_int and mode_for_size_tree. (expand_end_case): Use compare_tree_int. (estimate_case_costs): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * stor-layout.c (mode_for_size_tree): Use compare_tree_int. (layout_decl): Likewise. (layout_record, layout_union): Make sizes unsigned. (layout_type, case VOID_TYPE): TYPE_SIZE must be bitsizetype. (layout_type, case QUAL_UNION_TYPE): Use compare_tree_int. * tree.c (struct type_hash): hashcode is unsigned. (build_type_attribute_variant, type_hash_list): Likewise. (type_hash_lookup, type_hash_add, type_hash_canon): Likewise. (attribute_hash_list, build_array_type, build_method_type): Likewise. (build_complex_type): Likewise. (real_value_from_int_cst): Remove unneeded casts. (integer_all_onesp): Add casts. (tree_floor_log2, compare_tree_int): New functions. (build_index_type): Use tree_int_cst_sgn. * varasm.c (assemble_variable): Use compare_tree_int. * ch/actions.c (chill_convert_for_assignment): INDEX is unsigned HOST_WIDE_INT. * ch/ch-tree.h (DECL_NESTING_LEVEL): Use TREE_INT_CST_HIGH since unsigned. * ch/except.c (chill_handle_on_labels): ALTERNATIVE is unsigned. Use compare_tree_int. (expand_goto_except_cleanup): Likewise. * cp/class.c (dfs_modify_vtables): I is now unsigned. (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int. (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT. * cp/error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned. * cp/init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. * cp/method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned. * cp/typeck.c (build_binary_op, case TRUNC_DIV_EXPR): Call integer_all_onesp. * cp/typeck2.c (process_init_constructor): Use compare_tree_int. * f/com.c (ffecom_f2c_set_lio_code_): Use compare_tree_int. (ffecom_sym_transform_, ffecom_transform_common_): Likewise. (ffecom_transform_equiv_): Likewise. * java/decl.c (emit_init_test_initialization): Mark KEY as unused. * java/expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT. (build_anewarray): Likewise. * java/parse.y (patch_newarray): Likewise. * java/parse.c: Regenerated. From-SVN: r32383
2000-03-06builtins.c (built_in_class_names, [...]): Constify a char*.Kaveh R. Ghazi1-1/+1
* builtins.c (built_in_class_names, built_in_names): Constify a char*. * gmon-sol2.c (monstartup, moncontrol): Cast ptrs to long, not int. (_mcleanup): Ensure value matches format specifier in sprintf. * cpphash.c (special_symbol): Don't needlessly cast away const-ness. * cppinit.c (base_name): Delete unused prototype. * mkdeps.c (deps_init): Make definition K&R safe. * tree.h (built_in_class_names, built_in_names): Constify a char*. f: * ansify.c (die_unless): Don't use ANSI string concatenation. (die): Mark with ATTRIBUTE_NORETURN. From-SVN: r32364
2000-03-05* mkdeps.c (deps_calc_target): Remove incorrect 'const'.Jason Merrill1-1/+1
From-SVN: r32346
2000-03-04mkdeps.c, mkdeps.h: New files.Zack Weinberg1-0/+278
* mkdeps.c, mkdeps.h: New files. * po/POTFILES.in: Add them. * Makefile.in (LIBCPP_OBJS): Add mkdeps.o. (cpplib.o, cppinit.o): Depend on mkdeps.h. (mkdeps.o): New target. * cppfiles.c: Delete deps_output. * cppinit.c: Include mkdeps.h. Delete known_suffixes, OBJECT_SUFFIX, and base_name. (cpp_cleanup): Use deps_free. Free ihash->name when clearing the include hash. (initialize_dependency_output): Use deps_init, deps_add_target, deps_calc_target, and deps_add_dep. Remove all the unnecessary string bashing. (cpp_finish): Use deps_write. Remove an unnecessary nesting level. * cpplib.c (do_include): Use deps_add_dep. * cpplib.h (struct cpp_reader): Replace deps_buffer, deps_allocated_size, deps_size, deps_column members with single pointer to a struct deps. Delete prototype of deps_output. From-SVN: r32329