From: Christian Marangi Date: Tue, 27 Sep 2022 14:54:42 +0000 (+0200) Subject: include/prereq-build: fix ldconfig-stub symlink on macos and BSD OSs X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755;p=openwrt%2Fstaging%2Fthess.git 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 --- 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))