[Pkg-golang-commits] [golang] 01/02: 0002-buildpathprefix.patch: also rewrite /tmp/go-build for cgo

Michael Stapelberg michael at stapelberg.de
Mon Jul 31 10:38:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

stapelberg pushed a commit to branch reproducible-1.8
in repository golang.

commit 0949a920f19faafc7d7ec5fe60700af581bb21a8
Author: Michael Stapelberg <stapelberg at debian.org>
Date:   Mon Jul 31 12:15:08 2017 +0200

    0002-buildpathprefix.patch: also rewrite /tmp/go-build for cgo
---
 debian/patches/0002-buildpathprefix.patch | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/debian/patches/0002-buildpathprefix.patch b/debian/patches/0002-buildpathprefix.patch
index a7d2efe..7c8ac55 100644
--- a/debian/patches/0002-buildpathprefix.patch
+++ b/debian/patches/0002-buildpathprefix.patch
@@ -81,3 +81,19 @@ Index: reproducible-golang/src/cmd/link/internal/ld/dwarf.go
  		Adduint8(ctxt, ls, 0)
  		Adduint8(ctxt, ls, 0)
  		Adduint8(ctxt, ls, 0)
+Index: reproducible-golang/src/cmd/go/build.go
+===================================================================
+--- reproducible-golang.orig/src/cmd/go/build.go
++++ reproducible-golang/src/cmd/go/build.go
+@@ -2617,7 +2617,10 @@ func (gcToolchain) ld(b *builder, root *
+ 		dir, out = filepath.Split(out)
+ 	}
+ 
+-	return b.run(dir, root.p.ImportPath, nil, buildToolExec, tool("link"), "-o", out, importArgs, ldflags, mainpkg)
++	// Apply the rewrite of $WORK to /tmp/go-build also to DWARF file tables:
++	env := []string{"BUILD_PATH_PREFIX_MAP=/tmp/go-build=" + b.work + ":" + os.Getenv("BUILD_PATH_PREFIX_MAP")}
++
++	return b.run(dir, root.p.ImportPath, env, buildToolExec, tool("link"), "-o", out, importArgs, ldflags, mainpkg)
+ }
+ 
+ func (gcToolchain) ldShared(b *builder, toplevelactions []*action, out string, allactions []*action) error {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list