Commit c9380520 authored by Joao Pinto's avatar Joao Pinto Committed by Thomas Petazzoni
Browse files

sysvinit: arm64 build fix



sysvinit was not able to be built for arm64 architectures.
The package patch was changed according to the suggestion of
Thomas Petazzoni.

Signed-off-by: default avatarJoao Pinto <jpinto@synopsys.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 1edb4c51
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -6,12 +6,15 @@ Index: b/src/Makefile
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -78,7 +78,7 @@
@@ -78,8 +78,9 @@ else
 endif
 
 # Additional libs for GNU libc.
-ifneq ($(wildcard /usr/lib*/libcrypt.a),)
+ifneq ($(wildcard $(SYSROOT)/usr/lib*/libcrypt.a),)
   SULOGINLIBS	+= -lcrypt
-  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)