mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit_worker.c: try to simplify CC_DLDFLAGS_ARGS
assuming that -nostartfiles is just optional for mingw, cygwin, and AIX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a5de8d1ccb
commit
405940234e
1 changed files with 5 additions and 11 deletions
|
@ -247,10 +247,10 @@ static char *libruby_pathflag;
|
|||
# define MJIT_CFLAGS_PIPE 0
|
||||
#endif
|
||||
|
||||
// Use `-nodefaultlibs -nostdlib` for GCC where possible, which does not work on mingw, cygwin, AIX, and OpenBSD.
|
||||
// This seems to improve MJIT performance on GCC.
|
||||
// Use `-nostartfiles -nodefaultlibs -nostdlib` for GCC where possible, which does not work on mingw, cygwin, AIX, and OpenBSD.
|
||||
// This seems to improve MJIT performance on GCC. TODO: Check if it works with MJIT and add it on configure.
|
||||
#if defined __GNUC__ && !defined __clang__ && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(_AIX) && !defined(__OpenBSD__)
|
||||
# define GCC_NOSTDLIB_FLAGS "-nodefaultlibs", "-nostdlib",
|
||||
# define GCC_NOSTDLIB_FLAGS "-nostartfiles", "-nodefaultlibs", "-nostdlib",
|
||||
#else
|
||||
# define GCC_NOSTDLIB_FLAGS /* empty */
|
||||
#endif
|
||||
|
@ -264,13 +264,7 @@ static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
|
|||
static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
|
||||
|
||||
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
|
||||
static const char *const CC_DLDFLAGS_ARGS[] = {
|
||||
MJIT_DLDFLAGS
|
||||
#if defined __GNUC__ && !defined __clang__ && !defined(__OpenBSD__)
|
||||
"-nostartfiles",
|
||||
#endif
|
||||
GCC_NOSTDLIB_FLAGS NULL
|
||||
};
|
||||
static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS GCC_NOSTDLIB_FLAGS NULL};
|
||||
|
||||
static const char *const CC_LIBS[] = {
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
|
@ -280,7 +274,7 @@ static const char *const CC_LIBS[] = {
|
|||
# if defined(_WIN32)
|
||||
"-lmsvcrt", // mingw
|
||||
# endif
|
||||
"-lgcc", // mingw, cygwin, and GCC platforms using `-nodefaultlibs -nostdlib`
|
||||
"-lgcc", // all platforms using GCC
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue