]> git.tdb.fi Git - builder.git/commitdiff
The mingw port of gcc doesn't recognize -pthread
authorMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2013 17:09:21 +0000 (20:09 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 24 May 2013 17:09:21 +0000 (20:09 +0300)
source/gnucompiler.cpp
source/gnulinker.cpp

index ec1959afae67cfaf3a3f4a82e25e8a8c748f1a7a..5f69c0dca49ad5585153398cce07a20de07c9f32 100644 (file)
@@ -121,7 +121,7 @@ Task *GnuCompiler::run(const Target &target) const
                else
                        argv.push_back(format("-O%d", binfo.optimize));
        }
-       if(binfo.threads)
+       if(binfo.threads && architecture->get_system()!="windows")
                argv.push_back("-pthread");
        if((comp.get_type()==Component::LIBRARY || comp.get_type()==Component::MODULE) && architecture->get_system()!="windows")
                argv.push_back("-fPIC");
index 02708cc9b68d2a2587d92691fa72d788f6e329bd..9ae5d640e3e8fcec5106133fce9c2a422fa11328 100644 (file)
@@ -188,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();