blob: 917a8af64df99ebbd74c6c561eff1faac048ce75 [file] [log] [blame]
Andrew Geissler87ddd3e2021-01-28 18:27:13 -06001From b86575ab4a0df07da160283459da270e1c0372a0 Mon Sep 17 00:00:00 2001
2From: "Maxin B. John" <maxin.john@intel.com>
3Date: Tue, 24 May 2016 14:11:09 +0300
4Subject: [PATCH] crypt_configure
5
6This patch fixes a case where it find crypt defined in libc (musl) but
7not in specified libraries then it ends up assigning
8LIBCRYPT="-l" which then goes into makefile cause all sort of problems
9e.g.
10
11ld: cannot find -l-m32
12| collect2: error: ld returned 1 exit status
13The reason is that -l appears on commandline with
14out any library and compiler treats the next argument as library name
15whatever it is.
16
17Upstream-Status: Pending
18
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20Signed-off-by: Maxin B. John <maxin.john@intel.com>
21---
22 configure.ac | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/configure.ac b/configure.ac
26index df39d07..e68d856 100644
27--- a/configure.ac
28+++ b/configure.ac
29@@ -401,7 +401,7 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
30 [crypt_libs="crypt"])
31
32 BACKUP_LIBS=$LIBS
33-AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_lib:+-l$ac_lib}", LIBCRYPT="")
34+AC_SEARCH_LIBS([crypt],[$crypt_libs], [test "$ac_cv_search_crypt" = "none required" || LIBCRYPT="$ac_cv_search_crypt"])
35 AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
36 LIBS=$BACKUP_LIBS
37 AC_SUBST(LIBCRYPT)
38--
392.4.0
40