blob: 917a8af64df99ebbd74c6c561eff1faac048ce75 [file] [log] [blame]
Patrick Williamsc0f7c042017-02-23 20:41:17 -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
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006This patch fixes a case where it find crypt defined in libc (musl) but
7not in specified libraries then it ends up assigning
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008LIBCRYPT="-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
Patrick Williamsc0f7c042017-02-23 20:41:17 -060013The reason is that -l appears on commandline with
14out any library and compiler treats the next argument as library name
15whatever it is.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
17Upstream-Status: Pending
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
Patrick Williamsc0f7c042017-02-23 20:41:17 -060019Signed-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"],
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 [crypt_libs="crypt"])
31
32 BACKUP_LIBS=$LIBS
Patrick Williamsc0f7c042017-02-23 20:41:17 -060033-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"])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035 AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
36 LIBS=$BACKUP_LIBS
37 AC_SUBST(LIBCRYPT)
Patrick Williamsc0f7c042017-02-23 20:41:17 -060038--
392.4.0
40