1. 30 Nov, 2010 1 commit
  2. 29 Nov, 2010 1 commit
    • system.h: Include "safe-ctype.h" instead of <safe-ctype.h>. · 71f3e391
      	* system.h: Include "safe-ctype.h" instead of <safe-ctype.h>.
      	Include <signal.h>, <sys/mman.h>, <sys/resource.h> and
      	<sys/times.h>.
      	(O_BINARY, SIGCHLD, MAP_FAILED, MAP_ANONYMOUS, kill):
      	Conditionally define.
      	(GET_ENVIRONMENT): Poison.
      	* configure.ac: Don't test for mincore.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* collect2-aix.c: Don't include <sys/mman.h>.
      	* collect2.c: Don't include <signal.h>.
      	(SIGCHLD): Don't define.
      	(prefix_from_env): Use getenv instead of GET_ENVIRONMENT.
      	* config/alpha/alpha.c: Include "splay-tree.h" instead of
      	<splay-tree.h>.
      	* config/arm/arm.c (arm_target_help): Use getenv instead of
      	GET_ENVIRONMENT.
      	* config/avr/driver-avr.c: Don't include <stdlib.h>.
      	* config/frv/frv.c: Don't include <ctype.h>.
      	* config/host-darwin.c: Don't include <sys/mman.h>.
      	* config/host-hpux.c: Don't include <sys/mman.h> or <unistd.h>.
      	(MAP_FAILED): Don't define.
      	* config/host-linux.c: Don't include <sys/mman.h> or <limits.h>.
      	* config/host-solaris.c: Don't include <sys/mman.h>.
      	* config/i386/cygming.h: Don't include <stdio.h>.
      	* config/i386/driver-i386.c: Don't include <stdlib.h>.
      	* config/i386/host-cygwin.c: Don't include <sys/mman.h>.
      	* config/iq2000/iq2000.c: Don't include <signal.h>.
      	* config/m32c/m32c-pragma.c: Don't include <stdio.h>.
      	* config/m68hc11/m68hc11.c: Don't include <stdio.h>.
      	* config/mep/mep-pragma.c: Don't include <stdio.h>.
      	* config/microblaze/microblaze.c: Don't include <signal.h>.
      	* config/mips/mips.c: Don't include <signal.h>.
      	* config/rs6000/host-darwin.c: Don't include <signal.h>.
      	* cppdefault.c (cpp_relocated): Use getenv instead of
      	GET_ENVIRONMENT.
      	* defaults.h (GET_ENVIRONMENT): Don't define.
      	* et-forest.h: Don't include <ansidecl.h> or <stddef.h>.
      	* gcc.c: Don't include <signal.h>, <sys/mman.h> or <sys/types.h>.
      	(SIGCHLD, MAP_FAILED, kill): Don't define.
      	(process_command): Use getenv instead of GET_ENVIRONMENT.
      	* genhooks.c: Don't include <string.h>.
      	* ggc-common.c: Don't include <sys/resource.h>, <sys/mman.h> or
      	<sys/types.h>.
      	(MAP_FAILED): Don't define.
      	* ggc-page.c Don't include <sys/mman.h>.
      	(MAP_ANONYMOUS, MAP_FAILED): Don't define.
      	* ggc-zone.c: Don't include <sys/mman.h>.
      	(MAP_ANONYMOUS, MAP_FAILED): Don't define.
      	* graph.c: Include "config.h" instead of <config.h>.
      	* incpath.c (add_env_var_paths): Use getenv instead of
      	GET_ENVIRONMENT.
      	* lto-wrapper.c: Don't include <errno.h>, <signal.h> or
      	"libiberty.h".
      	(SIGCHLD, kill): Don't define.
      	* mips-tfile.c: Don't include <signal.h>.
      	* opts.c: Don't include <signal.h> or <sys/resource.h>.
      	(print_specific_help): Use getenv instead of GET_ENVIRONMENT.
      	* passes.c: Don't include <signal.h>, <sys/resource.h> or
      	<sys/times.h>.
      	* sparseset.h: Don't include <assert.h>.
      	* timevar.c: Don't include <sys/times.h> or <sys/resource.h>.
      	* tlink.c: Don't include "libiberty.h".
      	* toplev.c: Don't include <signal.h> or <sys/times.h>.
      	* tree-mudflap.c: Include "demangle.h" instead of <demangle.h>.
      	* tree-switch-conversion.c: Don't include <signal.h>.
      	* vmsdbgout.c: Don't include <errno.h> or <string.h>.
      
      c-family:
      	* c-opts.c (check_deps_environment_vars): Use getenv instead of
      	GET_ENVIRONMENT.
      	* c-pch.c (O_BINARY): Don't define here.
      	* c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
      
      fortran:
      	* gfortran.h (alloca): Don't include definitions.
      	(NULL): Don't define.
      
      java:
      	* boehm.c: Include "config.h" instead of <config.h>.
      	* builtins.c: Don't include <stdarg.h>.
      	* class.c: Don't include "stdio.h".
      	(O_BINARY): Don't define here.
      	* jcf-depend.c: Don't include <assert.h>.
      	(jcf_dependency_set_dep_file, jcf_dependency_init,
      	jcf_dependency_write): Use gcc_assert.
      	* jcf-io.c (O_BINARY): Don't define here.
      	* jcf-path.c: Don't include "tm.h".
      	(jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
      	* resource.c: Don't include "stdio.h".
      	(O_BINARY): Don't define here.
      	* verify-impl.c: Don't include <stdio.h>.
      
      lto:
      	* lto-endian.h: Delete.
      	* lto-object.c: Don't include "libiberty.h".
      	(O_BINARY): Don't define.
      	* lto.c: Don't include "libiberty.h" or <sys/mman.h>.
      	(O_BINARY): Don't define.
      
      From-SVN: r167241
      Joseph Myers committed
  3. 23 Nov, 2010 1 commit
    • re PR driver/42690 (Undefined reference errors with -flto -fuse-linker-plugin) · 9a37bc07
      	PR driver/42690
      	* gcc.c (LINK_COMMAND_SPEC): Remove hard-coded pass-through plugin
      	options, replace by call of pass-through-libs spec function to process
      	link_gcc_c_sequence spec.
      	(lto_libgcc_spec): Delete variable.
      	(static_specs[]): Remove related entry.
      	(static_spec_functions[]): Add new entry for pass-through-libs.
      	(main): Don't generate deleted lto_libgcc_spec.
      	(pass_through_libs_spec_func): New function to implement the new
      	pass-through-libs spec function.
      	* doc/invoke.texi (pass-through-libs): Document new spec function.
      
      From-SVN: r167091
      Dave Korn committed
  4. 22 Nov, 2010 1 commit
  5. 16 Nov, 2010 2 commits
    • gcc.c (char_p): Define. · 69d540bd
      	* gcc.c (char_p): Define.  Define a VEC of it.
      	(n_linker_options, n_assembler_options, n_preprocessor_options):
      	Delete.
      	(linker_options, assembler_options, preprocessor_options): Convert
      	to a VEC.
      	(add_preprocessor_option): Adjust.
      	(add_assembler_option): Adjust.
      	(add_linker_option): Adjust.
      	(do_specs_vec): New function.
      	(do_spec_1): Call it.  Adjust for new types.
      
      From-SVN: r166801
      Nathan Froyd committed
    • gcc.c: Include "vec.h". · 5b634ee0
      	* gcc.c: Include "vec.h".
      	(argbuf): Make into a VEC.
      	(argbuf_length, argbuf_index): Remove.
      	(alloc_args, clear_args, store_arg, execute, insert_wrapper,
      	do_spec, do_self_spec, do_spec_1, eval_spec_function, main,
      	compare_debug_dump_opt_spec_function: Use VEC interfaces on
      	argbuf.
      	* Makefile.in (GCC_OBJS): Add vec.o and ggc-none.o.
      	(gcc.o): Depend on $(VEC_H).
      
      From-SVN: r166788
      Joseph Myers committed
  6. 12 Nov, 2010 1 commit
    • Makefile.in (OPTS_H): Define. · a4d8c676
      	* Makefile.in (OPTS_H): Define.
      	(c-decl.o, c-family/c-common.o, c-family/c-opts.o,
      	c-family/c-pch.o, c-family/c-pragma.o, gcc.o, gccspec.o,
      	cppspec.o, options.o, gcc-options.o, lto-opts.o, opts.o,
      	opts-common.o, toplev.o, passes.o, matrix-reorg.o,
      	ipa-struct-reorg.o, PLUGIN_HEADERS): Use $(OPTS_H).
      	* gcc.c (driver_handle_option): Take location_t parameter.
      	(process_command, do_self_spec): Update calls to
      	read_cmdline_option.
      	* langhooks-def.h (lhd_handle_option): Take location_t parameter.
      	* langhooks.c (lhd_handle_option): Take location_t parameter.
      	* langhooks.h (handle_option): Take location_t parameter.
      	* lto-opts.c (lto_reissue_options): Update call to set_option.
      	* opts-common.c (handle_option): Make static.  Take location_t
      	parameter and pass it to other functions.
      	(handle_generated_option): Take location_t parameter and pass it
      	to other functions.
      	(read_cmdline_option): Take location_t parameter and pass it to
      	other functions.  Use warning_at and error_at.
      	(set_option): Take location_t parameter and pass it to other
      	functions.
      	* opts.c (common_handle_option): Take location_t parameter and
      	pass it to other functions.
      	(enable_warning_as_error): Make static.  Take location_t parameter
      	and pass it to other functions.
      	(lang_handle_option): Take location_t parameter and pass it to
      	other functions.
      	(target_handle_option): Take location_t parameter.
      	(read_cmdline_options, maybe_default_option,
      	maybe_default_options, default_options_optimization,
      	decode_options): Take location_t parameter and pass it to other
      	functions.
      	* opts.h: Include input.h.
      	(struct cl_option_handler_func, decode_options, set_option,
      	handle_generated_option, read_cmdline_option): Take location_t
      	parameters.
      	(handle_option, enable_warning_as_error): Remove.
      	* toplev.c (toplev_main): Update call to decode_options.
      
      ada:
      	* gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTS_H).
      	* gcc-interface/misc.c (gnat_handle_option): Take location_t
      	parameter.
      
      c-family:
      	* c-common.c (parse_optimize_options): Update call to
      	decode_options.
      	* c-common.h (c_common_handle_option): Update prototype.
      	* c-opts.c (c_common_handle_option): Take location_t parameter and
      	pass it to other functions.
      
      cp:
      	* Make-lang.in (g++spec.o): Use $(OPTS_H).
      
      fortran:
      	* Make-lang.in (gfortranspec.o): Use $(OPTS_H).
      	* gfortran.h (gfc_handle_option): Take location_t parameter.
      	* options.c (gfc_handle_option): Take location_t parameter.
      
      java:
      	* Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
      	* lang.c (java_handle_option): Take location_t parameter.
      
      lto:
      	* Make-lang.in (lto/lto.o): Use $(OPTS_H).
      	* lto-lang.c (lto_handle_option): Take location_t parameter.
      
      From-SVN: r166688
      Joseph Myers committed
  7. 11 Nov, 2010 1 commit
    • invoke.texi (-fwhopr): Merge into -flto section. · 014d92e1
      	* doc/invoke.texi (-fwhopr): Merge into -flto section.
      	(-flto-partition): Document none.
      	* gcc.c (LINK_COMMAND_SPEC): Remove -fwhopr.
      	* lto-wrapper.c: Update comment.
      	(run_gcc): Update LTO option parsing.
      	* opts.c (finish_options): add support -flto-partition=none
      	(common_handle_option): Remove fwhopr.
      	* common.opt: Turn fwhopr into flto.
      	* collect2.c (main): Update option handling.
      	* cgraphunit.c (cgraph_decide_is_function_needed): Remove flag_whopr.
      	* ipa-split.c (execute_split_functions): Remove flag_whopr.
      	* ipa.c (function_and_variable_visibility): Remove flag_whopr.
      	* ipa-prop.c (ipa_compute_jump_functions): Remove flag_whopr.
      	* varpool.c (decide_is_variable_needed): Remove flag_whopr.
      	
      	* gcc.dg/20081223-1.c: Update LTO options.
      	* gcc.dg/lto/20090206-1_0.c: Update LTO options.
      	* gcc.dg/lto/20081118_0.c: Update LTO options.
      	* gcc.dg/lto/ipareference_0.c: Update LTO options.
      	* gcc.dg/lto/20100423-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081201-1_0.c: Update LTO options.
      	* gcc.dg/lto/ipacp_0.c: Update LTO options.
      	* gcc.dg/lto/20090116_0.c: Update LTO options.
      	* gcc.dg/lto/20091015-1_0.c: Update LTO options.
      	* gcc.dg/lto/20090126-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081202-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081204-1_0.c: Update LTO options.
      	* gcc.dg/lto/const-uniq_0.c: Update LTO options.
      	* gcc.dg/lto/20081224_0.c: Update LTO options.
      	* gcc.dg/lto/20090219_0.c: Update LTO options.
      	* gcc.dg/lto/ipareference2_0.c: Update LTO options.
      	* gcc.dg/lto/20090206-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081115_0.c: Update LTO options.
      	* gcc.dg/lto/20081201-2_0.c: Update LTO options.
      	* gcc.dg/lto/20081120-2_0.c: Update LTO options.
      	* gcc.dg/lto/materialize-1_0.c: Update LTO options.
      	* gcc.dg/lto/20090126-1_0.c: Update LTO options.
      	* gcc.dg/lto/20081202-1_0.c: Update LTO options.
      	* gcc.dg/lto/noreturn-1_0.c: Update LTO options.
      	* g++.dg/20090107-1.C: Update LTO options.
      	* g++.dg/lto/pr45679-2_0.C: Update LTO options.
      	* g++.dg/lto/20081123_0.C: Update LTO options.
      	* g++.dg/lto/20090313_0.C: Update LTO options.
      	* g++.dg/lto/20081125_0.C: Update LTO options.
      	* g++.dg/lto/20081109-1_0.C: Update LTO options.
      	* g++.dg/lto/20081219_0.C: Update LTO options.
      	* g++.dg/lto/20100724-1_0.C: Update LTO options.
      	* g++.dg/lto/20081204-1_0.C: Update LTO options.
      	* g++.dg/lto/20090303_0.C: Update LTO options.
      	* g++.dg/lto/20100723-1_0.C: Update LTO options.
      	* g++.dg/lto/pr45679-1_0.C: Update LTO options.
      	* g++.dg/lto/20090128_0.C: Update LTO options.
      	* g++.dg/lto/20081204-2_0.C: Update LTO options.
      	* g++.dg/lto/20090302_0.C: Update LTO options.
      	* g++.dg/lto/20081119-1_0.C: Update LTO options.
      	* g++.dg/lto/20081118_0.C: Update LTO options.
      	* g++.dg/20090121-1.C: Update LTO options.
      	* objc.dg/lto/lto.exp: Update LTO options.
      	* lib/lto.exp: Update LTO options.
      	* lib/gcc-dg.exp: Update LTO options.
      	* lib/c-torture.exp: Update LTO options.
      	* obj-c++.dg/lto/lto.exp: Update LTO options.
      
      From-SVN: r166625
      Jan Hubicka committed
  8. 10 Nov, 2010 1 commit
    • common.opt (flag_excess_precision_cmdline, [...]): New Variable declarations. · d5478783
      	* common.opt (flag_excess_precision_cmdline, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_shlib,
      	default_visibility, flag_tls_default): New Variable declarations.
      	(aux-info, auxbase, dumpbase, dumpdir, falign-functions=,
      	falign-jumps=, falign-labels=, falign-loops=, o, v): Use Var.
      	(v): Declare as Common and document here.
      	* flags.h (default_visibility, flag_generate_lto,
      	warn_larger_than, larger_than_size, warn_frame_larger_than,
      	frame_larger_than_size, flag_gen_aux_info, flag_pedantic_errors,
      	flag_shlib, flag_excess_precision_cmdline): Remove.
      	(set_Wstrict_aliasing): Update prototype.
      	* gcc.c (verbose_flag): Remove.
      	(driver_handle_option): Add diagnostic_context parameter.  Don't
      	handle OPT_v explicitly here.  Set verbose_flag to 1 rather than
      	incrementing it.
      	* opts-common.c (handle_option): Pass dc to handler.
      	* opts.c (warn_larger_than, larger_than_size,
      	warn_frame_larger_than, frame_larger_than_size,
      	default_visibility): Remove.
      	(common_handle_option): Add diagnostic_context parameter.
      	(set_fast_math_flags, set_unsafe_math_optimizations_flags): Add
      	gcc_options parameters.
      	(lang_handle_option, target_handle_option, read_cmdline_options,
      	decode_options): Add diagnostic_context parameters.
      	(finish_options): Access option state through opts pointer where
      	possible.
      	(common_handle_option): Access option state through opts pointer
      	where possible.  Do not set local static variable verbose.  Do not
      	explicitly handle OPT_v, OPT_Wstrict_aliasing_,
      	OPT_Wstrict_overflow_, OPT_Wunused, OPT_auxbase, OPT_dumpbase,
      	OPT_dumpdir, OPT_falign_functions_, OPT_falign_jumps_,
      	OPT_falign_labels_, OPT_falign_loops_, OPT_fira_verbose_, OPT_o or
      	OPT_fwhopr_.  Do not explicitly set .opt file variables for
      	OPT_aux_info or OPT_pedantic_errors.  Use dc for diagnostic
      	context.
      	(set_Wstrict_aliasing): Add gcc_options parameter.
      	* opts.h (struct cl_option_handler_func): Add diagnostic_context
      	parameter to handler.
      	(decode_options): Add diagnostic_context parameter.
      	* toplev.c (dump_base_name, dump_dir_name, aux_base_name,
      	asm_file_name, flag_generate_lto, flag_gen_aux_info,
      	aux_info_file_name, flag_shlib, flag_tls_default,
      	flag_excess_precision_cmdline, flag_pedantic_errors): Remove.
      	(toplev_main): Pass global_dc to decode_options.
      	* toplev.h (dump_base_name, dump_dir_name, aux_base_name,
      	aux_info_file_name, asm_file_name): Remove.
      	* tree.h (flag_tls_default): Remove.
      
      c-family:
      	* c-common.c (parse_optimize_options): Pass global_dc to
      	decode_options.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	set_Wstrict_aliasing.
      	* c.opt (v): Don't mark Common or document here.
      
      fortran:
      	* cpp.c (asm_file_name): Don't declare here.
      
      objc:
      	* objc-act.c (dump_base_name): Don't declare here.
      
      From-SVN: r166565
      Joseph Myers committed
  9. 01 Nov, 2010 1 commit
    • common.opt (R, [...]): New. · 6d721f67
      	* common.opt (R, T, Tbss, Tdata, Ttext, h, z): New.
      	* defaults.h (DEFAULT_SWITCH_TAKES_ARG, SWITCH_TAKES_ARG): Remove.
      	(DEFAULT_WORD_SWITCH_TAKES_ARG): Define to 0.
      	* doc/tm.texi.in (SWITCH_TAKES_ARG): Remove.
      	(WORD_SWITCH_TAKES_ARG): Don't refer to SWITCH_TAKES_ARG.
      	Document that options in .opt files do not need to be included.
      	* doc/tm.texi: Regenerate.
      	* gcc.c (LINK_COMMAND_SPEC): Don't include %{x}.
      	* opts-common.c: Update comment on tm.h include.
      	(decode_cmdline_option): Don't use SWITCH_TAKES_ARG.
      	* system.h (SWITCH_TAKES_ARG): Poison.
      	* config/alpha/alpha.h (SWITCH_TAKES_ARG): Remove.
      	* config/darwin.h (WORD_SWITCH_TAKES_ARG): Remove options included
      	in darwin.opt.
      	(LINK_COMMAND_SPEC_A): Don't include %{x}.
      	* config/fr30/fr30.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
      	Remove.
      	* config/freebsd-spec.h (FBSD_SWITCH_TAKES_ARG): Remove.
      	* config/freebsd.h (SWITCH_TAKES_ARG): Remove.
      	* config/frv/frv.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
      	Remove.
      	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Don't include %{x}.
      	* config/ia64/ia64.h (SWITCH_TAKES_ARG): Remove.
      	* config/interix.h (WORD_SWITCH_TAKES_ARG): Don't handle -T
      	options.
      	* config/lm32/lm32.h (SWITCH_TAKES_ARG): Remove.
      	* config/m32r/m32r.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
      	Remove.
      	* config/microblaze/microblaze.h (SWITCH_TAKES_ARG): Remove.
      	* config/mips/mips.h (SWITCH_TAKES_ARG): Remove.
      	* config/mips/netbsd.h (SWITCH_TAKES_ARG): Remove.
      	* config/mips/vxworks.h (SWITCH_TAKES_ARG): Remove.
      	* config/netbsd-aout.h (SWITCH_TAKES_ARG): Remove.
      	* config/netbsd-elf.h (SWITCH_TAKES_ARG): Remove.
      	* config/openbsd.h (SWITCH_TAKES_ARG): Remove.
      	* config/rs6000/sysv4.h (SWITCH_TAKES_ARG): Remove.
      	* config/score/score.h (SWITCH_TAKES_ARG): Remove.
      	* config/sol2.h (SWITCH_TAKES_ARG): Remove.
      	* config/sparc/sp-elf.h (SWITCH_TAKES_ARG): Remove.
      	* config/sparc/sp64-elf.h (SWITCH_TAKES_ARG): Remove.
      	* config/sparc/sparc.h (ASM_SPEC): Don't include %{R}.
      	* config/svr4.h (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
      
      From-SVN: r166155
      Joseph Myers committed
  10. 23 Oct, 2010 1 commit
    • gcc.c (n_switches_alloc_debug_check): New. · efe5e5a0
      	* gcc.c (n_switches_alloc_debug_check): New.
      	(set_option_handlers): New.
      	(process_command): Use set_option_handlers.
      	(do_self_spec): Pass spec-generated options through option
      	handlers.
      	(main): Also save and restore n_switches_alloc when swapping
      	switch arrays.
      
      From-SVN: r165891
      Joseph Myers committed
  11. 22 Oct, 2010 1 commit
  12. 08 Oct, 2010 1 commit
    • Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h. · a75bfaa6
      	* Makefile.in (TM_H): Include $(FLAGS_H) instead of options.h.
      	(TREE_H): Include $(FLAGS_H) instead of options.h.
      	(opts-common.o): Depend on $(FLAGS_H) instead of options.h.
      	* c-objc-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* common.opt (flag_complex_method, flag_evaluation_order,
      	flag_ira_algorithm, flag_ira_region, flag_warn_unused_result): New
      	Variable declarations.
      	* configure.ac (tm_include_list): Include flags.h instead of
      	options.h.
      	* configure: Regenerate.
      	* flags.h: Condition out contents for target libraries.  Include
      	options.h at end of file.
      	(flag_complex_method, flag_ira_algorithm, flag_ira_region,
      	flag_evaluation_order, flag_warn_unused_result): Remove.
      	* gcc.c (main): Intialize global_options with global_options_init.
      	* langhooks-def.h (lhd_init_options_struct): Declare.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	(LANG_HOOKS_INITIALIZER): Include LANG_HOOKS_INIT_OPTIONS_STRUCT.
      	* langhooks.c (lhd_init_options_struct): New.
      	* langhooks.h (struct lang_hooks): Add init_options_struct.
      	Update comment on init_options.
      	* optc-gen.awk: Generate initializer for global_options_init, not
      	global_options.
      	* opth-gen.awk: Condition out structure declarations for target
      	libraries.  Declare global_options_init.
      	* opts-common.c: Include flags.h instead of options.h.
      	* opts.c (flag_warn_unused_result): Remove.
      	(read_cmdline_options): Take gcc_options parameters.  Pass them to
      	read_cmdline_option.
      	(initial_lang_mask, initial_min_crossjump_insns,
      	initial_max_fields_for_field_sensitive,
      	initial_loop_invariant_max_bbs_in_loop): Define at file scope.
      	(init_options_once): New.  Split out of decode_options.
      	(init_options_struct): New.  Split out of decode_options.
      	(decode_cmdline_options_to_array_default_mask): New.
      	(default_options_optimization): New.  Split out of decode_options.
      	(decode_options): Move most code to other functions.  Update call
      	to read_cmdline_options.
      	(finish_options): New.  Split out of decode_options.
      	* opts.h (decode_options): Add gcc_options parameters.
      	(init_options_once, init_options_struct,
      	decode_cmdline_options_to_array_default_mask): New.
      	* toplev.c (flag_complex_method, flag_ira_algorithm,
      	flag_ira_region, flag_evaluation_order): Remove.
      	(general_init): Use global_options_init for initial flag values
      	for global_dc.
      	(toplev_main): Call init_options_once, init_options_struct,
      	lang_hooks.init_options_struct,
      	decode_cmdline_options_to_array_default_mask and
      	lang_hooks.init_option before decode_options.  Update arguments to
      	decode_options.
      	* tree.h: Include flags.h instead of options.h.
      
      ada:
      	* gcc-interface/misc.c (gnat_init_options_struct): New.  Split out
      	from gnat_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      c-family:
      	* c-common.c (parse_optimize_options): Call
      	decode_cmdline_options_to_array_default_mask before
      	decode_options.  Update arguments to decode_options.
      	* c-common.h (c_common_init_options_struct): Declare.
      	* c-opts.c (c_common_init_options_struct): New.  Split out from
      	c_common_init_options.
      
      cp:
      	* cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      fortran:
      	* f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      	* gfortran.h (gfc_init_options_struct): Declare.
      	* options.c (gfc_init_options_struct): New.  Split out from
      	gfc_init_options.
      
      java:
      	* lang.c (java_init_options_struct): New.  Split out from
      	java_init_options.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      lto:
      	* lto-lang.c (lto_init_options): Change to
      	lto_init_options_struct.  Update parameters.
      	(LANG_HOOKS_INIT_OPTIONS): Don't define.
      	(LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
      
      From-SVN: r165189
      Joseph Myers committed
  13. 07 Oct, 2010 1 commit
    • configure.ac (build_lto_plugin): New shell variable. · 1cd0b716
      ChangeLog:
      
      2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
      
      	* configure.ac (build_lto_plugin): New shell variable.
      	(--enable-lto): Turn on by default for all non-ELF platforms that
      	have had LTO support added so far.  Set build_lto_plugin appropriately
      	for both ELF and non-ELF.
      	(configdirs): Add lto-plugin or not based on build_lto_plugin.
      	* configure: Regenerate.
      
      gcc/ChangeLog:
      
      2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
      
      	* config.host (host_lto_plugin_soname): New shell variable.
      	* configure.ac (LTOPLUGINSONAME): Add an AC_DEFINE for the above.
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* gcc.c (main): Use LTOPLUGINSONAME instead of hard-coding name of
      	LTO plugin shared library.
      
      lto-plugin/ChangeLog:
      
      2010-10-07  Dave Korn  <dave.korn.cygwin@gmail.com>
      
      	* configure.ac: Source config.gcc to determine lto_binary_reader.
      	(LTO_FORMAT): New AC_SUBST variable inferred from lto_binary_reader.
      	* Makefile.am (LTO_FORMAT): Import.
      	(liblto_plugin_la_SOURCES): Add object format dependent module
      	defined by LTO_FORMAT.
      	(liblto_plugin_la_LIBADD): Allow for both PIC and non-PIC libiberty,
      	and work around libtool warning.
      	* configure: Regenerate.
      	* Makefile.in: Likewise.
      	* lto-plugin.c (struct sym_aux): Move to new lto-plugin.h.
      	(struct sym_aux): Likewise.
      	(struct plugin_symtab): Likewise.
      	(struct plugin_file_info): Likewise.
      	(LTO_SECTION_PREFIX): Likewise.
      	(add_symbols):  Make non-static.
      	(claimed_files): Likewise.
      	(num_claimed_files): Likewise.
      	(check): Likewise.
      	(parse_table_entry): Likewise.
      	(translate): Likewise.
      	(resolve_conflicts): Likewise.
      	(process_symtab): Move to new lto-plugin-elf.c object format dependent
      	source file.
      	(claim_file_handler): Likewise, and make non-static.
      	(onload): Call new onload_format_checks function.
      	* lto-plugin.h: New file.
      	(LTO_SECTION_PREFIX): Move here.
      	(struct sym_aux): Likewise.
      	(struct plugin_symtab): Likewise.
      	(struct plugin_file_info): Likewise.
      	(claim_file_handler): Add new function prototype.
      	(onload_format_checks): Likewise.
      	(check): Declare extern.
      	(translate): Likewise.
      	(parse_table_entry): Likewise.
      	(resolve_conflicts): Likewise.
      	(add_symbols):  Likewise.
      	(claimed_files): Likewise.
      	(num_claimed_files): Likewise.
      	* lto-plugin-elf.c (process_symtab): Move here.
      	(claim_file_handler): Likewise, and make non-static.
      	(onload_format_checks): New function factored out from onload.
      	* lto-plugin-coff.c (claim_file_handler): New function stub.
      	(onload_format_checks): Likewise.
      
      From-SVN: r165133
      Dave Korn committed
  14. 05 Oct, 2010 1 commit
    • opts-common.c (handle_option, [...]): Add diagnostic_context parameter. · 1ebe4b4f
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Add diagnostic_context
      	parameter.  Update calls among these functions.
      	(set_option): Don't use global_dc.
      	* opts.c (read_cmdline_options): Pass global_dc to
      	read_cmdline_option.
      	(decode_options): Pass global_dc to enable_warning_as_error.
      	(common_handle_option): Pass global_dc to enable_warning_as_error.
      	(enable_warning_as_error): Add diagnostic_context parameter.
      	Document parameters.  Don't use global_dc.  Pass
      	diagnostic_context parameter to handle_generated_option.
      	* opts.h (set_option, handle_option, handle_generated_option,
      	read_cmdline_option, enable_warning_as_error): Add
      	diagnostic_context parameter.
      	* Makefile.in (lto-opts.o): Update dependencies.
      	* coretypes.h (struct diagnostic_context, diagnostic_context):
      	Declare here.
      	* diagnostic.h (diagnostic_context): Don't declare typedef here.
      	* gcc.c (process_command): Pass global_dc to read_cmdline_option.
      	* langhooks-def.h (struct diagnostic_context): Don't declare here.
      	(lhd_print_error_function, lhd_initialize_diagnostics): Declare
      	using diagnostic_context typedef.
      	* langhooks.c (lhd_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* langhooks.h (struct diagnostic_context): Don't declare here.
      	(initialize_diagnostics, print_error_function): Declare using
      	diagnostic_context typedef.
      	* lto-opts.c: Include diagnostic.h.
      	(lto_reissue_options): Pass global_dc to set_option.  Pass
      	DK_UNSPECIFIED not 0.
      	* plugin.c (plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      	* plugin.h (struct diagnostic_context): Don't declare here.
      	(plugins_internal_error_function): Declare using
      	diagnostic_context typedef.
      
      c-family:
      	* c-common.h (struct diagnostic_context): Don't declare here.
      	(c_common_initialize_diagnostics): Declare using
      	diagnostic_context typedef.
      	* c-opts.c (c_common_handle_option): Pass global_dc to
      	handle_generated_option.
      
      cp:
      	* cp-tree.h (cxx_print_error_function,
      	cxx_initialize_diagnostics): Declare using diagnostic_context
      	typedef.
      
      From-SVN: r164991
      Joseph Myers committed
  15. 04 Oct, 2010 1 commit
    • optc-gen.awk: Define global_options_set. · d4d24ba4
      	* optc-gen.awk: Define global_options_set.  Don't define
      	target_flags_explicit.
      	* opth-gen.awk: Declare global_options_set.  Define
      	target_flags_explicit as macro.
      	* opts-common.c (handle_option): Take opts_set and generated_p
      	parameters.
      	(handle_generated_option, read_cmdline_option, set_option): Take
      	opts_set parameter.
      	(set_option): Use opts_set instead of hardcoding target_flags and
      	target_flags_explicit.
      	* opts.c (sel_sched_switch_set, profile_arc_flag_set,
      	flag_profile_values_set, flag_unroll_loops_set, flag_tracer_set,
      	flag_value_profile_transformations_set, flag_peel_loops_set,
      	flag_branch_probabilities_set, flag_inline_functions_set,
      	flag_ipa_cp_set, flag_ipa_cp_clone_set,
      	flag_predictive_commoning_set, flag_unswitch_loops_set,
      	flag_gcse_after_reload_set): Remove.
      	(common_handle_option, lang_handle_option, target_handle_option):
      	Take opts_set parameter.  Assert that it is &global_options_set.
      	(common_handle_option): Don't set _set variables.  Check opts_set
      	instead of such variables.
      	(enable_warning_as_error): Pass &global_options_set to
      	handle_generated_option.
      	* opts.h (cl_option_handler_func.handler, set_option,
      	handle_option, handle_generated_option, read_cmdline_option): Add
      	opts_set parameters.
      	(handle_option): Add generated_p parameter.
      	* config/i386/i386.c (ix86_function_specific_save,
      	ix86_function_specific_restore): Updat for renaming of
      	target_flags_explicit field.
      	* config/i386/i386.opt (target_flags_explicit): Rename to
      	ix86_target_flags_explicit.
      	* config/ia64/ia64.c (ia64_override_options_after_change): Check
      	global_options_set.x_flag_selective_scheduling and
      	global_options_set.x_flag_selective_scheduling2, not
      	sel_sched_switch_set.
      	* flags.h (sel_sched_switch_set,
      	flag_speculative_prefetching_set): Remove.
      	* gcc.c (driver_handle_option): Take opts_set parameter.  Assert
      	that it is &global_options_set.
      	(process_command): Pass &global_options_set to
      	read_cmdline_option.
      	* lto-opts.c (lto_reissue_options): Pass &global_options_set to
      	set_option.
      	* toplev.c (target_flags_explicit): Remove.
      
      c-family:
      	* c-opts.c (c_common_handle_option): Pass &global_options_set to
      	handle_generated_option.
      
      From-SVN: r164932
      Joseph Myers committed
  16. 30 Sep, 2010 1 commit
    • opt-functions.awk (static_var): Update comment. · 46625112
      	* opt-functions.awk (static_var): Update comment.
      	(var_ref): Return offsetof expression or -1, not variable address.
      	* optc-gen.awk: Generate structure field initializers instead of
      	static variables.  Expect -1 for missing variables instead of null
      	pointer.  Add gcc_options parameters to generated functions.
      	* opth-gen.awk: Generate structure fields for static variables.
      	Add gcc_options parameters to generated functions.
      	* common.opt (optimize, optimize_size): Add variables.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Pass
      	&global_options to cl_target_option_restore.
      	* config/i386/i386.c (ix86_valid_target_attribute_p): Pass
      	&global_options to cl_optimization_restore, cl_target_option_save
      	and cl_target_option_restore.
      	(ix86_set_current_function): Pass &global_options to
      	cl_target_option_restore.
      	* config/pdp11/pdp11.h (optimize): Remove.
      	* config/rs6000/rs6000.h (optimize): Remove.
      	* config/sh/sh.h (optimize): Remove.
      	* config/xtensa/xtensa.h (optimize): Remove.
      	* coretypes.h (struct gcc_options): Declare.
      	* diagnostic.c (diagnostic_initialize): Initialize
      	context->option_state.
      	(diagnostic_report_diagnostic): Pass option_state to
      	option_enabled hook.
      	* diagnostic.h (diagnostic_context.option_enabled): Add void *
      	parameter.
      	(diagnostic_context.option_state): New field.
      	* final.c (final_start_function, final, final_scan_insn): Rename
      	optimize parameter to optimize_p.
      	* flags.h (optimize, optimize_size): Remove.
      	* function.c (invoke_set_current_function_hook): Pass
      	&global_options to cl_optimization_restore.
      	* gcc.c (driver_handle_option): Take gcc_options parameter.
      	Assert that it is &global_options.
      	(process_command): Pass &global_options to read_cmdline_option.
      	* ipa-pure-const.c (suggest_attribute): Pass &global_options to
      	option_enabled.
      	* lto-opts.c (lto_reissue_options): Use option_flag_var.  Pass
      	&global_options to set_option.
      	* opts-common.c (handle_option, handle_generated_option,
      	read_cmdline_option, set_option): Take explicit gcc_options
      	parameters.  Use option_flag_var.
      	(option_flag_var): New.
      	* opts.c (common_handle_option, lang_handle_option,
      	target_handle_option): Take gcc_options parameter.  Assert that it
      	is &global_options.
      	(read_cmdline_options): Pass &global_options to
      	read_cmdline_option.
      	(print_filtered_help): Use option_flag_var.  Pass &global_options
      	to option_enabled.
      	(common_handle_option): Use option_flag_var.
      	(option_enabled): Take opts parameter.  Use option_flag_var.
      	(get_option_state): Take gcc_options parameter.  Use
      	option_flag_var.  Pass gcc_options parameter to option_enabled.
      	(enable_warning_as_error): Pass &global_options to
      	handle_generated_option.
      	* opts.h (struct cl_option): Change flag_var to flag_var_offset.
      	(cl_option_handler_func.handler): Take gcc_options parameter.
      	(option_enabled, get_option_state, set_option, handle_option,
      	handle_generated_option, read_cmdline_option): Take gcc_options
      	parameters.
      	* toplev.c (optimize, optimize_size): Remove.
      	(print_switch_values): Pass &global_options to option_enabled.
      	(option_affects_pch_p): Use option_flag_var.  Pass &global_options
      	to get_option_state.
      	(general_init): Initialize global_dc->option_state.
      	* tree.c (build_optimization_node): Pass &global_options to
      	cl_optimization_save.
      	(build_target_option_node): Pass &global_options to
      	cl_target_option_save.
      
      c-family:
      	* c-common.c (handle_optimize_attribute): Pass &global_options to
      	cl_optimization_save and cl_optimization_restore.
      	* c-opts.c (c_common_handle_option): Pass &global_options to
      	handle_generated_option.
      	* c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
      	(handle_pragma_pop_options, handle_pragma_reset_options): Pass
      	&global_options to cl_optimization_restore.
      
      From-SVN: r164751
      Joseph Myers committed
  17. 27 Sep, 2010 1 commit
    • common.opt (fsplit-stack): New option. · 7458026b
      gcc/:
      	* common.opt (fsplit-stack): New option.
      	* opts.c (decode_options): Set flag_split_stack to final value.
      	* target.def (supports_split_stack): New hook.
      	* gcc.c (STACK_SPLIT_SPEC): Define.
      	(LINK_COMMAND_SPEC): Use STACK_SPLIT_SPEC.
      	* doc/invoke.texi (Option Summary): Mention -fsplit-stack.
      	(Code Gen Options): Document -fsplit-stack.
      	* doc/extend.texi (Function Attributes): Mention no_split_stack.
      	(Function Attributes): Document no_split_stack.
      	* doc/tm.texi.in (Stack Smashing Protection): Add @hook
      	TARGET_SUPPORTS_SPLIT_STACK.
      	* doc/tm.texi: Rebuild.
      	* function.c (thread_prologue_and_epilogue_insns): If
      	flag_split_stack, add split stack prologue.
      	* explow.c (allocate_dynamic_stack_space): Support -fsplit-stack.
      	* varasm.c (saw_no_split_stack): New static variable.
      	(assemble_start_function): Set saw_no_split_stack if the function
      	has the no_split_stack attribute.
      	(file_end_indicate_split_stack): New function.
      	* output.h (file_end_indicate_split_stack): Declare.
      	* libgcc-std.ver (GCC_4.6.0): Add -fsplit-stack support variables
      	and function.
      	* doc/libgcc.texi (Miscellaneous routines): Document -fsplit-stack
      	routines.
      	* config/i386/i386.c (ix86_option_override_internal): Don't set
      	expand_builtin_va_start to NULL if -fsplit-stack.
      	(ix86_function_regparm): Reduce local regparm by 1 for 32-bit
      	-fsplit-stack.
      	(ix86_va_start): If -fsplit-stack, get overflow pointer	from
      	scratch register set by prologue.
      	(ix86_code_end): If -fsplit-stack, call
      	file_end_indicate_split_stack.
      	(ix86_supports_split_stack): New static function.
      	(SPLIT_STACK_AVAILABLE): Define.
      	(split_stack_prologue_scratch_regno): New static function.
      	(split_stack_fn): New static variable.
      	(ix86_expand_split_stack_prologue): New function.
      	(ix86_live_on_entry): New static function.
      	(ix86_legitimate_address_p): Handle UNSPEC_STACK_CHECK.
      	(output_pic_addr_const): Likewise.
      	(i386_asm_output_addr_const_extra): Likewise.
      	(ix86_expand_call): Change return type to rtx.  Return the new
      	call instruction.
      	(TARGET_SUPPORTS_SPLIT_STACK): Define.
      	(TARGET_EXTRA_LIVE_ON_ENTRY): Define.
      	* config/i386/i386.md (UNSPEC_STACK_CHECK): Define.
      	(split_stack_prologue, split_stack_return): New insns.
      	(split_stack_space_check): New insn.
      	* config/i386/i386.h (struct machine_function): Add
      	split_stack_varargs_pointer field.
      	* config/i386/linux.h (TARGET_CAN_SPLIT_STACK): Define.
      	(TARGET_THREAD_SPLIT_STACK_OFFSET): Define.
      	* config/i386/linux64.h (TARGET_CAN_SPLIT_STACK): Define.
      	(TARGET_THREAD_SPLIT_STACK_OFFSET): Define.
      	* config/i386/i386-protos.h (ix86_expand_split_stack_prologue):
      	Declare.
      	(ix86_expand_call): Update declaration.
      gcc/c-family/:
      	* c-common.c (c_common_attribute_table): Add no_split_stack.
      	(handle_no_split_stack_attribute): New static function.
      gcc/testsuite/:
      	* lib/target-supports.exp (check_effective_target_split_stack):
      	New procedure.
      	* gcc.dg/split-1.c: New test.
      	* gcc.dg/split-2.c: New test.
      	* gcc.dg/split-3.c: New test.
      	* gcc.dg/split-4.c: New test.
      libgcc/:
      	* generic-morestack.h: New file.
      	* generic-morestack.c: New file.
      	* generic-morestack-thread.c: New file.
      	* config/i386/morestack.S: New file.
      	* config/t-stack: New file.
      	* config/i386/t-stack-i386: New file.
      	* config.host (i[34567]86-*-linux* and friends): Add t-stack and
      	i386/t-stack-i386 to tmake_file.
      
      From-SVN: r164661
      Ian Lance Taylor committed
  18. 22 Sep, 2010 2 commits
    • opts-common.c (prune_options): Make static. · 60cf253a
      	* opts-common.c (prune_options): Make static.  Work with decoded
      	options.
      	(decode_cmdline_options_to_array): Call prune_options.  Don't
      	resize option array here.
      	* opts.h (prune_options): Remove prototype.
      	* gcc.c (process_command): Take decoded options; don't call
      	decode_cmdline_options_to_array here.  Use decoded options for
      	argv[0].
      	(main): Call decode_cmdline_options_to_array here instead of
      	prune_options.  Update call to process_command.
      	* config/darwin-driver.c: Include opts.h.
      	(darwin_default_min_version): Work with decoded options.  Don't
      	handle -b or -V here.
      	* config/darwin.h (darwin_default_min_version): Update prototype.
      	(GCC_DRIVER_HOST_INITIALIZATION): Update call to
      	darwin_default_min_version.
      	* config/i386/cygwin.h (mingw_scan): Update prototype.
      	(GCC_DRIVER_HOST_INITIALIZATION): Update call to mingw_scan.
      	* config/i386/cygwin1.c: Include opts.h.
      	(mingw_scan): Work with decoded options.
      	* config/i386/t-cygwin (cygwin1.o): Update dependencies.
      	* config/t-darwin (darwin-driver.o): Update dependencies.
      
      From-SVN: r164532
      Joseph Myers committed
    • common.opt (-assemble, [...]): New. · e200444e
      	* common.opt (-assemble, -compile, -coverage, -debug, -dump,
      	-dump=, -dumpbase, -dumpdir, -entry, -entry=, -extra-warnings,
      	-for-assembler, -for-assembler=, -for-linker, -for-linker=,
      	-force-link, -force-link=, -language, -language=,
      	-library-directory, -library-directory=, -no-canonical-prefixes,
      	-no-standard-libraries, -no-warnings, -optimize, -output,
      	-output=, -pass-exit-codes, -pedantic, -pedantic-errors, -pie,
      	-pipe, -prefix, -prefix=, -preprocess, -print-file-name,
      	-print-file-name=, -print-libgcc-file-name,
      	-print-multi-directory, -print-multi-lib,
      	-print-multi-os-directory, -print-prog-name, -print-prog-name=,
      	-print-search-dirs, -print-sysroot, -print-sysroot-headers-suffix,
      	-profile, -save-temps, -shared, -specs, -specs=, -static,
      	-symbolic, -time, -verbose, -param=, -sysroot, coverage, e, u,
      	symbolic): New.
      	(fhelp, fhelp=, ftarget-help, fversion): Make into aliases.
      	* gcc.c (A Short Introduction to Adding a Command-Line Option):
      	Remove comment.
      	(cc1_options): Correct specs for passing down --help,
      	--target-help and --help=*.  Add spec for passing down --version.
      	(struct option_map, option_map, target_option_translations,
      	translate_options): Remove.
      	(driver_handle_option): Handle OPT__version, OPT__help, OPT__help_
      	and OPT__target_help instead of OPT_fversion, OPT_fhelp,
      	OPT_fhelp_ and OPT_ftarget_help.
      	(process_command): Don't call translate_options.  Call
      	decode_cmdline_options_to_array before checking for
      	-no-canonical-prefixes using decoded options.
      	* opts-common.c (tm.h): Update comment on #include.
      	(find_opt): Allow abbreviations of long options.
      	(struct option_map, option_map): New.
      	(decode_cmdline_option): Use them instead of hardcoding -Wno, -fno
      	and -mno handling.
      	(target_option_translations): New.
      	(decode_cmdline_options_to_array): Handle
      	TARGET_OPTION_TRANSLATE_TABLE in driver.
      	* opts.c (common_handle_option): Don't handle OPT_fhelp,
      	OPT_ftarget_help, OPT_fhelp_ or OPT_fversion.
      
      ada:
      	* gcc-interface/lang.opt (-all-warnings, -include-barrier,
      	-include-directory, -include-directory=, -no-standard-includes,
      	-no-standard-libraries): New.
      
      c-family:
      	* c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
      	-comments-in-macros, -define-macro, -define-macro=, -dependencies,
      	-dump, -dump=, -imacros, -imacros=, -include, -include=,
      	-include-barrier, -include-directory, -include-directory=,
      	-include-directory-after, -include-directory-after=,
      	-include-prefix, -include-prefix=, -include-with-prefix,
      	-include-with-prefix=, -include-with-prefix-after,
      	-include-with-prefix-after=, -include-with-prefix-before,
      	-include-with-prefix-before=, -no-integrated-cpp,
      	-no-line-commands, -no-standard-includes, -no-warnings, -output,
      	-output=, -pedantic, -pedantic-errors, -preprocess,
      	-print-missing-file-dependencies, -trace-includes, -traditional,
      	-traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
      	-user-dependencies, -verbose, -write-dependencies,
      	-write-user-dependencies, no-integrated-cpp, traditional): New.
      
      fortran:
      	* gfortranspec.c (lang_specific_driver): Handle OPT__version and
      	OPT__help instead of OPT_fversion and OPT_fhelp.
      	* lang.opt (-all-warnings, -assert, -assert=, -comments,
      	-comments-in-macros, -define-macro, -define-macro=, -dependencies,
      	-dump, -dump=, -include-barrier, -include-directory,
      	-include-directory=, -include-directory-after,
      	-include-directory-after=, -include-prefix, -include-prefix=,
      	-no-line-commands, -no-standard-includes, -output, -output=,
      	-preprocess, -print-missing-file-dependencies, -trace-includes,
      	-undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
      	-write-dependencies, -write-user-dependencies): New.
      
      java:
      	* jvspec.c (lang_specific_driver): Handle OPT__help instead of
      	OPT_fhelp.
      	* lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
      	-dependencies, -encoding, -extdirs, -include-directory,
      	-include-directory=, -output-class-directory,
      	-output-class-directory=, -resource, -resource=,
      	-user-dependencies): New.
      
      From-SVN: r164531
      Joseph Myers committed
  19. 17 Sep, 2010 1 commit
    • common.opt (combine): Remove. · c3224d6f
      2010-09-17  Richard Guenther  <rguenther@suse.de>
      
      	* common.opt (combine): Remove.
      	* gcc.c (default_compilers): Remove specs testing combine.
      	The C compilers no longer can combine.
      	(option_map): Remove -combine.
      	(display_help): Remove -combine.
      	(driver_handle_option): Remove OPT_combine handling.
      	(compile_input_file_p): Remove.
      	(do_spec): Remove code concerning combine.
      	(main): Likewise.
      	* doc/invoke.texi: Remove traces of -combine.
      	* lto-wrapper.c (run_gcc): Do not pass -combine to the compiler
      	driver.
      
      	lto/
      	* lang.opt (flag_wpa): Also enable for the driver.
      
      	* gcc.dg/pr27898.c: Use -flto instead of -combine.
      	* gcc.dg/pr28706.c: Likewise.
      	* gcc.dg/pr28712.c: Likewise.
      	* gcc.dg/pr30762-1.c: Likewise.
      	* gcc.dg/pr30762-2.c: Likewise.
      	* gcc.dg/pr31529-1.c: Likewise.
      	* gcc.dg/pr31529-2.c: Likewise.
      	* gcc.dg/pr34457-1.c: Likewise.
      	* gcc.dg/pr34457-2.c: Likewise.
      	* gcc.dg/pr34668-1.c: Likewise.
      	* gcc.dg/pr34668-2.c: Likewise.
      	* gcc.dg/pr34989-1.c: Likewise.
      	* gcc.dg/pr34989-2.c: Likewise.
      	* gcc.dg/pr43557-1.c: Likewise.
      	* gcc.dg/pr43557-2.c: Likewise.
      	* gcc.dg/debug/pr41893-1.c: Likewise.
      	* gcc.dg/matrix/matrix.exp: Do not use -combine.
      	* gcc.dg/matrix/matrix-3.c: Drop dg-options.
      	* gcc.dg/matrix/matrix-4.c: Likewise.
      	* gcc.dg/struct/struct-reorg.exp: Do not use -combine.
      	* gcc.dg/struct/wo_prof_empty_str.c: Drop dg-options.
      	* gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise.
      	* gcc.dg/struct/wo_prof_escape_return.c: Likewise.
      
      From-SVN: r164357
      Richard Guenther committed
  20. 03 Sep, 2010 1 commit
    • options.texi (SeparateAlias): Document. · d1583032
      	* doc/options.texi (SeparateAlias): Document.
      	* opt-functions.awk (switch_flags): Handle SeparateAlias.
      	* opth-gen.awk: Generate enumeration names for options marked
      	SeparateAlias, but not for those marked Ignore.
      	* opts-common.c (generate_canonical_option): Don't output separate
      	argument for options marked CL_SEPARATE_ALIAS.
      	(decode_cmdline_option): Handle CL_SEPARATE_ALIAS.
      	* opts.h (CL_SEPARATE_ALIAS): New.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
      	CL_COMMON): Adjust definitions.
      	* config/i386/darwin.opt, config/mips/sde.opt: New.
      	* common.opt (fdump-final-insns): New.
      	* config.gcc (i[34567]86-*-darwin*, x86_64-*-darwin*): Add
      	i386/darwin.opt.
      	(mips*-sde-elf*): Add mips/sde.opt.
      	* config/mips/sde.h (DRIVER_SELF_SPECS): Don't handle
      	-mno-data-in-code and -mcode-xonly here.
      	* defaults.h (DEFAULT_SWITCH_TAKES_ARG): Add 'd'.
      	* gcc.c (option_map): Add "j" to --dump entry.
      	(translate_options): Don't translate -d to -foutput-class-dir=
      	here.
      
      java:
      	* lang.opt (d): New.
      
      testsuite:
      	* gcc.dg/opts-4.c: New test.
      
      From-SVN: r163844
      Joseph Myers committed
  21. 02 Sep, 2010 1 commit
    • re PR driver/44076 (-MT <target> behaves different as -MT<target> (w/o space)) · 5de8299c
      	PR driver/44076
      	* opts.h (struct cl_option): Add alias_arg, neg_alias_arg and
      	alias_target fields.
      	* opt-functions.awk (opt_sanitized_name): Don't handle
      	finline-limit=, Wlarger-than= and ftemplate-depth= specially.
      	* optc-gen.awk: Generate alias fields.
      	* opth-gen.awk: Explicitly give values for OPT_* enum constants.
      	Don't generate such constants for aliases.
      	* opts-common.c (generate_canonical_option): New.
      	(decode_cmdline_option): Handle aliases.  Use
      	generate_canonical_option for known options instead of copying the
      	input option text.
      	* doc/options.texi (Alias): Document.
      	* common.opt (W, Wlarger-than-, aux-info=, finline-limit-,
      	fstack-check, specs): Mark as aliases.
      	* gcc.c (driver_handle_option): Canonicalize -L options to joined
      	arguments.
      	(driver_handle_option): Don't handle OPT_specs.
      	* opts.c (common_handle_option): Don't handle options marked as
      	aliases.
      	(enable_warning_as_error): Handle aliases.
      	* stor-layout.c (layout_decl): Use OPT_Wlarger_than_ instead of
      	OPT_Wlarger_than_eq.
      	* tree-optimize.c (tree_rest_of_compilation): Use
      	OPT_Wlarger_than_ instead of OPT_Wlarger_than_eq.
      
      c-family:
      	* c.opt (Wcomments, Werror-implicit-function-declaration,
      	ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
      	std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
      	aliases.
      	* c-common.c (option_codes): Use OPT_Wcomment instead of
      	OPT_Wcomments.
      	* c-opts.c (warning_as_error_callback, c_common_handle_option):
      	Don't handle options marked as aliases.
      
      java:
      	* lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
      	fCLASSPATH=): Mark as Java options and as aliases.
      	* jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
      	(lang_specific_driver): Don't handle options marked as aliases.
      	* lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
      
      testsuite:
      	* gcc.dg/cpp/warn-comments-3.c: New.  Based on warn-comments-2.c
      	but using -Werror=comment.
      	* gcc.dg/cpp/warn-comments.c, gcc.dg/cpp/warn-comments-2.c: Adjust
      	expected error messages.
      
      From-SVN: r163770
      Joseph Myers committed
  22. 22 Aug, 2010 1 commit
    • Makefile.in (gccspec.o, cppspec.o): Update dependencies. · d9d16a19
      	* Makefile.in (gccspec.o, cppspec.o): Update dependencies.
      	* common.opt (L, nodefaultlibs, nostdlib, pg, static): New
      	options.
      	* config/avr/avr.h (LIBSTDCXX): Remove initial "-l".
      	* config/freebsd.h (MATH_LIBRARY_PROFILE): Remove initial "-l".
      	* config/i386/djgpp.h (LIBSTDCXX): Remove initial "-l".
      	* config/rs6000/aix.h (LIBSTDCXX_STATIC): Remove initial "-l".
      	* config/s390/tpf.h (MATH_LIBRARY, LIBSTDCXX): Remove initial
      	"-l".
      	* cppspec.c: Include opts.h.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* doc/tm.texi.in (MATH_LIBRARY): Update documentation.
      	* doc/tm.texi: Regenerate.
      	* gcc.c (translate_options): Translate -d to -foutput-class-dir=.
      	(driver_handle_option): Allow driver options needing no special
      	processing.
      	(process_command): Decode options before call to
      	lang_specific_driver.  Pass decoded options to
      	lang_specific_driver.
      	* gcc.h (lang_specific_driver): Update prototype.
      	* gccspec.c: Include opts.h.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* opts-common.c (option_ok_for_language, generate_option,
      	generate_option_input_file): New.
      	(decode_cmdline_option): Use option_ok_for_language.
      	(decode_cmdline_options_to_array): Use generate_option_input_file.
      	(handle_generated_option): Use generate_option.
      	* opts.h (generate_option, generate_option_input_file): Declare.
      
      cp:
      	* Make-lang.in (g++spec.o): Update dependencies.
      	* g++spec.c: Include opts.h
      	(MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
      	(lang_specific_driver): Use cl_decoded_option structures.
      
      fortran:
      	* Make-lang.in (gfortranspec.o): Update dependencies.
      	* gfortranspec.c: Include coretypes.h before gcc.h.  Include
      	opts.h.
      	(MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
      	(ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
      	(g77_xargc): Make unsigned.
      	(g77_xargv): Change to g77_x_decoded_options.
      	(g77_newargc): Make unsigned.
      	(g77_newargv): Change to g77_new_decoded_options.
      	(strings_same, options_same): New.
      	(append_arg): Use cl_decoded_option structures.
      	(append_option): New.
      	(add_arg_libgfortran): New.
      	(lang_specific_driver): Use cl_decoded_option structures.
      
      java:
      	* Make-lang.in (jvspec.o): Update dependencies.
      	* jvspec.c: Include opts.h.
      	(PARAM_ARG): Remove.
      	(find_spec_file): Do not add leading -specs=.
      	(lang_specific_driver): Use cl_decoded_option structures.
      	* lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
      	extdirs, fmain=, s-bc-abi): New options.
      
      From-SVN: r163459
      Joseph Myers committed
  23. 17 Aug, 2010 1 commit
    • gcc.c (spec_function): Add remove-outfile. · 2642f659
      2010-08-17  Jack Howarth <howarth@bromo.med.uc.edu>
      
      	* gcc.c (spec_function): Add remove-outfile.
      	(remove_outfile_spec_function): New function.
      	* config/darwin.h (LINK_SPEC): Add removal of
      	-ldl, -lm and -lpthread.
      	* invoke.texi (replace-outfile): Document.
      
      From-SVN: r163305
      Jack Howarth committed
  24. 16 Aug, 2010 2 commits
    • options.texi (NoDriverArg): Document. · c878765b
      	* doc/options.texi (NoDriverArg): Document.
      	* gcc.c (cpp_unique_options): Generate -MD and -MMD instead of
      	-MDX and -MMDX.
      	* opt-functions.awk (switch_flags): Handle NoDriverArg.
      	* opts-common.c (decode_cmdline_option): Ignore CL_SEPARATE
      	marking for CL_NO_DRIVER_ARG options when in the driver.
      	* opts.h (CL_NO_DRIVER_ARG): Define.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_DRIVER, CL_TARGET,
      	CL_COMMON): Update values.
      
      c-family:
      	* c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
      	RejectDriver.
      	(MMDX): Change back to MMD.  Mark NoDriverArg instead of
      	RejectDriver.
      	* c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
      	instead of OPT_MDX and OPT_MMDX.
      
      fortran:
      	* lang.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
      	RejectDriver.
      	(MMDX): Change back to MMD.  Mark NoDriverArg instead of
      	RejectDriver.
      	* cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
      	OPT_MDX and OPT_MMDX.
      
      From-SVN: r163280
      Joseph Myers committed
    • common.opt: Add driver options. · 603349bf
      	* common.opt: Add driver options.
      	(auxbase, auxbase-strip, quiet, version): Mark RejectDriver.
      	* doc/options.texi (Driver, RejectDriver): Document.
      	* gcc.c (pass_exit_codes, print_search_dirs, print_file_name,
      	print_prog_name, print_multi_directory, print_sysroot,
      	print_multi_os_directory, print_multi_lib,
      	print_sysroot_headers_suffix, report_times, combine_flag,
      	use_pipes, wrapper_string): Remove.
      	(save_switch, driver_unknown_option_callback,
      	driver_wrong_lang_callback, driver_post_handling_callback,
      	driver_handle_option): New.
      	(spec_lang, last_language_n_infiles): Make file-scope static
      	instead of local to process_command.
      	(process_command): Use decode_cmdline_options_to_array and
      	read_cmdline_option for option processing.  Compute have_c in
      	prescan of decoded options.
      	* opt-functions.awk (switch_flags): Handle Driver and
      	RejectDriver.
      	(var_type, var_type_struct): Handle Separate options as generating
      	const char * variables.
      	* opts-common.c (decode_cmdline_option): Expect CL_COMMON and
      	CL_TARGET to be passed by caller if required.
      	(decode_cmdline_options_to_array): Update comment.
      	* opts.c (complain_wrong_lang): Handle options only valid for the
      	driver.
      	(decode_options): Update call to decode_cmdline_options_to_array.
      	(print_filtered_help): Ignore driver-only options.
      	(print_specific_help): Ignore CL_DRIVER.
      	(common_handle_option): Don't call print_specific_help for
      	CL_DRIVER.
      	* opts.h (CL_DRIVER, CL_REJECT_DRIVER): Define.
      	(CL_PARAMS, CL_WARNING, CL_OPTIMIZATION, CL_TARGET, CL_COMMON):
      	Update values.
      
      c-family:
      	* c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
      
      fortran:
      	* lang.opt (MDX, MMDX): Mark RejectDriver.
      
      java:
      	* lang.opt (MD_, MMD_, version): Mark RejectDriver.
      
      From-SVN: r163279
      Joseph Myers committed
  25. 12 Aug, 2010 1 commit
  26. 03 Aug, 2010 1 commit
    • alpha.h (SWITCH_TAKES_ARG): Define. · 1890bccc
      	* config/alpha/alpha.h (SWITCH_TAKES_ARG): Define.
      	* config/alpha/osf5.h (LIB_SPEC): Don't handle -a.
      	* config/bfin/bfin.h (ASM_SPEC, LINK_SPEC): Don't pass -G*
      	options.
      	* config/darwin.h (WORD_SWITCH_TAKES_ARG): Handle -iframework.
      	* config/ia64/ia64.h (SWITCH_TAKES_ARG): Define.
      	* config/iq2000/iq2000.h (SWITCH_TAKES_ARG): Remove.
      	* config/rs6000/sysv4.h (SWITCH_TAKES_ARG): Define using
      	DEFAULT_SWITCH_TAKES_ARG.
      	* config/rx/rx.opt (-patch=): Remove option.
      	* config/rx/rx.c (rx_handle_option): Don't handle OPT_patch_.
      	* defaults.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Handle -imultilib.
      	* doc/invoke.texi (RX Options): Remove -patch=.
      	* gcc.c (cc1_options): Pass -aux-info* instead of -a* options.
      	(option_map): Remove --profile-blocks, --quiet and --silent.
      
      ada:
      	* gcc-interface/lang-specs.h: Don't pass -a options.
      
      c-family:
      	* c.opt (-print-pch-checksum): Remove option.
      	* c-opts.c (c_common_handle_option): Don't handle
      	OPT_print_pch_checksum.
      
      From-SVN: r162838
      Joseph Myers committed
  27. 28 Jul, 2010 1 commit
    • darwin-driver.c (SWITCH_TAKES_ARG, [...]): Remove. · eea13ead
      	* config/darwin-driver.c (SWITCH_TAKES_ARG,
      	WORD_SWITCH_TAKES_ARG): Remove.
      	* cppspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Remove.
      	* defaults.h (DEFAULT_SWITCH_TAKES_ARG,
      	DEFAULT_WORD_SWITCH_TAKES_ARG): Move from gcc.h.
      	(SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move default
      	definitions from gcc.c.
      	* gcc.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG): Move to
      	defaults.h.
      	* gcc.h (DEFAULT_SWITCH_TAKES_ARG, DEFAULT_WORD_SWITCH_TAKES_ARG):
      	Move to defaults.h.
      	* opts-common.c: Include tm.h.
      	(decode_cmdline_option): Use SWITCH_TAKES_ARG and
      	WORD_SWITCH_TAKES_ARG to count arguments to unknown options.
      	Handle more than one argument.  Set canonical_option_num_elements.
      	(decode_cmdline_options_to_array): Set
      	canonical_option_num_elements and trailing elements of
      	canonical_option.
      	* opts.h (struct cl_decoded_option): Allow four elements in
      	canonical_option.  Add field canonical_option_num_elements.
      	* Makefile.in (opts-common.o): Update dependencies.
      
      ada:
      	* gcc-interface/misc.c (gnat_init_options): Ignore erroneous
      	options.  Check canonical_option_num_elements on options copied.
      
      fortran:
      	* gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
      	Remove.
      
      From-SVN: r162620
      Joseph Myers committed
  28. 23 Jul, 2010 1 commit
  29. 26 Jun, 2010 2 commits
    • collect2.c (main): Remove SWITCHES_NEED_SPACES conditional. · d5d8b111
      	* collect2.c (main): Remove SWITCHES_NEED_SPACES conditional.
      	* doc/tm.texi (SWITCHES_NEED_SPACES): Don't document.
      	* gcc.c (SWITCHES_NEED_SPACES, switches_need_spaces): Remove.
      	(static_specs): Remove switches_need_spaces.
      	(process_command, do_self_spec): Hardcode handling "-o" instead of
      	checking switches_need_spaces.
      	* system.h (SWITCHES_NEED_SPACES): Poison.
      
      From-SVN: r161436
      Joseph Myers committed
    • gcc.c (n_switches_alloc, [...]): New. · 922e1882
      	* gcc.c (n_switches_alloc, n_infiles_alloc, alloc_infile,
      	add_infile, alloc_switch): New.
      	(process_command): Remove variable lang_n_infiles.  Process
      	options in a single pass.  Use new functions for allocating
      	infiles and switches arrays.  Properly skip operands of
      	-Xpreprocessor and -Xassembler.
      
      testsuite:
      	* gcc.dg/opts-3.c: New test.
      
      From-SVN: r161430
      Joseph Myers committed
  30. 25 Jun, 2010 2 commits
  31. 05 Jun, 2010 1 commit
  32. 04 Jun, 2010 1 commit
    • darwin-driver.c (darwin_default_min_version): Use · bdc6b402
      	* config/darwin-driver.c (darwin_default_min_version): Use
      	* GCC-specific formats in diagnostics.
      	* cppspec.c (lang_specific_driver): Use GCC-specific formats in
      	diagnostics.
      	* gcc.c (translate_options, read_specs, add_sysrooted_prefix,
      	execute, process_command, end_going_arg, do_self_spec, do_spec_1,
      	eval_spec_function, handle_braces, process_brace_body, main,
      	perror_with_name, used_arg, set_multilib_dir, print_multilib_info,
      	getenv_spec_function, compare_version_strings,
      	version_compare_spec_function): Use GCC-specific formats in
      	diagnostics.
      
      cp:
      	* g++spec.c (lang_specific_driver): Use GCC-specific formats in
      	diagnostics.
      
      fortran:
      	* gfortranspec.c (append_arg, lang_specific_driver): Use
      	GCC-specific formats in diagnostics.
      
      java:
      	* jvspec.c (lang_specific_driver): Use GCC-specific formats in
      	diagnostics.
      
      From-SVN: r160292
      Joseph Myers committed
  33. 01 Jun, 2010 1 commit
    • invoke.texi: Mention -fdump-ada-spec. · 9cc54940
      	* doc/invoke.texi: Mention -fdump-ada-spec.
      	* tree-dump.c (dump_files): Add ada-spec.
      	(FIRST_AUTO_NUMBERED_DUMP): Bump to 8.
      	* tree-pass.h (tree_dump_index): Add TDI_ada.
      	* gcc.c: Add support for -C without -E and for -fdump-ada-spec.
      	(cpp_unique_options): Do not reject -C or -CC when -E isn't present.
      	(default_compilers) <@c-header>: Allow -fdump-ada-spec on header files.
      	* c-decl.c: Include c-ada-spec.h.
      	(collect_source_ref_cb, collect_all_refs, for_each_global_decl): New
      	functions.
      	(c_write_global_declarations): Add handling of -fdump-ada-spec.
      	* c-lex.c (c_lex_with_flags): Add handling of CPP_COMMENT.
      	* Makefile.in (C_AND_OBJC_OBJS): Add c-ada-spec.o.
      	* c-ada-spec.h, c-ada-spec.c: New files.
      
      Co-Authored-By: Matthew Gingell <gingell@adacore.com>
      
      From-SVN: r160100
      Arnaud Charlet committed
  34. 28 May, 2010 2 commits
    • gcc.c: Include diagnostic.h. · 6afbc885
      	* gcc.c: Include diagnostic.h.
      	(error_count): Remove.  All users changed to use errorcount.
      	(programname): Remove.  All users changed to use progname.
      	(fancy_abort, internal_error, fatal_error, error, warning, inform,
      	fnotice): Remove.
      	(execute): Don't include "Internal error" and bug reporting
      	information in argument of internal_error call.
      	(process_command): Don't increment error_count after calling
      	perror_with_name.
      	(input_filename): Rename to gcc_input_filename.  All users
      	changed.
      	(main): Call diagnostic_initialize.  Register delete_temp_files
      	with atexit.  Use seen_error to test for errors.
      	* gcc.h: Include diagnostic-core.h.
      	(fatal_error, error, warning): Remove.
      	* Makefile.in (GCC_H): Add $(DIAGNOSTIC_CORE_H).
      	(GCC_OBJS): Add diagnostic.o, pretty-print.o and input.o.
      	(gcc.o): Update dependencies.
      
      From-SVN: r160004
      Joseph Myers committed