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.
This commit is contained in:
Jeremy Evans 2022-09-22 09:35:51 -07:00
Родитель b5c459d57a
Коммит 88bf8ad6e9
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -3767,6 +3767,10 @@ AS_CASE(["${YJIT_SUPPORT}"],
])) ]))
YJIT_LIBS="yjit/target/${rb_rust_target_subdir}/libyjit.a" 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)' YJIT_OBJ='yjit.$(OBJEXT)'
AC_DEFINE(USE_YJIT, 1) AC_DEFINE(USE_YJIT, 1)
], [AC_DEFINE(USE_YJIT, 0)]) ], [AC_DEFINE(USE_YJIT, 0)])