From fcf7e373ab2e5f396e5098de43075f8d5e41877b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:59:51 +0200 Subject: [PATCH 1/3] remove remnant check --- Python/traceback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Python/traceback.c b/Python/traceback.c index ff8d29fa5207be..eb8e254586b4a6 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -33,9 +33,9 @@ #ifdef HAVE_LINK_H # include // struct DL_info #endif -# if defined(__APPLE__) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && defined(HAVE_DLADDR) +# if defined(__APPLE__) && defined(HAVE_BACKTRACE) && defined(HAVE_DLADDR) # define CAN_C_BACKTRACE -# elif defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && defined(HAVE_DLADDR1) +# elif defined(HAVE_BACKTRACE)&& defined(HAVE_DLADDR1) # define CAN_C_BACKTRACE # endif #endif From 3cfb554e1de47095a20a8fc7693669a17eaab5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:05:55 +0200 Subject: [PATCH 2/3] ensure `-ldl` is passed only once --- configure | 6 +++++- configure.ac | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 26e6fb1e6b679c..205f196a25af2d 100755 --- a/configure +++ b/configure @@ -11900,7 +11900,7 @@ then : _ACEOF # dladdr1 requires -ldl - as_fn_append LDFLAGS " -ldl" + ac_cv_require_ldl=yes fi @@ -11909,6 +11909,10 @@ done fi done +if test "x$ac_cv_require_ldl" = xyes +then : + as_fn_append LDFLAGS " -ldl" +fi # bluetooth/bluetooth.h has been known to not compile with -std=c99. # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 diff --git a/configure.ac b/configure.ac index 04ce606845daca..f0ae7fbec1cbfe 100644 --- a/configure.ac +++ b/configure.ac @@ -2989,9 +2989,10 @@ AC_HEADER_MAJOR AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h], [ AC_CHECK_FUNCS([backtrace dladdr1], [ # dladdr1 requires -ldl - AS_VAR_APPEND([LDFLAGS], [" -ldl"]) + ac_cv_require_ldl=yes ]) ]) +AS_VAR_IF([ac_cv_require_ldl], [yes], [AS_VAR_APPEND([LDFLAGS], [" -ldl"])]) # bluetooth/bluetooth.h has been known to not compile with -std=c99. # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 From 88c4e1f09f1603a89693c9c2a8e28421cf6ebc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Mon, 28 Apr 2025 11:09:10 +0200 Subject: [PATCH 3/3] Update Python/traceback.c --- Python/traceback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/traceback.c b/Python/traceback.c index eb8e254586b4a6..0ac0b28201c483 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -35,7 +35,7 @@ #endif # if defined(__APPLE__) && defined(HAVE_BACKTRACE) && defined(HAVE_DLADDR) # define CAN_C_BACKTRACE -# elif defined(HAVE_BACKTRACE)&& defined(HAVE_DLADDR1) +# elif defined(HAVE_BACKTRACE) && defined(HAVE_DLADDR1) # define CAN_C_BACKTRACE # endif #endif