Commit Graph

280 Commits

Author SHA1 Message Date
Kaveh R. Ghazi
e9a780ecec c-common.c: Convert to using ctype macros defined in system.h.
* c-common.c: Convert to using ctype macros defined in system.h.
        * c-lex.c: Likewise.
        * cccp.c: Likewise.
        * collect2.c: Likewise.
        * rs6000.c: Likewise.
        * cpplib.c: Likewise.
        * fix-header.c: Likewise.
        * gcc.c: Likewise.
        * gen-protos.c: Likewise.
        * pexecute.c: Likewise.
        * protoize.c: Likewise.
        * rtl.c: Likewise.
        * scan.c: Likewise.
        * stmt.c: Likewise.
        * tlink.c: Likewise.
        * toplev.c: Likewise.

From-SVN: r19579
1998-05-06 12:56:58 +00:00
Bob Manson
10da11319b gcc.c: Add linker spec.
* gcc.c: Add linker spec.
        (link_command_spec): Use %(linker) instead of ld.
        (main): If collect2 is requested as the linker, see if it exists;
        if not, use ld instead.
        * Makefile.in (USE_COLLECT2): It's named collect2 now, not ld.
        (ld:) Deleted.
        (install-collect2): Install as collect2, not ld.
        * configure.in(will_use_collect2): It's named collect2 now.
        * collect2: Remove checks to see if we were invoked recursively.
        (collect_execute): Use _spawnvp under cygwin32.

From-SVN: r19022
1998-04-06 14:51:28 -06:00
Jeffrey A Law
40c3a857ac * collect2.c (is_in_list): Wrap inside COLLECT_EXPORT_LIST ifdef.
From-SVN: r18892
1998-03-29 04:49:10 -07:00
Michael Meissner
c4d38ccb55 Fix warnings from Kaveh R. Ghazi
From-SVN: r18826
1998-03-25 13:17:37 +00:00
Nick Clifton
72cf690274 Add definition of GET_ENVIRONMENT and make prefix_from_env() use it.
From-SVN: r18801
1998-03-24 15:55:46 +00:00
Nick Clifton
1fdb7d9353 Ooops - fixed typo in previous delta
From-SVN: r18800
1998-03-24 14:38:09 +00:00
Nick Clifton
ae8c596367 Support win32 style absolute paths.
Add more debugging.

From-SVN: r18797
1998-03-24 10:49:50 +00:00
Kaveh R. Ghazi
670ee92097 Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
        c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
        caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
        dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
        expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
        integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
        prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
        reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
        rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
        tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
        on system.h.
        * alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
        c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
        caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
        dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
        expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
        integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
        prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
        reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
        rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
        stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
        xcoffout.c: Include system.h.  Organize include ordering so
        that stdarg/varargs comes before other system headers.  Remove
        spurious casts of functions assured of a prototype in system.h.

From-SVN: r18726
1998-03-20 14:58:42 +00:00
Kaveh R. Ghazi
081f5e7e66 Fix more warnings...
* c-lang.c (finish_file): Wrap variable `void_list_node' with macro
        test !ASM_OUTPUT_CONSTRUCTOR || !ASM_OUTPUT_DESTRUCTOR.
        * calls.c (emit_call_1): Wrap variable `already_popped' with macro
        test !ACCUMULATE_OUTGOING_ARGS.
        * collect2.c (write_c_file_glob): Wrap function definition in
        macro test !LD_INIT_SWITCH.
        * combine.c (try_combine): Wrap variables `cc_use' and
        `compare_mode' in macro test EXTRA_CC_MODES.
        * cpplib.c (do_ident): Remove unused variable `len'.
        (skip_if_group): Remove unused variables `at_beg_of_line' and
        `after_ident'.
        (cpp_get_token): Remove unused variable `dummy'.
        * dbxout.c (scope_labelno): Move static variable definition inside
        the one function scope where it is used.
        (dbxout_function_end): Wrap prototype and definition in
        macro test !NO_DBX_FUNCTION_END.
        * dwarf2out.c (add_subscript_info): Wrap variable `dimension_number'
        in macro test !MIPS_DEBUGGING_INFO.
        * expr.c (expand_builtin_setjmp): Move declaration of variable `i'
        into the scope where it is used.  Wrap empty else-statement body
        in braces.
        * fix-header.c: Fix typo in comment.
        (inf_skip_spaces): Cast results of INF_UNGET to (void).
        (check_protection, main): Likewise.
        * flow.c (find_basic_blocks_1): Remove dangling comment text.
        * function.c (contains): Wrap prototype and definition in macro
        test HAVE_prologue || HAVE_epilogue.
        (fixup_var_refs_1): Remove unused variable `width'.
        * gen-protos.c (main): Remove unused variable `optr'.
        * haifa-sched.c (debug_control_flow): Remove unused variable `j'.
        * libgcc2.c (__udiv_w_sdiv): Provide dummy return value of 0.
        (__sjpopnthrow): Remove unused variable `jmpbuf'.
        (__throw): Remove unused variable `val'.
        * protoize.c: Check for a previously existing definition before
        defining *_OK macros.
        * scan-decls.c (scan_decls): Remove unused variable `old_written'.

From-SVN: r18654
1998-03-18 07:18:06 +00:00
Robert Lipe
84bc3b4f02 collect2.c (ldd_file_name): Bracket declaration with same manifests as use.
* collect2.c (ldd_file_name): Bracket declaration with same
        manifests as use.
        (full_real_ld_suffix): Deleted.  Variable was calloced and
        written into, but never read.

From-SVN: r18202
1998-02-23 08:58:16 +00:00
David Edelsohn
e3c49f52e9 collect2.c (scan_prog_file): Completely cover uses of variable `exports' with macro COLLECT_EXPORT_LIST.
* collect2.c (scan_prog_file): Completely cover uses of variable
        `exports' with macro COLLECT_EXPORT_LIST.

From-SVN: r18163
1998-02-22 04:48:22 -05:00
Jason Merrill
b51829099d oops
From-SVN: r18141
1998-02-20 07:31:00 -05:00
Jason Merrill
63f38a9064 oops
From-SVN: r18140
1998-02-20 07:30:20 -05:00
Jason Merrill
c2d731c4e9 * collect2.c (main): Still handle !do_collecting for non-AIX targets.
From-SVN: r18139
1998-02-20 07:28:16 -05:00
David Edelsohn
db126753a6 [multiple changes]
Thu Feb 19 22:36:53 1998  Andrey Slepuhin  <pooh@msu.net>
			  David Edelsohn  <edelsohn@mhpcc.edu>
	* collect2.c (XCOFF_SCAN_LIBS): Remove.
	(export_flag): New variable.
	(export_file): #ifdef COLLECT_EXPORT_LIST.
	(import_file, exports, imports, undefined): New variables.
	(libs, cmdline_lib_dirs, libpath_lib_dirs, libpath, libexts): Same.
	(dump_list, dump_prefix_list, is_in_list): New functions.
	(write_export_file): $ifdef COLLECT_EXPORT_LIST.
	(write_import_file, resolve_lib_name): New functions.
	(use_import_list, ignore_library): Same.
	(collect_exit): maybe_unlink import_file and #ifdef.
	(handler): Same.
	(main): New variable importf, #ifdef exportf.  Move parsing of
 	-shared before general argument parsing.  Resolve AIX library
 	paths and import libgcc.a symbols.  Treat .so shared libraries the
 	same as objects and .a libraries.  Create alias for object_lst and
 	increment it instead of original pointer.  Scan AIX libraries as
 	objects earlier instead of using scan_libraries.  Perform AIX
 	tlink later to resolve templates instead of forking ld.
	(GCC_OK_SYMBOL): Ensure symbol not in undef section.
	(GCC_UNDEF_SYMBOL): New macro.
	(scan_prog_file): Loop for members of AIX libraries.  Handle
 	export/import of ctors/dtors.
	(aix_std_libs): New variable.
	(scan_libraries, XCOFF): Delete.
Fri Feb 19 22:36:52 1998  Robert Lipe   <robertl@dgii.com>
	* collect2.c (full_real_ld_suffix): #ifdef CROSS_COMPILE.

From-SVN: r18128
1998-02-19 14:41:03 -05:00
Jeffrey A Law
f9a366acb5 Remove this change until we can fix it correctly.
* collect2.c: Bracket declaration of 'exportf' and
        'full_real_ld_suffix'.

From-SVN: r18062
1998-02-18 01:07:59 -07:00
Robert Lipe
2e6a59892b Rats. Forgot to change copyrights on the first commit.
From-SVN: r17902
1998-02-13 05:40:34 +00:00
Robert Lipe
69d4ca36f4 c-lang.c (finish_file): Bracket declaration of static_ctors, static_dtors.
* c-lang.c (finish_file): Bracket declaration of static_ctors,
	static_dtors.
	* calls.c (expand_call): Bracket declaration of 'rtx_before_call',
	'old_stack_arg_under_construction'
	(emit_library_call): Bracket declaration of 'upper_bound',
	'lower_bound', 'i', 'reg_parm_stack_space'
	(emit_library_call_value): Likewise.
	(store_one_arg):
	* collect2.c: include <unistd.h> when appropriate.
	Bracket declaration of 'exportf' and 'full_real_ld_suffix'.
	* emit-rtl.c (prev_cc0_setter): Remove unused variable 'link'.
	* explow.c (plus_constant_for_output_wide): Remove unused variable
	'code'.
	(memory_address): Remove unused variable 'orig_x'.
	* genattrtab.c (make_canonical): Remove unreferenced label 'cond:'.
	(write_const_num_delay_slots): Remove unused variable 'i'.
	* genopinit.c (main): Remove unused variables 'dummy', 'insn_ptr'.
	(gen_insn): Remove unused variable 'obstack_ptr'.
        * libgcc2.c (__bb_exit_func): Remove unused variables 'ret',
        'j', 'tmp', 'i'.
	(__bb_exit_trace_func): Remove unused variable 'e'.
	* optabs.c (expand_binop): remove unused variables 'lhs', 'rhs',
	'funexp'.
	(expand_unop): Remove unused variable 'funexp'.
	(expand_complex_abs): Remove unused variable 'funexp'.
	(init_optabs): Bracket declaration of 'j'.
	(init_complex_libfuncs): Deleted.  Dead static function.
	* profile.c (branch_prob): Remove unused variables 'insn', 'dest'.
	* reg-stack.c: Fix typo in proto for 'get_asm_operand_lengths'
	(reg_to_stack): 'initialized', 'before_function_beg'
	explictly type as ints instead of defaulting.
	(emit_swap_insn): Remove unused variable 'i2'.
	(compare_for_stack_reg): Remove unused variable 'src_note'.
	* rtlanal.c (computed_jump_p): Remove unused variable 'computed_jump'.
	* sched.c (actual_hazard): Bracket declaration of 'this_cost'.
	* stmt.c (add_case_node): Add parens for assignment used as truth.
	(all_cases_count):  Remove unused variable 'count_high'.
	(mark_seen_cases): Remove unused variable 'i'.
	(check_for_full_enumeration_handling): Remove unused variable 't'.
	Bracket declaration of  'all_values', 'l'.
	* tlink.c: Include <stdlib.h>, <unistd.h>, <string.h>/<strings.h>.
	* varasm.c (assemble_string): Remove unused variable 'i'.
	(immed_double_const): Remove unused variable 'in_current_obstack'.
	(immed_real_const_1): Likewise.
	(output_constant_pool): Remove unreferenced label 'done'.
	(output_constant): Remove unused variable 'x'.
        * i386/i386.h (ENCODE_SECTION_INFO): TREE_PUBLIC is an int, not
        a string.
        * i386/sco5.h (ASM_OUTPUT_ASCII): Add parens for assignment used
        as truth.

From-SVN: r17901
1998-02-13 05:30:56 +00:00
Kaveh R. Ghazi
1d300e19b6 bitmap.c (bitmap_clear): Ensure `inline' is at the beginning of the declaration.
* bitmap.c (bitmap_clear): Ensure `inline' is at the beginning
        of the declaration.
        * c-decl.c (finish_decl): Use parentheses around && within ||.
        * rtl.c: Include stdlib.h.
        (read_skip_spaces): Add parentheses around assignments used as
        truth values.
        (read_rtx): Initialize list_rtx.
        * cppexp.c (parse_number): Use || when operands are truth values.
        * alias.c (find_base_value): Add default case.
        (memrefs_conflict): Likewise.
        * combine.c (sets_function_arg_p): Likewise.
        * genemit.c (gen_exp): Likewise.
        * local-alloc.c (contains_replace_regs): Likewise.
        * rtlanal.c (jmp_uses_reg_or_mem): Likewise.
        * fold-const.c (fold_convert): Use "&&" for truth values.
        (fold): Add default case.
        * sdbout.c (sdbout_field_types): Fix typo in declaration.
        (sdbout_one_type): Add default case.
        * alpha.c (alpha_sa_mask): Prototype only if OPEN_VMS.
        (some_operand): Add default case.
        (input_operand): Likewise.
        (signed_comparison_operator): Likewise.
        (divmod_operator): Likewise.
        (alpha_set_memflags_1): Likewise.
        * reload1.c (reload_cse_simplify_operands): Ensure function
        always returns a value.
        * scan-decls.c (scan_decls): Likewise.
        * c-lex.c (skip_white_space): Fix typo in declaraion.
        * c-typeck.c (comp_target_types): Add parentheses around assignment
        used as truth value.
        (print_spelling): Likewise.
        (constructor_implicit, constructor_result): Remove unused variables.
        * collect2.c (scan_library): Protect prototype with
        #ifdef SCAN_LIBRARIES.
        * emit-rtl.c (find_line_note): Fix typo in declaration.
        * final.c (asm_insn_count): Protect prototype with
        #ifdef HAVE_ATTR_length.
        * flow.c (find_auto_inc): Protect prototype with #ifdef AUTO_INC_DEC.
        (try_pre_increment_1, try_pre_increment): Likewise.
        * regclass.c (auto_inc_dec_reg_p): Protect prototype with
        #ifdef FORBIDDEN_INC_DEC_CLASSES.  Make return type explicit.
        * gcov-io.h (__store_long, __write_long, __read_long): Fix
        unsigned/signed comparisons.
        * gcov.c (read_files): Remove unused "first_type" variable.
        (scan _for_source_files): Initialize s_ptr.
        (function_summary): Eliminate "%lf" formatting, use %ld for
        longs.
        (output_data): Initialize branch_probs and last_line_num.
        Eliminate "%lf" formatting, use "%ld" for longs.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r17158
1997-12-20 04:31:54 -07:00
Jeff Law
a3fd4e7530 frame.h (__register_frame, [...]): New.
* frame.h (__register_frame, __register_frame_table,
        __deregister_frame): New.
        * frame.c (__register_frame, __register_frame_table,
        __deregister_frame): New.
        * frame.c (__deregister_frame_info): Return void *.
        * frame.h (__deregister_frame_info): Ditto.
        * collect2.c (__deregister_frame_info): Ditto.

From-SVN: r17113
1997-12-15 16:28:44 -07:00
Jeff Law
6d8ccdbbb2 Bring over changes from latest gcc-2.8 pre-release.
Mirror sched.c change into haifa-sched.c

From-SVN: r17097
1997-12-15 00:05:04 -07:00
Paul Eggert
5a5ab947b8 collect2.c (write_c_file_glob): Allocate initial frame object in static storage and pass its address.
* collect2.c (write_c_file_glob): Allocate initial frame object
        in static storage and pass its address.

From-SVN: r17066
1997-12-12 00:37:57 -07:00
Jeff Law
14cd4d23c8 Updates from gcc-2.8 test tarball to current gcc-2.8 tarball.
From-SVN: r17002
1997-12-07 18:42:52 -07:00
Jeff Law
956d69504d Merge from gcc-2.8
From-SVN: r16987
1997-12-06 17:31:01 -07:00
Jeff Law
e9a25f70a0 Update mainline egcs to gcc2 snapshot 971021.
From-SVN: r16278
1997-11-02 14:19:36 -07:00
Jason Merrill
0021b564f4 dwarf2 EH support
From-SVN: r15255
1997-09-10 14:00:28 -04:00
Jeffrey A Law
a63d08e606 cccp.c (sys_errlist): Remove special 4.4bsd declaration.
* cccp.c (sys_errlist): Remove special 4.4bsd declaration.
        * collect2.c (sys_errlist): Likewise.
        * cpplib.c (sys_errlist): Likewise.
        * gcc.c (sys_errlist): Likewise.
        * protoize (sys_errlist): Likewise.
        * configure.in: Check for strerror.
        * xm-freebsd.h (HAVE_STRERROR): Remove definition.
        * xm-gnu.h (HAVE_STRERROR): Likewise.
        * xm-linux.h (HAVE_STRERROR): Likewise.
        * xm-netbsd.h (HAVE_STRERROR): Likewise.
        * xm-bsd386.h (HAVE_STRERROR): Likewise.
        * xm-cygwin32.h (HAVE_STRERROR): Likewise.
        * xm-dos.h (HAVE_STRERROR): Likewise.
        * xm-mingw32.h (HAVE_STRERROR): Likewise.
        * xm-pa.h (HAVE_STRERROR): Likewise.
        * xm-papro.h (HAVE_STRERROR): Likewise.
        * xm-sysv4.h (HAVE_STRERROR): Likewise.
        * configure, config.in: Rebuilt.
Remove the need to define HAVE_STRERROR for each host port.

From-SVN: r15011
1997-09-01 11:02:53 -06:00
Jeffrey A Law
e3512ac291 collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
* collect2.c: Change DONT_DECLARE_SYS_SIGLIST to SYS_SIGLIST_DECLARED.
        * mips-tfile.c: Likewise.
        * gcc.texi: DONT_DECLARE_SYS_SIGLIST: Remove docs.
        * xm-linux.h (DONT_DECLARE_SYS_SIGLIST): Delete definition.
        * xm-freebsd.h, xm-bsd386.h, xm-sysv4.h, xm-sol2.h: Likewise.
        * configure.in: Check for sys_siglist declaration.
        * configure, config.in: Rebuilt.

Fix conflicting sys_siglist decls once and for all.

From-SVN: r15007
1997-09-01 08:57:29 -06:00
Jeffrey A Law
aa32d84158 * Integrate tlink patch from jason@cygnus.com
* gcc.c (SWITCH_TAKES_ARG): Add 'V', 'B' and 'b'.
        (process_command): Increment n_switches for them.  Don't discard
        their args.  Validate them.
        (main): Escape " marks when creating COLLECT_GCC_OPTIONS.
        From Rohan Lenard.
        (process_command): Set include_prefixes from COMPILER_PATH.
        (main): Set COLLECT_GCC_OPTIONS sooner.
        * confiugre.in: Link ../ld/ld.new to collect-ld rather than real-ld.
        * tlink.c, hash.c, hash.h: New files.
        * Makefile.in (USE_COLLECT2): Always use collect2.
        (collect2): Depend on and link in hash.o and tlink.o.
        (tlink.o, hash.o): Add dependencies.

tlink patches from Jason.

From-SVN: r14769
1997-08-11 14:23:53 -06:00
Jason Merrill
b9550223b3 x
From-SVN: r14251
1997-06-17 03:45:20 +00:00
Jason Merrill
41e1683509 x
From-SVN: r14225
1997-06-10 22:23:32 +00:00
Richard Kenner
c7063b9a37 (fatal_perror, fatal, collect_wait): Use FATAL_EXIT_CODE.
From-SVN: r13885
1997-04-13 14:19:48 -04:00
Brendan Kehoe
664041e68b collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with `extern "C" { ...
* collect2.c (write_c_file): Wrap the ctor/dtor lists and fns with
	`extern "C" { ... }', to avoid having the fn names mangled with
	the C++ driver.

From-SVN: r13288
1996-12-11 18:58:22 -05:00
Richard Kenner
1c84128d89 (dump_file): Call fclose() for opened files.
From-SVN: r13033
1996-10-26 11:37:57 -04:00
Richard Kenner
9c51dc9c34 (at SUNOS4_SHARED_LIBRARIES): Fix reference to unistd.h.
From-SVN: r12392
1996-07-03 18:23:08 -04:00
Mike Stump
0f41302f47 formatting tweaks
From-SVN: r12390
1996-07-03 22:07:53 +00:00
Mike Stump
d6b0bb68f0 formatting tweaks
From-SVN: r12387
1996-07-03 18:43:21 +00:00
Jim Wilson
421a668df6 (handler): Delete export_file when we get a signal.
From-SVN: r11881
1996-04-24 14:46:55 -07:00
Doug Evans
f79e14e39d collect2.c: #include "gansidecl.h".
* collect2.c: #include "gansidecl.h".
	(const,PROTO): Delete.
	(P_tmpdir): Delete.
	(choose_temp_base): Declare as extern, delete internal copy.
	(main): Update call to choose_temp_base.

From-SVN: r11789
1996-04-15 17:49:08 +00:00
Richard Kenner
e1c2b28d21 (main): Check new define DEFAULT_A_OUT_NAME.
From-SVN: r11426
1996-03-04 18:39:47 -05:00
Richard Kenner
e2616dde30 Never include wait.h.
From-SVN: r11405
1996-03-04 08:23:11 -05:00
David Edelsohn
bc9fadfb1c append / to AIX import path if not present
From-SVN: r11275
1996-02-14 19:35:33 +00:00
Michael Meissner
d95188571b Fix recogniztion of import libraries under AIX
From-SVN: r10952
1996-01-07 22:14:58 +00:00
Jason Merrill
f8b90ffd5c remove auto_export functionality.
From-SVN: r10907
1995-12-30 16:21:50 +00:00
Richard Kenner
ac1bc2ca68 (scan_libraries): cast lsyms' alloca() to LDSYM*.
From-SVN: r10324
1995-09-12 13:09:33 -04:00
Richard Kenner
abc95ed36d Fix spelling errors.
From-SVN: r10289
1995-08-28 06:54:22 -04:00
Richard Kenner
1a8463c91b (XCOFF_SCAN_LIBS): Define if OBJECT_FORMAT_COFF and XCOFF_DEBUGGING_FORMAT.
(SCAN_LIBRARIES): Also define if XCOFF_SCAN_LIBS.
(scan_libraries): Implement for AIX.

From-SVN: r10207
1995-07-29 16:19:33 -04:00
Richard Kenner
47d1946b29 (end_file): Fix typo in error message text.
From-SVN: r10174
1995-07-26 10:15:44 -04:00
Richard Kenner
3689b50734 (libcompare): Verify that file name extensions are valid.
Put files with invalid extensions last in the sort.

From-SVN: r10103
1995-07-01 21:27:00 -04:00
Richard Kenner
245c3e25d6 (locatelib): Fix parsing of LD_LIBRARY_PATH.
From-SVN: r10024
1995-06-22 18:19:01 -04:00
Richard Kenner
eccd41bbdd (main): Unlink export_file before we return.
From-SVN: r10022
1995-06-22 18:03:38 -04:00
Richard Kenner
940d9d638b Update FSF address.
From-SVN: r9959
1995-06-15 07:33:25 -04:00
Richard Kenner
603b4064ce (main): Don't turn off auto_export because of -g.
(main): Ignore the argument to -o.
(main): Place o_file after an initial .o (like crt0.o).
If we have LD_INIT_SWITCH, use init and fini functions for
executables, too.  Specify the unique function names.
(write_c_file_stat): Fix the case of destructors but no constructors.
Don't include the generic-named functions for executables.
(write_c_file): If we have LD_INIT_SWITCH, always use write_c_file_stat.
(main): Also add _GLOBAL__D? to export list.

From-SVN: r9956
1995-06-14 22:21:06 -04:00
Richard Kenner
d36c3fe262 (COFF scan_prog_file): Use the AIX duplicate entry.
From-SVN: r9898
1995-06-07 05:06:35 -04:00
Richard Kenner
c102bba010 #include config.h before any other .h file.
From-SVN: r9756
1995-05-20 07:16:51 -04:00
Richard Kenner
dca0093028 (strstr): Deleted.
From-SVN: r9746
1995-05-19 17:46:07 -04:00
Richard Kenner
ddd5a7c180 Fix typos in comments.
From-SVN: r9711
1995-05-16 08:14:26 -04:00
Jason Merrill
27a2e668fd Define strstr.
From-SVN: r9696
1995-05-16 00:57:31 +00:00
Jason Merrill
cbbbd91755 AIX shared libraries
From-SVN: r9595
1995-05-09 10:21:13 +00:00
Jason Merrill
a31844688a Make collect demangle
From-SVN: r9573
1995-05-04 21:25:31 +00:00
Richard Kenner
96317659b6 Removed __NetBSD__ from conditional.
Declare strerror if HAVE_STRERROR is defined; otherwise declare sys_errlist
and sys_nerr.

From-SVN: r9043
1995-02-22 20:28:17 -05:00
Jason Merrill
28aaf32b33 Update SunOS 4 code
From-SVN: r9041
1995-02-23 01:23:53 +00:00
Jason Merrill
9f21696b10 Fix collecting under AIX
From-SVN: r8933
1995-02-13 20:21:44 +00:00
Jason Merrill
35e530c58f Improve PA shlib support
From-SVN: r8792
1995-01-24 02:52:44 +00:00
Jason Merrill
68d69835ac Shared library support.
From-SVN: r8519
1994-11-19 04:09:58 +00:00
Jason Merrill
0393b857b1 (add_to_list): Check for duplicates.
From-SVN: r8328
1994-10-20 22:06:20 +00:00
Jason Merrill
90d326bda2 (scan_prog_file): Call COLLECT_QUALIFY_MATCH to do target-specific checking of the suitability of a match.
(scan_prog_file): Call COLLECT_QUALIFY_MATCH to do
        target-specific checking of the suitability of a match.
        (main): Check REAL_*_FILE_NAME first.

From-SVN: r8317
1994-10-19 22:09:20 +00:00
Richard Kenner
aae807c0f4 (my_strerror): If HAVE_STRERROR defined, call strerror.
From-SVN: r8239
1994-10-07 19:09:12 -04:00
Ian Lance Taylor
0b90f9c2dc If the POSIX.1 wait macros are defined, use them.
From-SVN: r8213
1994-10-04 20:53:02 +00:00
Jason Merrill
2d5e74ca04 (main): Ignore options in COLLECT_SUPPRESS_OPTIONS
for the first link.

From-SVN: r8153
1994-09-28 00:11:31 +00:00
Jason Merrill
eeed1288b8 (main): Discard the first executable once we've
exploited it.

From-SVN: r8122
1994-09-22 17:14:46 +00:00
Richard Kenner
bd1a74b1a7 (fatal_perror, fatal, error): Declare all args as char *.
From-SVN: r8078
1994-09-13 14:11:09 -04:00
Charles Hannum
842a1144f2 Do the 4.4BSD sys_errlist modification for NetBSD also.
From-SVN: r7707
1994-07-11 19:03:10 +00:00
Richard Kenner
4c9a05bc55 Cast pointer operands to bzero, bcopy, and bcmp to (char *).
From-SVN: r7472
1994-06-14 18:19:28 -04:00
Richard Kenner
0dd4a7035f (putenv): Remove decl of unused variable STR_LEN.
(main): Remove decls of unused variables LEN and CLEN.

From-SVN: r6875
1994-03-25 13:57:48 -05:00
Richard Kenner
eadbc96110 (dup2): Catch dup() failure. Return correct value.
From-SVN: r6740
1994-03-10 15:23:01 -05:00
Richard Kenner
4b19dee8c6 ([__MSDOS__]): Use #ifdef, not #if.
From-SVN: r6739
1994-03-10 15:18:00 -05:00
Jim Wilson
1b7ca66047 (sys_siglist): Don't declare if DONT_DECLARE_SYS_SIGLIST is defined.
From-SVN: r6494
1994-02-06 13:31:38 -08:00
Richard Kenner
b3a2ef9465 (main): When searching compiler directories, look for ld_suffix, not
full_ld_suffix.

From-SVN: r6280
1993-12-23 08:17:07 -05:00
Jim Wilson
5d672cd7e6 (sys_errlist): Conditionalize declaration for BSD 4.4.
From-SVN: r5843
1993-10-20 16:20:09 -07:00
Michael Meissner
357a98f13e Fix typo.
From-SVN: r5570
1993-10-03 23:36:06 +00:00
Richard Kenner
4d1a011f56 Add prototypes to static declarations.
(PROTO): New macro.
(dup2, putenv): Functions return integers; add type and returns.

From-SVN: r5560
1993-10-02 14:07:37 -04:00
Doug Evans
588e387f14 (main): Provide upward compatibility with old version
of collect (avoids infinite mutual recursion between the two).

From-SVN: r5307
1993-09-11 20:46:39 +00:00
Doug Evans
7223feb046 collect2.c (our_file_name, [...]): deleted.
* collect2.c (our_file_name, last_file_name): deleted.
        (our_file_names): New variable.
        (is_in_prefix_list): New function.
        (find_a_file): Call is_in_prefix_list.
        (main): Make COLLECT_NAMES a list of our invocations.
        If we've invoked ourselves, try again with ld_file_name.

From-SVN: r5262
1993-09-05 22:20:29 +00:00
Mike Stump
5555d6d103 collect2.c (is_ctor_dtor): Make sizeof argument match the string.
* collect2.c (is_ctor_dtor): Make sizeof argument match the
        string.

From-SVN: r5239
1993-09-01 22:06:56 +00:00
Richard Stallman
b31a1e3f17 (handler): Check whether c_file and o_file are 0.
From-SVN: r5073
1993-08-05 04:06:59 +00:00
Richard Stallman
d6cf318765 (NAME__MAIN, SYMBOL__MAIN): Add default definitions.
(write_c_file, scan_prog_file(OSF/ROSE)): Use them instead of explicit
__main.

From-SVN: r4990
1993-07-26 20:58:04 +00:00
Richard Stallman
c52d2678ed Finish last change.
From-SVN: r4948
1993-07-21 03:41:16 +00:00
Richard Stallman
cf0fc80a45 (is_ctor_dtor): Delete leading _'s from sym names
in `special' table, in neither-dots-nor-dollars case.

From-SVN: r4947
1993-07-21 03:36:21 +00:00
Richard Stallman
0d8c1ccd98 (main): Allocate COLLECT_NAME string with xmalloc.
From-SVN: r4902
1993-07-10 21:38:19 +00:00
Ian Lance Taylor
f820b89885 Search for ld in the compiler directories.
From-SVN: r4872
1993-07-07 18:20:25 +00:00
Jim Wilson
cf0c751a4f (fork_execute, scan_prog_file): Use "fork" in error
messages instead of "vfork" when vfork is defined to fork.

From-SVN: r4871
1993-07-07 10:40:32 -07:00
Richard Stallman
626e18ea3f (error, fatal, fatal_perror): Say collect2, not collect.
From-SVN: r4839
1993-07-04 18:02:51 +00:00
Doug Evans
6c61ac77c0 (main): Give ld_file_name an initial value.
From-SVN: r4835
1993-07-03 20:40:36 +00:00
Richard Stallman
985525245a (main): Don't look for gld' or TARGET-gld'.
From-SVN: r4805
1993-06-30 19:02:44 +00:00
Richard Stallman
46c74083c3 (main): Use TARGET-gcc, not gcc-TARGET.
(main) [CROSS_COMPILE]: Use TARGET-TOOL for full_...

From-SVN: r4563
1993-05-25 03:10:36 +00:00
Richard Stallman
a1549b15ed (main): For -debug, if ..._file_name is a null pointer,
say so instead of crashing.

From-SVN: r4530
1993-05-21 19:55:25 +00:00
Richard Kenner
8ab861c702 (main, scan_prog_file): Don't call signal on signal names that aren't
defined.

From-SVN: r4135
1993-04-13 17:07:04 -04:00
Richard Stallman
0cdd3dddae (output_file): New static var.
(main): Set output_file.
(my_exit): Delete output_file on failure.

From-SVN: r3777
1993-03-18 21:17:20 +00:00
Richard Stallman
bd814d9779 (main): Use strlen, not sizeof, for our_file_name.
From-SVN: r3617
1993-03-03 04:43:37 +00:00
Richard Stallman
7cbfceab52 (is_ctor_dtor): Handle NO_DOT_IN_LABEL.
From-SVN: r3538
1993-02-26 06:34:41 +00:00
Richard Kenner
aee3a549b0 (find_a_file): Always reject "./ld".
(main): Pass short name of program as first arg to fork_execute; ensure
argv[0] always gets filename.
(fork_execute): Print name for diagnostic from PROG; filename comes from
argv[0].

From-SVN: r3463
1993-02-11 14:41:46 -05:00
Richard Kenner
45840c57d7 (putenv): New function, copied from gcc.c.
(last_file_name): New variable.
(find_a_file): Ignore name in last_file_name too.
(main): Look at name in COLLECT_NAME and set it to the name we were called
with.
Pass filename used for ld to ld as argv[0].

From-SVN: r3461
1993-02-11 05:55:22 -05:00
Richard Kenner
7243ba7d92 Delete ISCOFF macro which was in #ifdef _AIX.
From-SVN: r3363
1993-01-27 06:46:40 -05:00
Brendan Kehoe
c7af43d8b3 collect2.c (write_list_with_asm): Use __asm__' instead of asm', to avoid problems with `-fno-asm'.
* collect2.c (write_list_with_asm): Use `__asm__' instead of
        `asm', to avoid problems with `-fno-asm'.

From-SVN: r3351
1993-01-26 17:14:37 -05:00
Richard Stallman
e8fda1f96b (find_a_file): First `access' test was backwards.
(main): Set full_real_ld_suffix right.

From-SVN: r3346
1993-01-26 06:58:09 +00:00
Richard Kenner
720653a39b (our_file_name): New variable.
(find_a_file): Ignore filename equal to that in our_file_name.
(main): Initialize our_file_name.

From-SVN: r3299
1993-01-22 07:56:23 -05:00
Richard Kenner
aee42e2745 (choose_temp_base, main): Fix "off by one" errors in sizes of
allocated strings.

From-SVN: r3261
1993-01-18 06:23:11 -05:00
Richard Stallman
bb59f9a64b (main): Look for real-ld' after gld', before `ld'.
Fix typo in -debug part of previous change.


Look for tools using paths rather than a single prefix.
(struct prefix_list, struct path_prefix): New structures.
(cpath, path): New variables.
(find_a_file, add_prefix): New functions; simplified versions of
functions from gcc.c.
(prefix_from_env): New function.
(main): Get path to search for binaries from COMPILER_PATH
environment variable always set by gcc.c and from PATH.
Qualify names with target machine in cross-environment unless
using compiler directories.
Use find_a_file to find our binaries.
Remove use of single prefix.
If -debug, print strip_file_name.
(fork_execute): Print program we are trying to execute if -debug and
we can't find the file.
(scan_prog_file): Complain if can't find nm.

From-SVN: r3052
1993-01-02 08:32:09 +00:00
Richard Stallman
033ba47ced (FREAD, FWRITE): Undef these macros if they were defined
before including ldfcn.h.

From-SVN: r2780
1992-11-23 22:46:14 +00:00
Richard Stallman
5365d6ee18 (main): If COLLECT_GCC is a relative name, use it anyway.
From-SVN: r2467
1992-10-15 06:11:01 +00:00
Jim Wilson
915ee62371 (main): Only install a signal handler for signals that already have handlers.
(main): Only install a signal handler for signals
that already have handlers.
(fork_execute): Don't ignore signals before calling do_wait.

From-SVN: r2436
1992-10-13 11:24:57 -07:00
Richard Stallman
7a646ee5a3 Fix typo in last change.
From-SVN: r1865
1992-08-17 07:58:51 +00:00
Richard Stallman
c1af03468d (is_ctor_dtor): Don't collect cfront init fcns.
From-SVN: r1864
1992-08-17 07:58:06 +00:00
Richard Stallman
f28e8a6876 entered into RCS
From-SVN: r1697
1992-07-28 02:18:03 +00:00
Charles Hannum
5f4f0e2294 *** empty log message ***
From-SVN: r1471
1992-07-06 20:04:00 +00:00
Richard Stallman
e99467d2ed *** empty log message ***
From-SVN: r1360
1992-06-30 04:05:47 +00:00
Mike Stump
3f7cc57ab8 *** empty log message ***
From-SVN: r1341
1992-06-29 19:15:14 +00:00
Richard Stallman
f72aed244a *** empty log message ***
From-SVN: r1263
1992-06-24 03:59:40 +00:00
Richard Stallman
7c0891a18f *** empty log message ***
From-SVN: r1212
1992-06-18 19:27:56 +00:00
Michael Meissner
f3c3d3df9c *** empty log message ***
From-SVN: r1185
1992-06-10 19:25:16 +00:00
Richard Stallman
629af8db53 *** empty log message ***
From-SVN: r1168
1992-06-05 23:03:21 +00:00
Richard Stallman
e6701a475f *** empty log message ***
From-SVN: r1099
1992-05-27 20:06:15 +00:00
Richard Stallman
cd4f4a28dd *** empty log message ***
From-SVN: r965
1992-05-13 01:24:47 +00:00
Jim Wilson
177048466a *** empty log message ***
From-SVN: r917
1992-05-06 14:25:13 -07:00
Michael Meissner
a87104d913 *** empty log message ***
From-SVN: r840
1992-04-27 16:50:26 +00:00
Richard Stallman
aaf625e5fa *** empty log message ***
From-SVN: r677
1992-04-04 06:49:57 +00:00
Richard Stallman
1fab8e8107 *** empty log message ***
From-SVN: r656
1992-04-01 05:06:34 +00:00
Richard Stallman
ed5b946218 *** empty log message ***
From-SVN: r529
1992-03-19 22:07:22 +00:00
Richard Stallman
4e81a331e8 Initial revision
From-SVN: r287
1992-02-06 22:06:40 +00:00