From 4eeb2afd0e317c173d4f35bca00604d661b7fac2 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 29 Mar 2022 16:39:53 -0700 Subject: go-target: Pass -trimpath to go linker This is for improving reproducibility to trim absolute paths as these recipes do not inherit go bbclass where it would be set automatically (From OE-Core rev: 365dae4e47b956b39fb62d9c6dcb917a11b37cba) Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- meta/recipes-devtools/go/go-target.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'meta/recipes-devtools/go/go-target.inc') diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index d085643036..ed09cfe806 100644 --- a/meta/recipes-devtools/go/go-target.inc +++ b/meta/recipes-devtools/go/go-target.inc @@ -14,9 +14,9 @@ export CGO_LDFLAGS = "${@ ' '.join(filter(lambda f: not f.startswith('-fdebug-pr export GOCACHE = "${B}/.cache" GO_LDFLAGS = "" -GO_LDFLAGS:class-nativesdk = "-linkmode external" +GO_LDFLAGS:class-nativesdk = " -linkmode external" export GO_LDFLAGS - +export GOBUILDFLAGS = "-gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -trimpath" CC:append:class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}" do_configure[noexec] = "1" -- cgit v1.2.3-54-g00ecf