-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unix: remove linking of libcrypt on CPython < 3.11
libcrypt.so again makes an unwanted appearance. It turns out CPython's configure up until 3.11 exhibited arguably buggy behavior where as part of searching for libcrypt it always added `-lcrypt` to LIBS, which got picked up by all linker invocations. Partially applying the upstream patch on CPython < 3.11 makes the problem go away. See also python/cpython#28881. Closes #197.
- Loading branch information
Showing
3 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/configure.ac b/configure.ac | ||
index ac3be3850a..b6e2144783 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -4057,6 +4057,8 @@ AC_CHECK_FUNCS(setpgrp, | ||
|
||
# We search for both crypt and crypt_r as one or the other may be defined | ||
# This gets us our -lcrypt in LIBS when required on the target platform. | ||
+# Save/restore LIBS to avoid linking libpython with libcrypt. | ||
+LIBS_SAVE=$LIBS | ||
AC_SEARCH_LIBS(crypt, crypt) | ||
AC_SEARCH_LIBS(crypt_r, crypt) | ||
|
||
@@ -4071,6 +4073,7 @@ char *r = crypt_r("", "", &d); | ||
[AC_DEFINE(HAVE_CRYPT_R, 1, [Define if you have the crypt_r() function.])], | ||
[]) | ||
) | ||
+LIBS=$LIBS_SAVE | ||
|
||
AC_CHECK_FUNCS(clock_gettime, [], [ | ||
AC_CHECK_LIB(rt, clock_gettime, [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters