1. 22 Jul, 2011 1 commit
    • re PR c++/49756 (g++ ICE) · d423df48
      	PR c++/49756
      	* libiberty.h (stack_limit_increase): New prototype.
      
      	* stack-limit.c: New file.
      	* Makefile.in: Regenerate deps.
      	(CFILES): Add stack-limit.c.
      	(REQUIRED_OFILES): Add ./stack-limit.$(objext).
      	* configure.ac (checkfuncs): Add getrlimit and setrlimit.
      	(AC_CHECK_FUNCS): Likewise.
      	* configure: Regenerated.
      	* config.in: Regenerated.
      
      	* gcc.c (main): Call stack_limit_increase (64MB).
      	* toplev.c (toplev_main): Likewise.
      
      From-SVN: r176617
      Jakub Jelinek committed
  2. 07 Jul, 2011 2 commits
    • gcc.c (%[Spec]): Don't document. · 3ce9f090
      	* gcc.c (%[Spec]): Don't document.
      	(struct spec_list): Update comment.
      	(do_spec_1): Don't handle %[Spec].
      	* doc/invoke.texi (%[@var{name}]): Remove documentation of spec.
      
      From-SVN: r175970
      Joseph Myers committed
    • re PR libmudflap/49550 (Many libmudflap tests fail on Solaris 11/x86) · 891a2e42
      	gcc:
      	PR libmudflap/49550
      	* gcc.c (MFWRAP_SPEC): Also wrap mmap64.
      
      	libmudflap:
      	PR libmudflap/49550
      	* mf-runtime.c (__wrap_main) [__sun__ && __svr4__]: Don't register
      	stdin, stdout, stderr.
      	Register __ctype, __ctype_mask.
      
      	* configure.ac: Check for mmap64.
      	Check for rawmemchr, stpcpy, mempcpy.
      	* configure: Regenerate.
      	* config.h.in: Regenerate.
      	* mf-hooks1.c [HAVE_MMAP64] (__mf_0fn_mmap64): New function.
      	(mmap64): New wrapper function.
      	* mf-impl.h (__mf_dynamic_index) [HAVE_MMAP64]: Add dyn_mmap64.
      	* mf-runtime.c (__mf_dynamic) [HAVE_MMAP64]: Handle mmap64.
      
      	* mf-hooks2.c [HAVE_GETMNTENT && HAVE_SYS_MNTTAB_H]: Implement
      	getmntent wrapper.
      
      	* mf-hooks3.c (_REENTRANT): Define.
      
      	* testsuite/libmudflap.c/heap-scalestress.c (SCALE): Reduce to 10000.
      
      	* testsuite/libmudflap.c/pass-stratcliff.c: Include ../config.h.
      	(MIN): Define.
      	Use HAVE_RAWMEMCHR, HAVE_STPCPY, HAVE_MEMPCPY as guards.
      
      	* testsuite/libmudflap.c/pass47-frag.c: Expect __ctype warning on
      	*-*-solaris2.*.
      
      From-SVN: r175961
      Rainer Orth committed
  3. 28 Jun, 2011 1 commit
    • common.opt (in_lto_p): New Variable entry. · a7d0d30f
      	* common.opt (in_lto_p): New Variable entry.
      	* flags.h (in_lto_p): Move to common.opt.
      	* gcc.c: Include params.h.
      	(set_option_handlers): Also use common_handle_option and
      	target_handle_option.
      	(main): Call global_init_params, finish_params and
      	init_options_struct.
      	* opts.c (debug_type_names): Move from toplev.c.
      	(print_filtered_help): Access quiet_flag through opts pointer.
      	(common_handle_option): Return early in the driver for some
      	options.  Access in_lto_p, dwarf_version and
      	warn_maybe_uninitialized through opts pointer.
      	* toplev.c (in_lto_p): Move to common.opt.
      	(debug_type_names): Move to opts.c.
      	* Makefile.in (OBJS): Remove opts.o.
      	(OBJS-libcommon-target): Add opts.o.
      	(gcc.o): Update dependencies.
      
      From-SVN: r175591
      Joseph Myers committed
  4. 31 May, 2011 1 commit
  5. 11 May, 2011 1 commit
    • install.texi (Configuration): Document --with-linker-hash-style. · 79bec923
      2011-05-11  Satoru Takabayashi  <satorux@google.com>
      	    Paul Pluzhnikov  <ppluzhnikov@google.com>
      
      	* gcc/doc/install.texi (Configuration): Document
      	--with-linker-hash-style.
      	* gcc/gcc.c (init_spec): Handle LINKER_HASH_STYLE.
      	* gcc/config.in: Add LINKER_HASH_STYLE.
      	* gcc/configure.ac: Add --with-linker-hash-style.
      	* gcc/configure: Regenerate.
      
      
      Co-Authored-By: Paul Pluzhnikov <ppluzhnikov@google.com>
      
      From-SVN: r173668
      Satoru Takabayashi committed
  6. 20 Apr, 2011 1 commit
    • remove useless if-before-free tests · 04695783
      Change "if (E) free (E);" to "free (E);" everywhere except in the
      libgo/, intl/, zlib/ and classpath/ directories.
      Also transform equivalent variants like
      "if (E != NULL) free (E);" and allow an extra cast on the
      argument to free.  Otherwise, the tested and freed "E"
      expressions must be identical, modulo white space.
      
      From-SVN: r172785
      Jim Meyering committed
  7. 31 Mar, 2011 1 commit
    • opts.h (cl_option): Add comments to fields. · 300d83d9
      	* opts.h (cl_option): Add comments to fields.  Add bit-fields for
      	various flags.
      	(CL_SEPARATE_NARGS_SHIFT, CL_SEPARATE_NARGS_MASK,
      	CL_SEPARATE_ALIAS, CL_NO_DRIVER_ARG, CL_REJECT_DRIVER, CL_SAVE,
      	CL_DISABLED, CL_REPOR, CL_REJECT_NEGATIVE, CL_MISSING_OK,
      	CL_UINTEGER, CL_NEGATIVE_ALIAS): Remove.
      	(CL_JOINED, CL_SEPARATE, CL_UNDOCUMENTED): Update bit positions.
      	* opt-functions.awk (flag_init, switch_bit_fields): New.
      	(switch_flags): Don't handle flags moved to bit-fields.  Don't
      	generate CL_MISSING_OK or CL_SAVE.
      	* optc-gen.awk: Update to generate bit-field output as well as
      	flags field.
      	* gcc.c (driver_wrong_lang_callback): Use cl_reject_driver
      	bit-field instead of CL_REJECT_DRIVER flag.
      	* opts-common.c (generate_canonical_option,
      	decode_cmdline_option): Use bit-fields instead of CL_* flags.
      	* opts.c (maybe_default_option): Use cl_reject_negative bit-field
      	instead of CL_REJECT_NEGATIVE flag.
      	* toplev.c (print_switch_values): Use cl_report bit-field instead
      	of CL_REPORT flag.
      
      From-SVN: r171804
      Joseph Myers committed
  8. 25 Mar, 2011 1 commit
    • Changelog c-family/ · ba78087b
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* c-ada-spec.c (compare_comment): Use filename_cmp
      	instead of strcmp for filename.
      
      
      Changelog fortran/
      
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* scanner.c (preprocessor_line): Use filename_cmp
      	instead of strcmp.
      
      Changelog gcc/
      
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* collect2.c (write_c_file_stat): Handle backslash
      	as right-hand directory separator.
      	(resolve_lib_name): Use IS_DIR_SEPARATOR instead of
      	checking just for slash.
      	* coverage.c (coverage_init): Use IS_ABSOLUTE_PATH
      	instead of checking for trailing slash.
      	* gcc.c (record_temp_file): Use filename_cmp instead
      	of strcmp.
      	(do_spec_1): Likewise.
      	(replace_outfile_spec_function): Likewise.
      	(is_directory): Use filename_ncmp instead of strncmp.
      	(print_multilib_info): Likewise.
      	* gcov.c (find_source): Use filename_cmp instead
      	instead of strcmp.
      	(make_gcov_file_name): Fix order of slash/backslash
      	checks.
      	* incpath.c (DIRS_EQ): Use filename_cmp instead of strcmp.
      	(add_standard_paths): Likewise.
      	* mips-tfile.c (saber_stop): Handle backslash.
      	* prefix.c (update_path): Use filename_ncmp instead of
      	strncmp.
      	* profile.c (output_location): Use filename_cmp instead
      	of strcmp.
      	* read-md.c (handle_toplevel_file): Handle backslash.
      	* tlink.c (frob_extension):  Likewise.
      	* tree-cfg.c (same_line_p): Use filename_cmp instead of
      	strcmp.
      	* tree-dump.c (dequeue_and_dump): Handle backslash.
      	* tree.c (get_file_function_name): Likewise.
      	* gengtype.c (read_input_list): Likewise.
      	(get_file_realbasename): Likewise.
      	(get_output_file_with_visibility): Use filename_cmp
      	instead of strcmp.
      
      ChangeLog java/
      
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
      	instead of strcmp.
      	(set_source_filename): Likewise.
      	* win32-host.c (jcf_open_exact_case): Likewise.
      
      ChangeLog lto/
      
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* lto.c (lto_resolution_read): Use filename_cmp instead
      	of strcmp.
      	(lto_read_section_data): Likewise.
      
      
      ChangeLog cp/
      
      2011-03-25  Kai Tietz  <ktietz@redhat.com>
      
      	* lex.c (interface_strcmp): Handle dos-paths.
      	(handle_pragma_implementation): Use filename_cmp instead of
      	strcmp.
      	(in_main_input_context): Likewise.
      
      From-SVN: r171522
      Kai Tietz committed
  9. 22 Mar, 2011 1 commit
  10. 16 Mar, 2011 1 commit
    • re PR driver/46944 (gcc should accept -fuse-linker-plugin only if linker handles -plugin) · 55b46574
      	PR lto/46944
      	* configure.ac (gcc_cv_gld_major_version, gcc_cv_gld_minor):
      	Handle in-tree gold.
      	(ld_vers): Extract binutils version for gold.
      	(gcc_cv_ld_hidden): Handle gold here.
      	(gcc_cv_lto_plugin): Determine level of linker plugin support.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* gcc.c: Only use LTO plugin if HAVE_LTO_PLUGIN > 0, reject
      	-fuse-linker-plugin otherwise.
      	(LINK_PLUGIN_SPEC): Define.  Extract from LINK_COMMAND_SPEC.
      	(LINK_COMMAND_SPEC): Use it.
      	(main): Only look for LTOPLUGINSONAME if HAVE_LTO_PLUGIN > 0.
      
      From-SVN: r171039
      Rainer Orth committed
  11. 23 Feb, 2011 1 commit
    • opts-common.c (decode_cmdline_option): Print empty string argument as "" in… · 7fcf46f5
      opts-common.c (decode_cmdline_option): Print empty string argument as "" in decoded->orig_option_with_args_text.
      
      	* opts-common.c (decode_cmdline_option): Print empty string
      	argument as "" in decoded->orig_option_with_args_text.
      	* gcc.c (execute): Print empty string argument as ""
      	in the verbose output.
      	(do_spec_1): Keep empty string argument.
      
      	testsuite/
      	* gcc.dg/cpp/include7.c: New test.
      
      From-SVN: r170426
      Jie Zhang committed
  12. 18 Feb, 2011 1 commit
  13. 17 Feb, 2011 1 commit
  14. 12 Feb, 2011 2 commits
  15. 11 Feb, 2011 1 commit
  16. 31 Jan, 2011 1 commit
    • configure.ac (gcc_cv_ld_static_option): Define. · c6092243
      	gcc:
      	* configure.ac (gcc_cv_ld_static_option): Define.
      	(gcc_cv_ld_dynamic_option): Define.
      	(gcc_cv_ld_static_dynamic): Tru64 UNIX support -noso/-so_archive
      	instead.
      	(HAVE_LD_STATIC_DYNAMIC): Update message.
      	(LD_STATIC_OPTION): Define.
      	(LD_DYNAMIC_OPTION): Define.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* gcc.c (init_spec) [USE_LIBUNWIND_EXCEPTIONS &&
      	HAVE_LD_STATIC_DYNAMIC]: Use them.
      
      	gcc/cp:
      	* g++spec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
      	LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
      
      	gcc/fortran:
      	* gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
      	LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
      
      	gcc/go:
      	* gospec.c (lang_specific_driver) [HAVE_LD_STATIC_DYNAMIC] Use
      	LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
      
      From-SVN: r169435
      Rainer Orth committed
  17. 12 Jan, 2011 1 commit
  18. 08 Jan, 2011 1 commit
    • Makefile.in: Regenerate. · 96bdf9b4
      	* Makefile.in: Regenerate.
      	* Makefile.def (gcc host module) and soft dependency on lto-plugin
      	and configure dependency on lto-plugin configure.
      	(lto-plugin module): Remove dependency on GCC; add dependency on
      	liniberty.
      
      	* doc/invoke.texi: (-flto, -fuse-linker-plugin): Update defaults
      	and no longer claim that gold is required for linker plugin.
      	* configure: Regenerate.
      	* gcc.c (PLUGIN_COND): New macro.
      	(LINK_COMMAND_SPEC): Use it.
      	(main): Default to plugin enabled with HAVE_LTO_PLUGIN is set.
      	* config.in (HAVE_LTO_PLUGIN): New.
      	* configure.ac (--with-lto-plugin): New parameter; autodetect
      	HAVE_LTO_PLUGIN.
      
      From-SVN: r168593
      Jan Hubicka committed
  19. 07 Jan, 2011 1 commit
    • Keep -m[arch|tune]=native in COLLECT_GCC_OPTIONS. · 96f5b137
      2011-01-07  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR driver/42445
      	* gcc.c (%>S): New.
      	(SWITCH_KEEP_FOR_GCC): Likewise.
      	(set_collect_gcc_options): Check SWITCH_KEEP_FOR_GCC.
      	(do_spec_1): Handle "%>".
      
      	* config/i386/i386.h (CC1_CPU_SPEC): Replace "%<" with "%>".
      
      From-SVN: r168583
      H.J. Lu committed
  20. 04 Jan, 2011 1 commit
  21. 03 Jan, 2011 2 commits
    • gcc.c (process_command): Update copyright notice dates. · 9f8e43c0
      gcc/
      	* gcc.c (process_command): Update copyright notice dates.
      	* gcov.c (print_version): Likewise.
      	* gcov-dump.c (print_version): Likewise.
      	* mips-tfile.c (main): Likewise.
      	* mips-tdump.c (main): Likewise.
      gcc/fortran/
      	* gfortranspec.c (lang_specific_driver): Update copyright notice
      	dates.
      gcc/java/
      	* jcf-dump.c (version): Update copyright notice dates.
      libmudflap/
      	* mf-runtime.c (__mf_usage): Update copyright notice dates.
      libjava/
      	* gnu/gcj/convert/Convert.java (version): Update copyright notice
      	dates.
      	* gnu/gcj/tools/gcj_dbtool/Main.java (main): Likewise.
      libjava/classpath/
      	* gnu/java/rmi/registry/RegistryImpl.java (version): Update
      	copyright notice dates.
      	* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
      
      From-SVN: r168432
      Jakub Jelinek committed
    • Revert revision 168407. · 56b721c5
      2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>
      
      	PR driver/47137
      	* gcc.c (main): Revert revision 168407.
      
      From-SVN: r168429
      H.J. Lu committed
  22. 02 Jan, 2011 1 commit
  23. 03 Dec, 2010 3 commits
    • common.opt (N, [...]): New options. · dd9f93dc
      	* common.opt (N, Q, Qn, Qy, Z, n, r, s, t): New options.
      	* gcc.c (cc1_options): Add %{Qy:}.
      
      ada:
      	* gcc-interface/lang.opt (k8): New option.
      
      java:
      	* lang.opt (static-libgcj): New option.
      
      From-SVN: r167429
      Joseph Myers committed
    • gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m. · 12b57b0f
      	* gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m.
      	* config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
      	* config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise.
      
      From-SVN: r167428
      Joseph Myers committed
    • Add Go frontend, libgo library, and Go testsuite. · 7a938933
      gcc/:
      	* gcc.c (default_compilers): Add entry for ".go".
      	* common.opt: Add -static-libgo as a driver option.
      	* doc/install.texi (Configuration): Mention libgo as an option for
      	--enable-shared.  Mention go as an option for --enable-languages.
      	* doc/invoke.texi (Overall Options): Mention .go as a file name
      	suffix.  Mention go as a -x option.
      	* doc/frontends.texi (G++ and GCC): Mention Go as a supported
      	language.
      	* doc/sourcebuild.texi (Top Level): Mention libgo.
      	* doc/standards.texi (Standards): Add section on Go language.
      	Move references for other languages into their own section.
      	* doc/contrib.texi (Contributors): Mention that I contributed the
      	Go frontend.
      gcc/testsuite/:
      	* lib/go.exp: New file.
      	* lib/go-dg.exp: New file.
      	* lib/go-torture.exp: New file.
      	* lib/target-supports.exp (check_compile): Match // Go.
      
      From-SVN: r167407
      Ian Lance Taylor committed
  24. 02 Dec, 2010 1 commit
  25. 30 Nov, 2010 1 commit
  26. 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
  27. 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
  28. 22 Nov, 2010 1 commit
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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