aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>1998-09-04 12:58:40 +0000
committerTom Tromey <tromey@gcc.gnu.org>1998-09-04 12:58:40 +0000
commit15c5edb9219bffde7d0eb2c375115271d1621436 (patch)
treea3461dd7c0404ab3c731511cb1f2847c7b234905 /gcc
parentcabc336a5ef33546fa4330972415152e59174ef8 (diff)
downloadgcc-15c5edb9219bffde7d0eb2c375115271d1621436.zip
gcc-15c5edb9219bffde7d0eb2c375115271d1621436.tar.gz
gcc-15c5edb9219bffde7d0eb2c375115271d1621436.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/gcc.c26
2 files changed, 27 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1b93cfd..3e8dedb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
* loop.c (load_mems): Fix JUMP_LABEL field after for_each_rtx call.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 28b6206..f832ae2 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3732,9 +3732,16 @@ do_spec_1 (spec, inswitch, soft_matched_part)
break;
case 'o':
- for (i = 0; i < n_infiles; i++)
- store_arg (outfiles[i], 0, 0);
- break;
+ {
+ int max = n_infiles;
+#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':
obstack_grow (&obstack, OBJECT_SUFFIX, strlen (OBJECT_SUFFIX));
@@ -4984,7 +4991,7 @@ main (argc, argv)
i += lang_specific_extra_outfiles;
#endif
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. */
@@ -5080,9 +5087,14 @@ main (argc, argv)
}
#ifdef LANG_SPECIFIC_DRIVER
- if (error_count == 0
- && lang_specific_pre_link ())
- error_count++;
+ if (error_count == 0)
+ {
+ /* Make sure INPUT_FILE_NUMBER points to first available open
+ slot. */
+ input_file_number = n_infiles;
+ if (lang_specific_pre_link ())
+ error_count++;
+ }
#endif
/* Run ld to link all the compiler output files. */