aboutsummaryrefslogtreecommitdiffstats
path: root/include/prereq-build.mk
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2022-09-27 16:54:42 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2022-09-27 16:54:42 +0200
commitc092b3ba63e0a60be2a5bc9aa716c26f4c6f3755 (patch)
tree6d461c78e0092fff625bf22824de62297005e286 /include/prereq-build.mk
parenta29d3bc48c40c6a2a93ae1806bea2ac26455cdbb (diff)
downloadupstream-c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755.tar.gz
upstream-c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755.tar.bz2
upstream-c092b3ba63e0a60be2a5bc9aa716c26f4c6f3755.zip
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 <sergey@lobanov.in> Suggested-by: Huangbin Zhan <zhanhb88@gmail.com> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'include/prereq-build.mk')
-rw-r--r--include/prereq-build.mk2
1 files changed, 1 insertions, 1 deletions
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))