aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-09-28 22:43:11 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-09-28 22:43:11 +0000
commit078208ebefcad46f0fd8e0c559d8c6b411ee4726 (patch)
tree1541e45b2855d35002e6551729591b0e2cf50573 /gcc
parent252d78843b30f364b18cf7c9771147195e32e2b4 (diff)
downloadgcc-078208ebefcad46f0fd8e0c559d8c6b411ee4726.zip
gcc-078208ebefcad46f0fd8e0c559d8c6b411ee4726.tar.gz
gcc-078208ebefcad46f0fd8e0c559d8c6b411ee4726.tar.bz2
re PR driver/17537 (g++ not passing -lstdc++ to linker when -l is only supplied)
PR driver/17537 * g++spec.c (lang_specific_driver): Unrecognized libraries, other than -lc and -lm, may require linking against libstc++. From-SVN: r88256
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/g++spec.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b7b0d3f..9eed9186 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-28 Roger Sayle <roger@eyesopen.com>
+
+ PR driver/17537
+ * g++spec.c (lang_specific_driver): Unrecognized libraries, other
+ than -lc and -lm, may require linking against libstc++.
+
2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
* tree.c: Fix a comment typo.
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
index d3ab47d..df9dd40 100644
--- a/gcc/cp/g++spec.c
+++ b/gcc/cp/g++spec.c
@@ -174,6 +174,9 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
}
else if (strncmp (argv[i], "-Wl,", 4) == 0)
library = (library == 0) ? 1 : library;
+ /* Unrecognized libraries (e.g. -lfoo) may require libstdc++. */
+ else if (strncmp (argv[i], "-l", 2) == 0)
+ library = (library == 0) ? 1 : library;
else if (((argv[i][2] == '\0'
&& strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
|| strcmp (argv[i], "-Tdata") == 0))