summaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-18 15:30:09 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-18 15:30:09 +0000
commitb8e046ca760b7b70abaaf36512d0cbec1900e92c (patch)
tree54dd8898d951ddce2e83ccddec031ca0636b33ee /gcc/f
parent5062c82bda39c311d0fa2c4a320107dd79e44736 (diff)
downloadgcc-b8e046ca760b7b70abaaf36512d0cbec1900e92c.tar.gz
Patches to give useful error when no files given.
* g77spec.c (lang_specific_driver): New argument in_added_libraries. New local added_libraries. Increment count when add library to arglist. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog.egcs6
-rw-r--r--gcc/f/g77spec.c18
2 files changed, 21 insertions, 3 deletions
diff --git a/gcc/f/ChangeLog.egcs b/gcc/f/ChangeLog.egcs
index 7caac66191a..15b490cfb9d 100644
--- a/gcc/f/ChangeLog.egcs
+++ b/gcc/f/ChangeLog.egcs
@@ -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;
diff --git a/gcc/f/g77spec.c b/gcc/f/g77spec.c
index 051d5d47f17..c45b1808418 100644
--- a/gcc/f/g77spec.c
+++ b/gcc/f/g77spec.c
@@ -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;
}