core/dependencies: check if we need to build our own host-coreutils

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Yann E. MORIN 2019-12-18 21:39:04 +01:00 committed by Thomas Petazzoni
parent 885e6fdb8a
commit a95ea4b64d
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# Check whether the host's coreutils are up to date enough
# to provide 'ln --relative' and 'realpath'.
ifeq (,$(call suitable-host-package,coreutils))
BR2_COREUTILS_HOST_DEPENDENCY = host-coreutils
endif

View File

@ -0,0 +1,12 @@
#!/bin/sh
# Exit on the first error
set -e
# Does ln supports the --relative/-r option?
ln --relative --help >/dev/null 2>&1
# Does realpath exist?
realpath --help >/dev/null 2>&1
echo OK