coreutils: Drop 0001-local.mk-fix-cross-compiling-problem.patch

The patch is used for fixing:
| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.

Now the code and check and set that correctly:
if CROSS_COMPILING
cu_install_program = @INSTALL@
else
cu_install_program = src/ginstall
endif

So just drop the patch.

And also remove the ginstall hack to fix ptest case failure when single-binary
is enabled, I can't find the reason on why it was needed from git log.

Fixed:
install: missing file operand
Try 'install --help' for more information.

* Reproducer:
DISTRO_FEATURES:append = " ptest"
EXTRA_IMAGE_FEATURES:append = " ptest-pkgs"
IMAGE_INSTALL:append = " coreutils"
PACKAGECONFIG:append:pn-coreutils = " single-binary"

$ bitbake core-image-sato
$ runqemu tmp/deploy/images/qemux86-64/ nographic kvm

On target:
$ cd /usr/lib/coreutils/ptest
$ ./run-ptest
============================================================================
Testsuite summary for GNU coreutils 9.6
============================================================================
TOTAL: 655
PASS:  529
SKIP:  126
XFAIL: 0
FAIL:  0
XPASS: 0
ERROR: 0
============================================================================
make[1]: Leaving directory '/usr/lib/coreutils/ptest'

(From OE-Core rev: 8728815f74f73723e86ba25b56a66b3fb46d6596)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang 2025-05-13 07:10:14 -07:00 committed by Richard Purdie
parent e1d0f2e46c
commit d74ff59aa8
2 changed files with 0 additions and 29 deletions

View File

@ -1,26 +0,0 @@
From 7cb2d20cfa2a27191255031d231cd41917dcffe8 Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@windriver.com>
Date: Mon, 26 Dec 2016 16:10:35 +0800
Subject: [PATCH] local.mk: fix cross compiling problem
We meet the following error when cross compiling.
| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
This patch fixes this problem.
Upstream-Status: Pending
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
src/local.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/local.mk b/src/local.mk
index 96ee941..cdd47d6 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -704,4 +704,4 @@ cu_install_program = @INSTALL@
else
cu_install_program = src/ginstall
endif
-INSTALL = $(cu_install_program) -c
+INSTALL_PROGRAM = $(cu_install_program)

View File

@ -15,7 +15,6 @@ inherit autotools gettext texinfo
SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
file://remove-usr-local-lib-from-m4.patch \
file://0001-local.mk-fix-cross-compiling-problem.patch \
file://intermittent-testfailure.patch \
file://0001-ls-fix-crash-with-context.patch \
file://0001-cksum-port-to-32-bit-uint_fast32_t.patch \
@ -184,7 +183,6 @@ RRECOMMENDS:${PN}-dev += "${DEVDEPS}"
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests
sed -i 's/ginstall/install/g' `grep -R ginstall ${D}${PTEST_PATH}/tests | awk -F: '{print $1}' | uniq`
install -d ${D}${PTEST_PATH}/build-aux
install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
install -Dm 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/config.h
@ -198,7 +196,6 @@ do_install_ptest () {
sed -i '/^abs_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^built_programs/s/ginstall/install/g' ${D}${PTEST_PATH}/Makefile
sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile
sed -i '/^BUILD_LDFLAGS =/d' ${D}${PTEST_PATH}/Makefile
chmod -R 777 ${D}${PTEST_PATH}