Task *GnuCompiler::run(const Target &target) const
{
const ObjectFile &object = dynamic_cast<const ObjectFile &>(target);
- const Component &comp = object.get_component();
+ const Component &comp = *object.get_component();
ExternalTask::Arguments argv;
argv.push_back(executable->get_path().str());
}
if(binfo.threads)
argv.push_back("-pthread");
- if(comp.get_type()==Component::LIBRARY)
+ if(comp.get_type()==Component::LIBRARY && architecture->get_system()!="windows")
argv.push_back("-fPIC");
const Architecture &native_arch = builder.get_native_arch();