Browse Source

package/busybox: fix build with glibc 2.39

When glibc was bumped to version 2.39 in commit
b5680f53d60acf8ff6010082f873438a39bd5d97, it removed the deprecated
libcrypt support.

Until the upgrade of glibc to 2.39, Busybox could rely on the libcrypt
provided by glibc. Since version 2.39, glibc no longer provides
libcrypt, causing a build failure with Busybox configurations that
have CONFIG_USE_BB_CRYPT disabled.

To fix this, add the libxcrypt dependency to Busybox when
BR2_PACKAGE_LIBXCRYPT is selected. The user is still responsible for
enabling BR2_PACKAGE_LIBXCRYPT when their Busybox configuration has
CONFIG_USE_BB_CRYPT disabled.

Signed-off-by: Fred Lefranc <fred.lefranc+evs@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit a22f17881cce09c285067be096a683c523620826)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fred Lefranc 1 year ago
parent
commit
029a906053
1 changed files with 4 additions and 0 deletions
  1. 4 0
      package/busybox/busybox.mk

+ 4 - 0
package/busybox/busybox.mk

@@ -164,6 +164,10 @@ define BUSYBOX_SET_MDEV
 endef
 endef
 endif
 endif
 
 
+ifeq ($(BR2_PACKAGE_LIBXCRYPT),y)
+BUSYBOX_DEPENDENCIES += libxcrypt
+endif
+
 # sha passwords need USE_BB_CRYPT_SHA
 # sha passwords need USE_BB_CRYPT_SHA
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y)
 define BUSYBOX_SET_CRYPT_SHA
 define BUSYBOX_SET_CRYPT_SHA