summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-18 15:26:22 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-18 15:26:22 +0000
commit5062c82bda39c311d0fa2c4a320107dd79e44736 (patch)
tree5c395652a6c5a355ad2cd0134e95c2e36bd6a37f /gcc/cp
parent367242d3da71d3774f5cf58898e561dcf7bdc2d8 (diff)
downloadgcc-5062c82bda39c311d0fa2c4a320107dd79e44736.tar.gz
Patches to give useful error when no files specified.
* g++spec.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@19279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/g++spec.c19
2 files changed, 21 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 3d8f991a4e9..3e277e232ec 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
+
+ * g++spec.c (lang_specific_driver): New argument in_added_libraries.
+ New local added_libraries. Increment count when add library to
+ arglist.
+
Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
* cp-tree.h (type_as_string_real): New function.
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index 105e03c885f..0d1b7c054a8 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -38,10 +38,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;
@@ -88,12 +89,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));
@@ -231,11 +235,17 @@ lang_specific_driver (fn, in_argc, in_argv)
/* Add `-lstdc++' if we haven't already done so. */
if (library)
- arglist[j++] = "-lstdc++";
+ {
+ arglist[j++] = "-lstdc++";
+ 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;
@@ -243,4 +253,5 @@ lang_specific_driver (fn, in_argc, in_argv)
*in_argc = j;
*in_argv = arglist;
+ *in_added_libraries = added_libraries;
}