sysvinit: arm64 build fix
PATCH v2 1/1 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.
--- package/sysvinit/0001-fix-libcrypt-test.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
package/sysvinit/0001-fix-libcrypt-test.patch +6 -3
@@ -1,17 +1,20 @@ Make the libcrypt test somewhat cross-compilation compliant Signed-off-by: Thomas Petazzoni <[email protected]> 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)
Signature · 1 line
1.8.1.5
PATCH 1/1 sysvinit: arm64 build fix
Hi Joao,
[Resend with the correct list address]
Quoted 23 lines · Joao Pinto
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 Joao Pinto <[email protected]>--- package/sysvinit/0001-fix-libcrypt-test.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)package/sysvinit/0001-fix-libcrypt-test.patch +1
-0@@ -1,17 +1,21 @@ Make the libcrypt test somewhat cross-compilation compliant Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Joao Pinto <[email protected]> Index: b/src/Makefile =================================================================== --- a/src/Makefile +++ b/src/Makefile
package/sysvinit/0001-fix-libcrypt-test.patch line 16
Quoted 10 lines
package/sysvinit/0001-fix-libcrypt-test.patch +3
-3-@@ -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)
The last '&&' causes the 'rm' command to delete the temporary file only when the test succeeds. Should be ';' instead, I think.
baruch
Quoted 5 lines
package/sysvinit/0001-fix-libcrypt-test.patch +3
-0++ifeq ($(HAS_LIBCRYPT),yes) ++ SULOGINLIBS += -lcrypt endif + all: $(BIN) $(SBIN) $(USRBIN)
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/1 sysvinit: arm64 build fix
Hi Baruch!
Quoted 32 lines · Baruch Siach
Hi Joao,
[Resend with the correct list address]
Quoted 27 lines · Joao Pinto
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 Joao Pinto <[email protected]>--- package/sysvinit/0001-fix-libcrypt-test.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)package/sysvinit/0001-fix-libcrypt-test.patch +2
-1@@ -1,17 +1,21 @@ Make the libcrypt test somewhat cross-compilation compliant Signed-off-by: Thomas Petazzoni <[email protected]> +Signed-off-by: Joao Pinto <[email protected]> Index: b/src/Makefile =================================================================== --- a/src/Makefile +++ b/src/Makefile -@@ -78,7 +78,7 @@ +@@ -78,8 +78,9 @@ else endif
Quoted 9 lines
package/sysvinit/0001-fix-libcrypt-test.patch
Quoted 6 lines
package/sysvinit/0001-fix-libcrypt-test.patch +2
-2# 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)The last '&&' causes the 'rm' command to delete the temporary file only when the test succeeds. Should be ';' instead, I think.
Well spoted! Gonna change and resubmit.
Quoted 9 lines
baruch
Quoted 5 lines
package/sysvinit/0001-fix-libcrypt-test.patch +3
-0++ifeq ($(HAS_LIBCRYPT),yes) ++ SULOGINLIBS += -lcrypt endif + all: $(BIN) $(SBIN) $(USRBIN)
Thanks,
Joao
Thomas Petazzoni
AppliedPATCH v2 1/1 sysvinit: arm64 build fix
In reply to Joao PintoDear Joao Pinto,
Quoted 8 lines · Joao Pinto
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 Joao Pinto <[email protected]>--- package/sysvinit/0001-fix-libcrypt-test.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com