Commit 078208eb by Roger Sayle Committed by Roger Sayle

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
parent 252d7884
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> 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
* tree.c: Fix a comment typo. * tree.c: Fix a comment typo.
......
...@@ -174,6 +174,9 @@ lang_specific_driver (int *in_argc, const char *const **in_argv, ...@@ -174,6 +174,9 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
} }
else if (strncmp (argv[i], "-Wl,", 4) == 0) else if (strncmp (argv[i], "-Wl,", 4) == 0)
library = (library == 0) ? 1 : library; 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' else if (((argv[i][2] == '\0'
&& strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL) && strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
|| strcmp (argv[i], "-Tdata") == 0)) || strcmp (argv[i], "-Tdata") == 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment