Link probe HAVE_LIBGCC_EH_FRAME_REGISTRATION · python/cpython@ef9ea52 · GitHub
Skip to content

Commit ef9ea52

Browse files
committed
Link probe HAVE_LIBGCC_EH_FRAME_REGISTRATION
1 parent e8de85d commit ef9ea52

4 files changed

Lines changed: 70 additions & 1 deletion

File tree

Include/internal/pycore_jit_unwind.h

Lines changed: 2 additions & 1 deletion

configure

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3828,6 +3828,24 @@ AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h], [
38283828
])
38293829
])
38303830

3831+
dnl for JIT GNU backtrace unwind registration
3832+
AC_CACHE_CHECK([for libgcc frame registration functions],
3833+
[ac_cv_have_libgcc_eh_frame_registration],
3834+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3835+
void __register_frame(const void *);
3836+
void __deregister_frame(const void *);
3837+
]], [[
3838+
__register_frame(0);
3839+
__deregister_frame(0);
3840+
]])],
3841+
[ac_cv_have_libgcc_eh_frame_registration=yes],
3842+
[ac_cv_have_libgcc_eh_frame_registration=no])
3843+
])
3844+
AS_VAR_IF([ac_cv_have_libgcc_eh_frame_registration], [yes], [
3845+
AC_DEFINE([HAVE_LIBGCC_EH_FRAME_REGISTRATION], [1],
3846+
[Define to 1 if libgcc __register_frame and __deregister_frame are linkable.])
3847+
])
3848+
38313849
dnl only add -ldl to LDFLAGS if it isn't already part of LIBS (GH-133081)
38323850
AS_VAR_IF([ac_cv_require_ldl], [yes], [
38333851
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [], [

pyconfig.h.in

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)