From: Khem Raj Date: Tue, 29 Mar 2022 23:39:53 +0000 (-0700) Subject: go-target: Pass -trimpath to go linker X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~4366 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=365dae4e47b956b39fb62d9c6dcb917a11b37cba;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/go/go-target.inc b/meta/recipes-devtools/go/go-target.inc index d085643036a..ed09cfe8061 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"