gcc.c (do_spec_1): [case 'o'] Account for lang_specific_extra_outfiles.

* gcc.c (do_spec_1): [case 'o'] Account for
        lang_specific_extra_outfiles.
        (main): Correctly clear all slots in outfiles for
        lang_specific_extra_outfiles.  Set input_file_number before
        calling lang_specific_pre_link.

From-SVN: r22234
This commit is contained in:
Tom Tromey 1998-09-04 12:58:40 +00:00 committed by Tom Tromey
parent cabc336a5e
commit 15c5edb921
2 changed files with 27 additions and 7 deletions

View File

@ -1,3 +1,11 @@
Fri Sep 4 11:57:50 1998 Tom Tromey <tromey@cygnus.com>
* gcc.c (do_spec_1): [case 'o'] Account for
lang_specific_extra_outfiles.
(main): Correctly clear all slots in outfiles for
lang_specific_extra_outfiles. Set input_file_number before
calling lang_specific_pre_link.
Fri Sep 4 10:37:07 1998 Jim Wilson <wilson@cygnus.com> Fri Sep 4 10:37:07 1998 Jim Wilson <wilson@cygnus.com>
* loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call. * loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call.

View File

@ -3732,9 +3732,16 @@ do_spec_1 (spec, inswitch, soft_matched_part)
break; break;
case 'o': case 'o':
for (i = 0; i < n_infiles; i++) {
store_arg (outfiles[i], 0, 0); int max = n_infiles;
break; #ifdef LANG_SPECIFIC_DRIVER
max += lang_specific_extra_outfiles;
#endif
for (i = 0; i < max; i++)
if (outfiles[i])
store_arg (outfiles[i], 0, 0);
break;
}
case 'O': case 'O':
obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX)); obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
@ -4984,7 +4991,7 @@ main (argc, argv)
i += lang_specific_extra_outfiles; i += lang_specific_extra_outfiles;
#endif #endif
outfiles = (char **) xmalloc (i * sizeof (char *)); outfiles = (char **) xmalloc (i * sizeof (char *));
bzero ((char *) outfiles, n_infiles * sizeof (char *)); bzero ((char *) outfiles, i * sizeof (char *));
/* Record which files were specified explicitly as link input. */ /* Record which files were specified explicitly as link input. */
@ -5080,9 +5087,14 @@ main (argc, argv)
} }
#ifdef LANG_SPECIFIC_DRIVER #ifdef LANG_SPECIFIC_DRIVER
if (error_count == 0 if (error_count == 0)
&& lang_specific_pre_link ()) {
error_count++; /* Make sure INPUT_FILE_NUMBER points to first available open
slot. */
input_file_number = n_infiles;
if (lang_specific_pre_link ())
error_count++;
}
#endif #endif
/* Run ld to link all the compiler output files. */ /* Run ld to link all the compiler output files. */