mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.c: set PIC flags on clang for FreeBSD and glibc
This seems required on FreeBSD 11.1 (clang 4.0.0) and Debian stretch (clang 3.8.1) for shared libraries. Note: Not checking __linux__ because there are statically-linked Linux distros (I don't know if they can support MJIT). But glibc doesn't support static linking, so we guard on that. Maybe other platforms will need this, too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d3e8d4f35a
commit
65ab2ab1c0
1 changed files with 3 additions and 1 deletions
4
mjit.c
4
mjit.c
|
@ -616,7 +616,9 @@ 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};
|
||||
|
||||
#if defined __GNUC__ && !defined __clang__
|
||||
#if defined(__GNUC__) && \
|
||||
(!defined(__clang__) || \
|
||||
(defined(__clang__) && (defined(__FreeBSD__) || defined(__GLIBC__))))
|
||||
#define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \
|
||||
"-pipe",
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue