if(static_link_ok)
argv.push_back("-static");
- else if(architecture->get_system()=="windows")
- argv.push_back("-Wl,--enable-auto-import");
+ else
+ {
+ if(compiler_tag=="CXX")
+ {
+ BuildInfo::LibModeMap::const_iterator i = binfo.libmodes.find("stdc++");
+ if(i!=binfo.libmodes.end() && i->second<=BuildInfo::STATIC)
+ argv.push_back("-static-libstdc++");
+ }
+
+ if(architecture->get_system()=="windows")
+ argv.push_back("-Wl,--enable-auto-import");
+ }
return new ExternalTask(argv, work_dir);
}