From bfebeb95c0476a470387d35c7a2e7fce0646d776 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Thu, 25 Jan 2018 16:14:42 -0500
Subject: [PATCH 7/9] FIXME: get rid of lang_specific_extra_outfiles (I think
 this was just used by gcj)

---
 gcc/brig/brigspec.c        | 4 ----
 gcc/c-family/cppspec.c     | 3 ---
 gcc/c/gccspec.c            | 3 ---
 gcc/cp/g++spec.c           | 3 ---
 gcc/fortran/gfortranspec.c | 3 ---
 gcc/gcc.c                  | 6 ++----
 gcc/gcc.h                  | 3 ---
 gcc/go/gospec.c            | 3 ---
 gcc/jit/jit-spec.c         | 3 ---
 9 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/gcc/brig/brigspec.c b/gcc/brig/brigspec.c
index 2c8a3fa..f17abfa 100644
--- a/gcc/brig/brigspec.c
+++ b/gcc/brig/brigspec.c
@@ -130,7 +130,3 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
 /* Called before linking.  Returns 0 on success and -1 on failure.  */
 
 int lang_specific_pre_link (void) /* Not used for Brig.  */ { return 0; }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-
-int lang_specific_extra_outfiles = 0; /* Not used for Brig.  */
diff --git a/gcc/c-family/cppspec.c b/gcc/c-family/cppspec.c
index 6654023..a88a6ff 100644
--- a/gcc/c-family/cppspec.c
+++ b/gcc/c-family/cppspec.c
@@ -195,6 +195,3 @@ int lang_specific_pre_link (void)
 {
   return 0;  /* Not used for cpp.  */
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;  /* Not used for cpp.  */
diff --git a/gcc/c/gccspec.c b/gcc/c/gccspec.c
index a92fa7b..e580ff9 100644
--- a/gcc/c/gccspec.c
+++ b/gcc/c/gccspec.c
@@ -102,6 +102,3 @@ lang_specific_pre_link (void)
 {
   return 0;  /* Not used for C.  */
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;  /* Not used for C.  */
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index 8c81e09..5193b14 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -400,6 +400,3 @@ int lang_specific_pre_link (void)  /* Not used for C++.  */
 {
   return 0;
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;  /* Not used for C++.  */
diff --git a/gcc/fortran/gfortranspec.c b/gcc/fortran/gfortranspec.c
index 7aa2dd7..cfe415a 100644
--- a/gcc/fortran/gfortranspec.c
+++ b/gcc/fortran/gfortranspec.c
@@ -445,6 +445,3 @@ lang_specific_pre_link (void)
 
   return 0;
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;	/* Not used for F77.  */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 514bb58..f4b85cd 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -5674,7 +5674,7 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
 	    if (at_file_supplied)
 	      open_at_file ();
 
-	    for (i = 0; i < n_infiles + lang_specific_extra_outfiles; i++)
+	    for (i = 0; i < n_infiles; i++)
 	      if (outfiles[i])
 		store_arg (outfiles[i], 0, 0);
 
@@ -7998,9 +7998,7 @@ driver::prepare_infiles ()
   /* Make a place to record the compiler output file names
      that correspond to the input files.  */
 
-  i = n_infiles;
-  i += lang_specific_extra_outfiles;
-  outfiles = XCNEWVEC (const char *, i);
+  outfiles = XCNEWVEC (const char *, n_infiles);
 
   /* Record which files were specified explicitly as link input.  */
 
diff --git a/gcc/gcc.h b/gcc/gcc.h
index e3359d3..de44779 100644
--- a/gcc/gcc.h
+++ b/gcc/gcc.h
@@ -82,9 +82,6 @@ extern void lang_specific_driver (struct cl_decoded_option **,
 /* Called before linking.  Returns 0 on success and -1 on failure.  */
 extern int lang_specific_pre_link (void);
 
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-extern int lang_specific_extra_outfiles;
-
 /* A vector of corresponding output files is made up later.  */
 
 extern const char **outfiles;
diff --git a/gcc/go/gospec.c b/gcc/go/gospec.c
index d265fc9..f8218d1 100644
--- a/gcc/go/gospec.c
+++ b/gcc/go/gospec.c
@@ -437,6 +437,3 @@ int lang_specific_pre_link (void)  /* Not used for Go.  */
 {
   return 0;
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;  /* Not used for Go.  */
diff --git a/gcc/jit/jit-spec.c b/gcc/jit/jit-spec.c
index c7f743c..9e65145 100644
--- a/gcc/jit/jit-spec.c
+++ b/gcc/jit/jit-spec.c
@@ -36,6 +36,3 @@ lang_specific_pre_link (void)
 {
   return 0;  /* Not used for jit.  */
 }
-
-/* Number of extra output files that lang_specific_pre_link may generate.  */
-int lang_specific_extra_outfiles = 0;  /* Not used for jit.  */
-- 
1.8.5.3

