ruby-changes:50375
From: nobu <ko1@a...>
Date: Tue, 20 Feb 2018 14:32:12 +0900 (JST)
Subject: [ruby-changes:50375] nobu:r62491 (trunk): mjit.c: dldflags on mingw
nobu 2018-02-20 14:32:06 +0900 (Tue, 20 Feb 2018) New Revision: 62491 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62491 Log: mjit.c: dldflags on mingw * mjit.c (CC_DLDFLAGS_ARGS): default libraries are necessary on Windows. Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 62490) +++ mjit.c (revision 62491) @@ -560,7 +560,7 @@ static const char *const CC_OPTIMIZE_ARG https://github.com/ruby/ruby/blob/trunk/mjit.c#L560 #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[ https://github.com/ruby/ruby/blob/trunk/mjit.c#L571 }; 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/