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>
This commit is contained in:
Christian Marangi 2022-09-27 16:54:42 +02:00
parent a29d3bc48c
commit c092b3ba63
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7
1 changed files with 1 additions and 1 deletions

View File

@ -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))