From: Otavio Salvador Date: Fri, 22 May 2020 02:22:37 +0000 (-0300) Subject: go.bbclass: Add `-trimpath` to default build flags X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~11025 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3df027b3697b6a92b417bba8d442a5bd15525fd;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Otavio Salvador Signed-off-by: Richard Purdie --- diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index c99689ac593..a9e31b50ea5 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 GO_LINKMODE ?= "" GO_LINKMODE_class-nativesdk = "--linkmode=external" GO_LDFLAGS ?= '-ldflags="${GO_RPATH} ${GO_LINKMODE} -extldflags '${GO_EXTLDFLAGS}'"' -export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS}" +export GOBUILDFLAGS ?= "-v ${GO_LDFLAGS} -trimpath" export GOPATH_OMIT_IN_ACTIONID ?= "1" export GOPTESTBUILDFLAGS ?= "${GOBUILDFLAGS} -c" export GOPTESTFLAGS ?= ""