diff -ru busybox-1.21.0/Makefile.flags src/Makefile.flags
--- busybox-1.21.0/Makefile.flags	2012-12-22 23:38:58.000000000 +0100
+++ src/Makefile.flags	2024-05-15 16:00:27.563055481 +0200
@@ -119,7 +119,7 @@
 # gcc-4.2.1 fails if we try to feed C source on stdin:
 #  echo 'int main(void){return 0;}' | $(CC) $(CFLAGS) -lcrypt -o /dev/null -xc -
 # fall back to using a temp file:
-CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c)
+CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(EXTRA_LDFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c)
 ifeq ($(CRYPT_AVAILABLE),y)
 LDLIBS += m crypt
 else
