Patches to give useful error when no files given.
authorJim Wilson <wilson@cygnus.com>
Sat, 18 Apr 1998 15:30:09 +0000 (15:30 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Sat, 18 Apr 1998 15:30:09 +0000 (08:30 -0700)
* g77spec.c (lang_specific_driver): New argument in_added_libraries.
New local added_libraries.  Increment count when add library to
arglist.

From-SVN: r19280

gcc/f/ChangeLog.egcs
gcc/f/g77spec.c

index 7caac66191ac947e71905c1d0b71ec632e1f3c78..15b490cfb9d536543e61575eef71578559def99a 100644 (file)
@@ -1,3 +1,9 @@
+Sat Apr 18 15:26:57 1998  Jim Wilson  <wilson@cygnus.com>
+
+       * g77spec.c (lang_specific_driver): New argument in_added_libraries.
+       New local added_libraries.  Increment count when add library to
+       arglist.
+
 Tue Apr 14 15:51:37 1998  Dave Brolley  <brolley@cygnus.com>
 
        * com.c (init_parse): Now returns char* containing filename;
index 051d5d47f174ff8596e0131b65edea3633a74352..c45b18084186c5c4be4c436c5dd8d1c79c5939af 100644 (file)
@@ -51,10 +51,11 @@ Boston, MA 02111-1307, USA.  */
 extern char *xmalloc PROTO((size_t));
 
 void
-lang_specific_driver (fn, in_argc, in_argv)
+lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
      void (*fn)();
      int *in_argc;
      char ***in_argv;
+     int *in_added_libraries;
 {
   int i, j;
 
@@ -101,11 +102,15 @@ lang_specific_driver (fn, in_argc, in_argv)
   /* The argument list.  */
   char **argv;
 
+  /* The number of libraries added in.  */
+  int added_libraries;
+
   /* The total number of arguments with the new stuff.  */
   int num_args = 1;
 
   argc = *in_argc;
   argv = *in_argv;
+  added_libraries = *in_added_libraries;
 
   args = (int *) xmalloc (argc * sizeof (int));
   bzero ((char *) args, argc * sizeof (int));
@@ -254,11 +259,17 @@ lang_specific_driver (fn, in_argc, in_argv)
 
   /* Add `-lf2c' if we haven't already done so.  */
   if (library)
-    arglist[j++] = FORTRAN_LIBRARY;
+    {
+      arglist[j++] = FORTRAN_LIBRARY;
+      added_libraries++;
+    }
   if (saw_math)
     arglist[j++] = saw_math;
   else if (library)
-    arglist[j++] = MATH_LIBRARY;
+    {
+      arglist[j++] = MATH_LIBRARY;
+      added_libraries++;
+    }
   if (saw_libc)
     arglist[j++] = saw_libc;
 
@@ -266,4 +277,5 @@ lang_specific_driver (fn, in_argc, in_argv)
 
   *in_argc = j;
   *in_argv = arglist;
+  *in_added_libraries = added_libraries;
 }