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:
parent
f3f3e27830
commit
58dfae4693
1 changed files with 7 additions and 4 deletions
11
mjit.c
11
mjit.c
|
@ -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_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
|
||||||
static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS 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__
|
#if defined __GNUC__ && !defined __clang__
|
||||||
"-Wfatal-errors", "-fPIC", "-shared", "-w",
|
#define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \
|
||||||
"-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib",
|
"-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib",
|
||||||
|
#else
|
||||||
|
#define GCC_PIC_FLAGS /* empty */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static const char *const CC_COMMON_ARGS[] = {
|
||||||
|
MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS
|
||||||
NULL
|
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};
|
static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue