1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

mjit.c: alwasy -fPIC flag to gcc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-11 08:57:22 +00:00
parent f3f3e27830
commit 58dfae4693

11
mjit.c
View file

@ -573,16 +573,19 @@ free_list(struct rb_mjit_unit_list *list)
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_COMMON_ARGS[] = {
MJIT_CC_COMMON MJIT_CFLAGS
#if defined __GNUC__ && !defined __clang__
"-Wfatal-errors", "-fPIC", "-shared", "-w",
#define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \
"-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib",
#else
#define GCC_PIC_FLAGS /* empty */
#endif
static const char *const CC_COMMON_ARGS[] = {
MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS
NULL
};
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED NULL};
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL};
static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
#ifdef __clang__