From 90e22ff48bb5705c146a64b75556157667b551d3 Mon Sep 17 00:00:00 2001 From: Martin Wetterwald Date: Thu, 25 Jul 2024 19:37:09 +0200 Subject: [PATCH] package/tinyssh: fix static-only build When using BR2_STATIC_LIBS=y, tinysshd's build was successful, but the binary didn't work on the final target: this is because a dynamically linked ELF was produced, on a target having no dynamic loader at all. Using $(TARGET_CONFIGURE_OPTS) propagates all the options and not only "CC", resulting in a correct static binary able to run on the target. Without the patch: > tinysshd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), > dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped With the patch: > tinysshd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), > statically linked, stripped Fixes: a7b3de8a3b1b446c081593192c3acb847f6f5f05 Signed-off-by: Martin Wetterwald Signed-off-by: Thomas Petazzoni --- package/tinyssh/tinyssh.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/tinyssh/tinyssh.mk b/package/tinyssh/tinyssh.mk index 80b6ccb850..e92ac628f2 100644 --- a/package/tinyssh/tinyssh.mk +++ b/package/tinyssh/tinyssh.mk @@ -10,7 +10,7 @@ TINYSSH_LICENSE = CC0-1.0 TINYSSH_LICENSE_FILES = LICENCE define TINYSSH_BUILD_CMDS - $(TARGET_MAKE_ENV) CC="$(TARGET_CC)" $(MAKE) -C $(@D) cross-compile + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) cross-compile endef define TINYSSH_INSTALL_TARGET_CMDS