summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-20 05:32:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-20 05:32:06 +0000
commit04178d396b99f715bac00df10897a184f2e69c03 (patch)
treec593a533ffbca98cd3fe2a058527094ae9135cfa /mjit.c
parenteb816385307abc0da39274728473e972f91cc833 (diff)
mjit.c: dldflags on mingw
* mjit.c (CC_DLDFLAGS_ARGS): default libraries are necessary on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mjit.c b/mjit.c
index 6f186c03b7..63be36d655 100644
--- a/mjit.c
+++ b/mjit.c
@@ -560,7 +560,7 @@ static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
#if defined __GNUC__ && !defined __clang__
#define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \
- "-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib",
+ "-pipe",
#else
#define GCC_PIC_FLAGS /* empty */
#endif
@@ -571,7 +571,16 @@ static const char *const CC_COMMON_ARGS[] = {
};
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
-static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
+static const char *const CC_DLDFLAGS_ARGS[] = {
+ MJIT_DLDFLAGS
+#if defined __GNUC__ && !defined __clang__
+ "-nostartfiles",
+# ifndef _WIN32
+ "-nodefaultlibs", "-nostdlib",
+# endif
+#endif
+ NULL
+};
#define CC_CODEFLAG_ARGS (mjit_opts.debug ? CC_DEBUG_ARGS : CC_OPTIMIZE_ARGS)
/* Status of the precompiled header creation. The status is