g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option means that libstdc+...
authorGeoffrey Keating <geoffk@apple.com>
Fri, 6 Aug 2004 00:29:17 +0000 (00:29 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Fri, 6 Aug 2004 00:29:17 +0000 (00:29 +0000)
* g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
means that libstdc++ is needed.

From-SVN: r85620

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

index 43ba64936e2c09f172e077fb8cf565063d4550e5..09f671844ae1563ce6ac0a755b0fe9acbd1fbba2 100644 (file)
@@ -1,3 +1,8 @@
+2004-08-05  Geoffrey Keating  <geoffk@apple.com>
+
+       * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
+       means that libstdc++ is needed.
+
 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
 
        * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
index 286134b0e9724a6678c1e56c9f3193c10749f5eb..ec31d81880582dd4b0af5a50cdbf50d46b2cf439 100644 (file)
@@ -164,9 +164,18 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
                }
              saw_speclang = 1;
            }
+         /* Arguments that go directly to the linker might be .o files,
+            or something, and so might cause libstdc++ to be needed.  */
+         else if (strcmp (argv[i], "-Xlinker") == 0)
+           {
+             quote = argv[i];
+             if (library == 0)
+               library = 1;
+           }
+         else if (strncmp (argv[i], "-Wl,", 4) == 0)
+           library = (library == 0) ? 1 : library;
          else if (((argv[i][2] == '\0'
                     && strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
-                   || strcmp (argv[i], "-Xlinker") == 0
                    || strcmp (argv[i], "-Tdata") == 0))
            quote = argv[i];
          else if ((argv[i][2] == '\0'