package/pkg-golang: enable trimpath option for reproducible builds
PATCH v2 1/1 package/pkg-golang: enable trimpath option for reproducible builds
The -trimpath option removes absolute build paths from the target binary. This results in more consistent / reproducible builds across different systems with varying paths to Buildroot.
---
v1 -> v2:
- Fixed indentation on trimpath
package/pkg-golang.mk | 1 + 1 file changed, 1 insertion(+)
package/pkg-golang.mk +1 -0
@@ -61,6 +61,7 @@ $(2)_WORKSPACE ?= _gopath $(2)_BUILD_OPTS += \ -ldflags "$$($(2)_LDFLAGS)" \ -tags "$$($(2)_TAGS)" \ + -trimpath \ -p $(PARALLEL_JOBS) # Target packages need the Go compiler on the host.
Signature · 1 line
2.24.0
PATCH v2 1/1 package/pkg-golang: enable trimpath option for reproducible builds
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Christian" == Christian Stewart <[email protected]> writes:
The -trimpath option removes absolute build paths from the target binary. This results in more consistent / reproducible builds across different systems with varying paths to Buildroot.
Signed-off-by Christian Stewart <[email protected]>---
v1 -> v2:
- Fixed indentation on trimpath
Committed after extending the commit message to clarify that this is a new feature in go 1.13, so we shouldn't backport this to 2019.02.x.
Signature · 1 line
Bye, Peter Korsgaard