X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgnucompiler.cpp;h=a86cb59d0567b06f4e88c07a72e2ddbd4dd17d49;hb=0f7867524bf87a389ff5d4f9d3290d68a254b693;hp=1b05a5cb6e99b459ff9f4f3ea3a63f3a8378295f;hpb=1c80c1c33af10e8e325808906a95969ee57676b6;p=builder.git diff --git a/source/gnucompiler.cpp b/source/gnucompiler.cpp index 1b05a5c..a86cb59 100644 --- a/source/gnucompiler.cpp +++ b/source/gnucompiler.cpp @@ -151,7 +151,7 @@ Task *GnuCompiler::run(const Target &target) const } if(binfo.threads && architecture->get_system()!="windows" && architecture->get_system()!="darwin") argv.push_back("-pthread"); - if((comp.get_type()==Component::LIBRARY || comp.get_type()==Component::MODULE) && architecture->get_system()!="windows") + if(object.is_used_in_shared_library() && architecture->get_system()!="windows") argv.push_back("-fPIC"); const Architecture &native_arch = builder.get_native_arch();