Permalink
Browse files

Added support for MinGW. Requires GCC 4.8+ with posix threads.

  • Loading branch information...
1 parent 7a40691 commit 9c243372b123de7fc8fbd41332f532efebfe390c @Amanieu committed Mar 24, 2013
Showing with 6 additions and 1 deletion.
  1. +2 −0 build-shared-mingw.sh
  2. +3 −0 build-static-mingw.sh
  3. +1 −1 src/scheduler.cpp
@@ -0,0 +1,2 @@
+#!/bin/sh
+g++ -std=c++11 -Wall -Wextra -pedantic -pthread -Iinclude src/scheduler.cpp -flto -O3 -DLIBASYNC_BUILD -shared -o libasync++.dll
@@ -0,0 +1,3 @@
+#!/bin/sh
+g++ -std=c++11 -Wall -Wextra -pedantic -pthread -Iinclude src/scheduler.cpp -O3 -DLIBASYNC_BUILD -DLIBASYNC_STATIC -c -o scheduler.o
+ar rcs libasync++.a scheduler.o
View
@@ -38,7 +38,7 @@
#include "work_steal_queue.h"
// thread_local keyword support
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+#if __GNUC__ * 100 __GNUC_MINOR__ >= 408 && !defined(__MINGW32__)
# define HAVE_THREAD_LOCAL
#endif

0 comments on commit 9c24337

Please sign in to comment.