From c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 27 Sep 2022 16:54:42 +0200 Subject: [PATCH] include/prereq-build: fix ldconfig-stub symlink on macos and BSD OSs Some OS may have the true bin to a different location than /bin/true. BSD based system and macos have true on /usr/bin/true. Fix this by checking both location and take the one available in the system. Reported-by: Sergey V. Lobanov Suggested-by: Huangbin Zhan Signed-off-by: Christian Marangi --- include/prereq-build.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/prereq-build.mk b/include/prereq-build.mk index e1687da370..c5c2f1c8bb 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -213,4 +213,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd # Install ldconfig stub $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \ - $(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig)) + $(LN) $(firstword $(wildcard /bin/true /usr/bin/true)) $(STAGING_DIR_HOST)/bin/ldconfig)) -- 2.30.2