g++spec.c: Don't add libraries needlessly if -fsyntax-only was given.
authorPhil Edwards <pme@gcc.gnu.org>
Tue, 16 Jan 2001 16:10:47 +0000 (16:10 +0000)
committerPhil Edwards <pme@gcc.gnu.org>
Tue, 16 Jan 2001 16:10:47 +0000 (16:10 +0000)
2001-01-16  Phil Edwards  <pme@sources.redhat.com>

* g++spec.c:  Don't add libraries needlessly if -fsyntax-only
  was given.

From-SVN: r39069

gcc/cp/ChangeLog
gcc/cp/g++spec.c

index bd54df02f4c7c5e3b82a74919a80f8304e348828..4988985dcd42dda30a7ce517a3e9b030c7d9bac2 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-16  Phil Edwards  <pme@sources.redhat.com>
+
+       * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
+         was given.
+
 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
 
        * pt.c (check_nontype_parm): Rename to ...
index 1602ab6b4e05c8ac4ca4624fe571a5d457e2bc65..63787b9f9b190492c691482b3c2c5dfa6ca22d59 100644 (file)
@@ -156,7 +156,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
            quote = argv[i];
          else if (library != 0 && ((argv[i][2] == '\0'
                     && (char *) strchr ("cSEM", argv[i][1]) != NULL)
-                   || strcmp (argv[i], "-MM") == 0))
+                   || strcmp (argv[i], "-MM") == 0
+                   || strcmp (argv[i], "-fsyntax-only") == 0))
            {
              /* Don't specify libraries if we won't link, since that would
                 cause a warning.  */