From c7bfbabab7274f31be9e484bbe277cf9d011072c Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 13 Jun 2014 14:54:45 -0400 Subject: gawk: ensure cross compiling doesn't try to remove host files Fixes [YOCTO #6440] When cross compiling gawk, it is possible to see this fail: make[4]: Entering directory '/mnt/home/paul/poky/build/tmp/work/corei7-64-poky- linux/gawk/4.1.1-r0/build/extension' for i in filefuncs.la fnmatch.la fork.la inplace.la ordchr.la readdir.la readfi le.la revoutput.la revtwoway.la rwarray.la testext.la time.la ; do \ rm -f /usr/lib/gawk/$i ; \ done rm: cannot remove '/usr/lib/gawk/filefuncs.la': Permission denied rm: cannot remove '/usr/lib/gawk/fnmatch.la': Permission denied rm: cannot remove '/usr/lib/gawk/fork.la': Permission denied rm: cannot remove '/usr/lib/gawk/inplace.la': Permission denied rm: cannot remove '/usr/lib/gawk/ordchr.la': Permission denied rm: cannot remove '/usr/lib/gawk/readdir.la': Permission denied rm: cannot remove '/usr/lib/gawk/readfile.la': Permission denied rm: cannot remove '/usr/lib/gawk/revoutput.la': Permission denied rm: cannot remove '/usr/lib/gawk/revtwoway.la': Permission denied rm: cannot remove '/usr/lib/gawk/rwarray.la': Permission denied rm: cannot remove '/usr/lib/gawk/testext.la': Permission denied rm: cannot remove '/usr/lib/gawk/time.la': Permission denied Makefile:1235: recipe for target 'install-data-hook' failed The problem only manifests itself on hosts where the above files are already present; for if they are absent then the rm -f does not fail with -EPERM. Before looking in mainline gawk for a fix, I fixed it myself. Then in comparing with mainline gawk, I found their fix was not 100% complete. So here we get a backport of the mainline gawk commit, plus the delta as a commit that I've sent to the gawk mailing list. (From OE-Core rev: 8c7a883964e45e7b48b943731bd3b3da0cc289d9) Signed-off-by: Paul Gortmaker Signed-off-by: Richard Purdie --- meta/recipes-extended/gawk/gawk_4.1.1.bb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'meta/recipes-extended/gawk/gawk_4.1.1.bb') diff --git a/meta/recipes-extended/gawk/gawk_4.1.1.bb b/meta/recipes-extended/gawk/gawk_4.1.1.bb index a81be3137a..1298ee2f4c 100644 --- a/meta/recipes-extended/gawk/gawk_4.1.1.bb +++ b/meta/recipes-extended/gawk/gawk_4.1.1.bb @@ -15,6 +15,8 @@ DEPENDS += "readline" SRC_URI = "${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ file://run-ptest \ + file://Use-DESTDIR-in-extension-Makefile.am-when-removing-..patch \ + file://extension-Add-DESTDIR-prefix-to-remaining-pkgextensi.patch \ " SRC_URI[md5sum] = "45f5b09aa87b4744c4c53bf274e96ed0" -- cgit v1.2.3-54-g00ecf