summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-03-29 16:39:53 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-19 14:14:14 +0100
commit365dae4e47b956b39fb62d9c6dcb917a11b37cba (patch)
tree6ad88c046eaed81a4e0c0ebc49f44aad3681d53c
parent4b379e94ea6d5b96245c8724689209b44cace562 (diff)
downloadopenembedded-core-365dae4e47b956b39fb62d9c6dcb917a11b37cba.tar.gz
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 <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/go/go-target.inc4
1 files changed, 2 insertions, 2 deletions
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"