diff mbox

[mingw,committed] : Add to GOMP_SELF_SPECS additionally the option -pthread

Message ID CAEwic4bQHGtKEcm73Og-MuZOnatdjPmqBb3ysLq8xN8KASv7SA@mail.gmail.com
State New
Headers show

Commit Message

Kai Tietz Aug. 16, 2011, 4:30 p.m. UTC
Hello,

this patch fixes for options -fopenmp and/or -ftree-parallelize-loops=
the binding to pthread-library.

ChangeLog

2011-08-16  Kai Tietz  <ktietz@redhat.com>

        * config/i386/mingw32.h (GOMP_SELF_SPEC): Add -pthread option.

Bootstrapped for x86_64-w64-mingw32 and i686-pc-mingw32.  Applied at
revision 77789.

Regards,
Kai
diff mbox

Patch

Index: mingw32.h
===================================================================
--- mingw32.h   (revision 177784)
+++ mingw32.h   (working copy)
@@ -189,7 +189,8 @@ 

 /* mingw32 uses the  -mthreads option to enable thread support.  */
 #undef GOMP_SELF_SPECS
-#define GOMP_SELF_SPECS "%{fopenmp: -mthreads}"
+#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: " \
+                       "-mthreads -pthread}"

 /* mingw32 atexit function is safe to use in shared libraries.  Use it
    to register C++ static destructors.  */