mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
dcf31c6a1e
--------- Co-authored-by: tiopex <tiopxyz@gmail.com> Co-authored-by: tiopex <67048640+tiopex@users.noreply.github.com>
21 lines
619 B
Diff
21 lines
619 B
Diff
Make the libcrypt test somewhat cross-compilation compliant
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
|
|
Index: b/src/Makefile
|
|
===================================================================
|
|
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -78,8 +78,9 @@ else
|
|
endif
|
|
|
|
# Additional libs for GNU libc.
|
|
-ifneq ($(wildcard /usr/lib*/libcrypt.a),)
|
|
- SULOGINLIBS += -lcrypt
|
|
+HAS_LIBCRYPT=$(shell f=`mktemp` && echo 'int main(void) {}' | $(CC) -o $$f -xc - -lcrypt >/dev/null 2>&1 && echo yes; rm -f $$f)
|
|
+ifeq ($(HAS_LIBCRYPT),yes)
|
|
+ SULOGINLIBS += -lcrypt
|
|
endif
|
|
|
|
all: $(BIN) $(SBIN) $(USRBIN)
|