[openwrt/openwrt] prereq: prefer existing built coreutils as symlink target
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 26 05:38:43 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f197b5827a2836d87b95c95f9a638b1073a33e61
commit f197b5827a2836d87b95c95f9a638b1073a33e61
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Oct 3 00:57:29 2024 -0400
prereq: prefer existing built coreutils as symlink target
For the utilities provided by coreutils
but required before coreutils is built,
if coreutils is actually built already, prefer a symlink to
the built versions instead of the host machine's version.
Tested-by: Georgi Valkov <gvalkov at gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
include/prereq-build.mk | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 913888e0ad..b913e62e43 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -126,10 +126,12 @@ $(eval $(call SetupHostCommand,diff,Please install GNU diffutils, \
diff --version 2>&1 | grep GNU))
$(eval $(call SetupHostCommand,cp,Please install GNU fileutils, \
+ $(TOPDIR)/staging_dir/host/bin/gcp --help 2>&1 | grep 'Copy SOURCE', \
gcp --help 2>&1 | grep 'Copy SOURCE', \
cp --help 2>&1 | grep 'Copy SOURCE'))
$(eval $(call SetupHostCommand,seq,Please install seq, \
+ $(TOPDIR)/staging_dir/host/bin/gseq --version, \
gseq --version, \
seq --version 2>&1 | grep seq))
@@ -153,10 +155,12 @@ $(eval $(call SetupHostCommand,getopt, \
/opt/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--'))
$(eval $(call SetupHostCommand,realpath,Please install a 'realpath' utility, \
+ $(TOPDIR)/staging_dir/host/bin/grealpath /, \
grealpath /, \
realpath /))
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
+ $(TOPDIR)/staging_dir/host/bin/gstat -c%s $(TOPDIR)/Makefile, \
gnustat -c%s $(TOPDIR)/Makefile, \
gstat -c%s $(TOPDIR)/Makefile, \
stat -c%s $(TOPDIR)/Makefile))
@@ -175,6 +179,7 @@ $(eval $(call SetupHostCommand,wget,Please install GNU 'wget', \
wget --version | grep GNU))
$(eval $(call SetupHostCommand,install,Please install GNU 'install', \
+ $(TOPDIR)/staging_dir/host/bin/ginstall --version | grep GNU, \
install --version | grep GNU, \
ginstall --version | grep GNU))
More information about the lede-commits
mailing list