summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mjit.c b/mjit.c
index 2f025a66b6..b207986c2b 100644
--- a/mjit.c
+++ b/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