summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorOtavio Salvador <otavio.salvador@gmail.com>2020-05-21 23:22:37 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-26 18:26:49 +0100
commita1616faeb51525a312405948ff2e4dfd44164ebe (patch)
tree8c4d0bc8a203ee4a9a12269cfa1a50adfec36ceb /meta/classes
parentce277ec45f1f241b1eb17ea6999dbe5a718b898a (diff)
downloadpoky-a1616faeb51525a312405948ff2e4dfd44164ebe.tar.gz
go.bbclass: Add `-trimpath` to default build flags
The `-trimpath` option is important for reproducible builds so full build paths and module paths are not embedded. (From OE-Core rev: 03799cf6141abf75e7cfad5ec9822eb303b68e2f) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e3df027b3697b6a92b417bba8d442a5bd15525fd) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/go.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index c99689ac59..a9e31b50ea 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -41,7 +41,7 @@ GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${GO_RPATH_LINK} ${LDFLAGS
41GO_LINKMODE ?= "" 41GO_LINKMODE ?= ""
42GO_LINKMODE_class-nativesdk = "--linkmode=external" 42GO_LINKMODE_class-nativesdk = "--linkmode=external"
43GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' 43GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"'
44export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" 44export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath"
45export GOPATH_OMIT_IN_ACTIONID ?= "1" 45export GOPATH_OMIT_IN_ACTIONID ?= "1"
46export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" 46export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c"
47export GOPTESTFLAGS ?= "" 47export GOPTESTFLAGS ?= ""