summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2022-09-22 09:35:51 -0700
committerJeremy Evans <code@jeremyevans.net>2022-09-23 05:51:34 +0900
commit88bf8ad6e99fa36c7b4a0b5cbb6fc99777360855 (patch)
treea1afe4bd6f8c6235026b652f79252c0ba9a38f11 /configure.ac
parentb5c459d57af182173ff888b362a38d721c780aa9 (diff)
Allow --enable-yjit on OpenBSD
yjit uses _Unwind_* functions from libunwind. These functions are available in libc++abi (which requires libpthread), so add those to LDFLAGS if enabling yjit on OpenBSD.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6421
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9823198960..a3566358bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3767,6 +3767,10 @@ AS_CASE(["${YJIT_SUPPORT}"],
]))
YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a"
+ AS_CASE(["$target_os"],[openbsd*],[
+ # Link libc++abi (which requires libpthread) for _Unwind_* functions needed by yjit
+ LDFLAGS="$LDFLAGS -lpthread -lc++abi"
+ ])
YJIT_OBJ='yjit.$(OBJEXT)'
AC_DEFINE(USE_YJIT, 1)
], [AC_DEFINE(USE_YJIT, 0)])