summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-01-12 19:38:24 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-01-12 19:38:24 +0000
commitad78a1fd33f7f20173b3df83ed7222d6ae54c913 (patch)
treecfd5cd4b238cb4cb2eca459c8d595fbe96b0d1ee
parent206a6df6481eb4fe5c026ecbaed82d7f537ae071 (diff)
don't add -lm -lstdc++ if -shared, consistent with gcc -shared which doesn't
link libc.
-rw-r--r--gnu/egcs/gcc/cp/g++spec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/egcs/gcc/cp/g++spec.c b/gnu/egcs/gcc/cp/g++spec.c
index 806b90ea96f..6bf4e99139d 100644
--- a/gnu/egcs/gcc/cp/g++spec.c
+++ b/gnu/egcs/gcc/cp/g++spec.c
@@ -122,6 +122,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
{
library = 0;
}
+ else if (strcmp (argv[i], "-shared") == 0)
+ {
+ library = 0;
+ }
else if (strcmp (argv[i], "-lm") == 0
|| strcmp (argv[i], "-lmath") == 0
|| strcmp (argv[i], MATH_LIBRARY) == 0