diff mbox series

[2/2] package/thttpd: disable static build for shared only builds

Message ID 20250811203206.1506378-2-romain.naour@smile.fr
State Superseded
Headers show
Series [1/2] package/thttpd: port to C99 | expand

Commit Message

Romain Naour Aug. 11, 2025, 8:32 p.m. UTC
When BR2_SHARED_LIBS is set, thttpd package is trying to link with
the static variant of lcrypt.

  [...]/host/bin/arm-linux-gcc  -static htpasswd.o -o htpasswd -lcrypt
  [...]arm-buildroot-linux-gnueabi/bin/ld: cannot find -lcrypt: No such file or directory

Disable static build using STATICFLAG=""

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 package/thttpd/thttpd.mk | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk
index d9cb5c9071..53cd4c3462 100644
--- a/package/thttpd/thttpd.mk
+++ b/package/thttpd/thttpd.mk
@@ -16,6 +16,10 @@  ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
 THTTPD_DEPENDENCIES += libxcrypt
 endif
 
+ifeq ($(BR2_SHARED_LIBS),y)
+THTTPD_MAKE_OPTS += STATICFLAG=""
+endif
+
 define THTTPD_INSTALL_TARGET_CMDS
 	$(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd
 	$(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd