diff mbox series

[kirkstone,18/18] go: Fix reproducibility failures

Message ID 1a62e4a755b1513468f6274ce6791916f5325816.1664898546.git.steve@sakoman.com
State New, archived
Headers show
Series [kirkstone,01/18] binutils : Fix CVE-2022-38127 | expand

Commit Message

Steve Sakoman Oct. 4, 2022, 3:50 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

We're seeing "cmd" static libs being sometimes present and sometimes not.
The issue depends whether BUILD == TARGET so they're present for qemux86-64
on x86-64 hosts but not for qemux86-64 on an aarch64 system.

Add an extra deletion to make the files consistent between the different
hosts.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6e652835814c389a826ad2d262ee26c14dfb48b5)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-devtools/go/go-runtime.inc | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-devtools/go/go-runtime.inc
index e18339cddb..02601f7992 100644
--- a/meta/recipes-devtools/go/go-runtime.inc
+++ b/meta/recipes-devtools/go/go-runtime.inc
@@ -50,6 +50,8 @@  do_install() {
 	rm -rf ${D}${libdir}/go/pkg/tool
 	rm -rf ${D}${libdir}/go/pkg/obj
 	rm -rf ${D}${libdir}/go/pkg/bootstrap
+	# the cmd directory is built for the native arch so if BUILD == TARGET
+	rm -rf ${D}${libdir}/go/pkg/${BUILD_GOTUPLE}/cmd
 	find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
 		cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
 	done