All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] package/pkg-golang: enable trimpath option for reproducible builds
@ 2019-12-07 19:51 Christian Stewart
  0 siblings, 0 replies; only message in thread
From: Christian Stewart @ 2019-12-07 19:51 UTC (permalink / raw)
  To: buildroot

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 <christian@paral.in>
---
 package/pkg-golang.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index e47de17aba..98f903604c 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -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.
-- 
2.24.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-07 19:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07 19:51 [Buildroot] [PATCH v1 1/1] package/pkg-golang: enable trimpath option for reproducible builds Christian Stewart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.