]> git.tdb.fi Git - builder.git/blobdiff - source/gnulinker.cpp
The mingw port of gcc doesn't recognize -pthread
[builder.git] / source / gnulinker.cpp
index cfdee8daffc3570e572006d85093733bbe35c75f..9ae5d640e3e8fcec5106133fce9c2a422fa11328 100644 (file)
@@ -159,9 +159,8 @@ void GnuLinker::Linker::do_prepare()
                        command = "g++";
                else
                        throw invalid_argument("GnuLinker::Linker::Linker");
-               if(architecture->is_cross())
-                       command = format("%s-%s", architecture->get_cross_prefix(), command);
-               executable = builder.get_vfs().find_binary(command);
+
+               set_executable(command, true);
        }
 }
 
@@ -189,7 +188,7 @@ Task *GnuLinker::Linker::run(const Target &target) const
                argv.push_back("-L"+i->str());
        if(binfo.strip)
                argv.push_back("-s");
-       if(binfo.threads)
+       if(binfo.threads && architecture->get_system()!="windows")
                argv.push_back("-pthread");
 
        const Architecture &native_arch = builder.get_native_arch();