diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-28 22:43:11 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-28 22:43:11 +0000 |
commit | 4e5f4a8c50276b467ad6c28fbd696d8f61b5c8d0 (patch) | |
tree | 1541e45b2855d35002e6551729591b0e2cf50573 /gcc/cp/g++spec.c | |
parent | dab44de6bdbeb9e83a9bde269c702809f50aee20 (diff) | |
download | gcc-4e5f4a8c50276b467ad6c28fbd696d8f61b5c8d0.tar.gz |
PR driver/17537
* g++spec.c (lang_specific_driver): Unrecognized libraries, other
than -lc and -lm, may require linking against libstc++.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/g++spec.c')
-rw-r--r-- | gcc/cp/g++spec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index d3ab47db834..df9dd400a91 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)) |