diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-11 08:57:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-11 08:57:22 +0000 |
commit | 58dfae46936b83c7961a13a79b82cdb6674dbd27 (patch) | |
tree | 06eec482bd2a6dc9875c726e07b0487e77a6bdea /mjit.c | |
parent | f3f3e278303f6d1fc691aba06b98afc351f2c132 (diff) | |
download | ruby-58dfae46936b83c7961a13a79b82cdb6674dbd27.tar.gz |
mjit.c: alwasy -fPIC flag to gcc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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__ |