From a587be1d18fc55fe57d1aa5aa7c9e26af887109e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sat, 1 Jan 2022 12:29:54 +0100 Subject: go: log build id computations go writes build-specific ids into binaries it produces and has a custom system for calculating them from file hashes, environment variables and other inputs (not that dissimilar to sstate cache, actually). This can go wrong :) in various ways (for purposes of reproducibility in particular), so this enables useful logs to see what happens and why. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/classes/go.bbclass | 2 ++ meta/recipes-devtools/go/go-common.inc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index aa54b4a08c..5c1fdd7d5f 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass @@ -2,6 +2,8 @@ inherit goarch GO_PARALLEL_BUILD ?= "${@oe.utils.parallel_make_argument(d, '-p %d')}" +export GODEBUG = "gocachehash=1" + GOROOT:class-native = "${STAGING_LIBDIR_NATIVE}/go" GOROOT:class-nativesdk = "${STAGING_DIR_TARGET}${libdir}/go" GOROOT = "${STAGING_LIBDIR}/go" diff --git a/meta/recipes-devtools/go/go-common.inc b/meta/recipes-devtools/go/go-common.inc index dfccebdb83..5bbf35b787 100644 --- a/meta/recipes-devtools/go/go-common.inc +++ b/meta/recipes-devtools/go/go-common.inc @@ -37,6 +37,8 @@ export GO386 ?= "${TARGET_GO386}" export GOMIPS ?= "${TARGET_GOMIPS}" export GOROOT_FINAL ?= "${libdir}/go" +export GODEBUG = "gocachehash=1" + do_compile:prepend() { BUILD_CC=${BUILD_CC} } -- cgit 1.2.3-korg