summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 07:21:12 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-23 07:21:12 +0000
commitea0cede5aa04ac22837befe5a690756e06ae195c (patch)
tree1bd8a40a3b205ae845107cc2d3160cb624314f70 /mjit.c
parentd62b7e133e2de4807790e2cbe93f8a8481f45e37 (diff)
mjit.c: initial cygwin support
thread_pthread.c: Drop pthread_attr_setscope usage. It seems that, at least on Linux and macOS, PTHREAD_SCOPE_PROCESS is not supported and thus PTHREAD_SCOPE_SYSTEM should be used by default. Let's just stop calling this until we find some platform that needs `pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)`. [Misc #14854] From: fd0 (Daisuke Fujimura) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c6
1 files changed, 4 insertions, 2 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