summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mjit.c6
-rw-r--r--thread_pthread.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/mjit.c b/mjit.c
index 80ab299039..3dc34e8f45 100644
--- a/mjit.c
+++ b/mjit.c
@@ -610,7 +610,7 @@ static const char *const CC_DLDFLAGS_ARGS[] = {
MJIT_DLDFLAGS
#if defined __GNUC__ && !defined __clang__
"-nostartfiles",
-# ifndef _WIN32
+# if !defined(_WIN32) && !defined(__CYGWIN__)
"-nodefaultlibs", "-nostdlib",
# endif
#endif
@@ -618,10 +618,12 @@ static const char *const CC_DLDFLAGS_ARGS[] = {
};
static const char *const CC_LIBS[] = {
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
MJIT_LIBS
# if defined __GNUC__ && !defined __clang__
+# if defined(_WIN32)
"-lmsvcrt",
+# endif
"-lgcc",
# endif
#endif
diff --git a/thread_pthread.c b/thread_pthread.c
index 6433849686..1a1a6fc0c6 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1757,7 +1757,6 @@ rb_thread_create_mjit_thread(void (*child_hook)(void), void (*worker_func)(void)
/* jit_worker thread is not to be joined */
if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) == 0
- && pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) == 0
&& pthread_create(&worker_pid, &attr, mjit_worker, (void *)worker_func) == 0) {
ret = TRUE;
}