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 <[email protected]> --- 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} } -- 2.20.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#160094): https://lists.openembedded.org/g/openembedded-core/message/160094 Mute This Topic: https://lists.openembedded.org/mt/88071318/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
