8000 gh-127604: ensure `-ldl` is passed only once to the linker (#133071) · python/cpython@af3f6fc · GitHub
[go: up one dir, main page]

Skip to content

Commit af3f6fc

Browse files
authored
gh-127604: ensure -ldl is passed only once to the linker (#133071)
1 parent 6677c2c commit af3f6fc

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

Python/traceback.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
#ifdef HAVE_LINK_H
3434
# include <link.h> // struct DL_info
3535
#endif
36-
# if defined(__APPLE__) && defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && defined(HAVE_DLADDR)
36+
# if defined(__APPLE__) && defined(HAVE_BACKTRACE) && defined(HAVE_DLADDR)
3737
# define CAN_C_BACKTRACE
38-
# elif defined(HAVE_BACKTRACE) && defined(HAVE_BACKTRACE_SYMBOLS) && defined(HAVE_DLADDR1)
38+
# elif defined(HAVE_BACKTRACE) && defined(HAVE_DLADDR1)
3939
# define CAN_C_BACKTRACE
4040
# endif
4141
#endif

configure

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2989,9 +2989,10 @@ AC_HEADER_MAJOR
29892989
AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h], [
29902990
AC_CHECK_FUNCS([backtrace dladdr1], [
29912991
# dladdr1 requires -ldl
2992-
AS_VAR_APPEND([LDFLAGS], [" -ldl"])
2992+
ac_cv_require_ldl=yes
29932993
])
29942994
])
2995+
AS_VAR_IF([ac_cv_require_ldl], [yes], [AS_VAR_APPEND([LDFLAGS], [" -ldl"])])
29952996

29962997
# bluetooth/bluetooth.h has been known to not compile with -std=c99.
29972998
# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294

0 commit comments

Comments
 (0)
0