Просмотр исходного кода

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 <[email protected]>
Suggested-by: Huangbin Zhan <[email protected]>
Signed-off-by: Christian Marangi <[email protected]>
Christian Marangi 3 лет назад
Родитель
Сommit
c092b3ba63
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      include/prereq-build.mk

+ 1 - 1
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))