[gcc-6] 105/401: [ Michael Hudson-Doyle ] * cmd/go: deduplicate gccgo afiles by package path, not *Package. LP: #1566552.
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:48:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.
commit 3309c24f097733e72cadfc43a64a8890b77c1d88
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date: Fri Apr 8 12:09:15 2016 +0000
[ Michael Hudson-Doyle ]
* cmd/go: deduplicate gccgo afiles by package path, not *Package. LP: #1566552.
git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8747 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
debian/changelog | 7 +++++
debian/patches/gccgo-test-linking.diff | 57 ++++++++++++++++++++++++++++++++++
debian/rules.patch | 1 +
3 files changed, 65 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 9816f39..7c0d997 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gcc-6 (6-20160405-2) UNRELEASED; urgency=medium
+
+ [ Michael Hudson-Doyle ]
+ * cmd/go: deduplicate gccgo afiles by package path, not *Package. LP: #1566552.
+
+ -- Matthias Klose <doko at debian.org> Tue, 05 Apr 2016 16:39:49 +0200
+
gcc-6 (6-20160405-1) experimental; urgency=medium
* GCC 6 snapshot build, taken from the trunk 20160405.
diff --git a/debian/patches/gccgo-test-linking.diff b/debian/patches/gccgo-test-linking.diff
new file mode 100644
index 0000000..75eb6e8
--- /dev/null
+++ b/debian/patches/gccgo-test-linking.diff
@@ -0,0 +1,57 @@
+# DP: cmd/go: deduplicate gccgo afiles by package path, not *Package.
+
+--- a/src/libgo/go/cmd/go/build.go
++++ b/src/libgo/go/cmd/go/build.go
+@@ -2632,10 +2632,9 @@
+ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions []*action, mainpkg string, ofiles []string) error {
+ // gccgo needs explicit linking with all package dependencies,
+ // and all LDFLAGS from cgo dependencies.
+- apackagesSeen := make(map[*Package]bool)
++ apackagePathsSeen := make(map[string]bool)
+ afiles := []string{}
+ shlibs := []string{}
+- xfiles := []string{}
+ ldflags := b.gccArchArgs()
+ cgoldflags := []string{}
+ usesCgo := false
+@@ -2714,10 +2713,10 @@
+ // rather than the 'build' location (which may not exist any
+ // more). We still need to traverse the dependencies of the
+ // build action though so saying
+- // if apackagesSeen[a.p] { return }
++ // if apackagePathsSeen[a.p.ImportPath] { return }
+ // doesn't work.
+- if !apackagesSeen[a.p] {
+- apackagesSeen[a.p] = true
++ if !apackagePathsSeen[a.p.ImportPath] {
++ apackagePathsSeen[a.p.ImportPath] = true
+ target := a.target
+ if len(a.p.CgoFiles) > 0 {
+ target, err = readAndRemoveCgoFlags(target)
+@@ -2725,17 +2724,7 @@
+ return
+ }
+ }
+- if a.p.fake && a.p.external {
+- // external _tests, if present must come before
+- // internal _tests. Store these on a separate list
+- // and place them at the head after this loop.
+- xfiles = append(xfiles, target)
+- } else if a.p.fake {
+- // move _test files to the top of the link order
+- afiles = append([]string{target}, afiles...)
+- } else {
+- afiles = append(afiles, target)
+- }
++ afiles = append(afiles, target)
+ }
+ }
+ if strings.HasSuffix(a.target, ".so") {
+@@ -2755,7 +2744,6 @@
+ return err
+ }
+ }
+- afiles = append(xfiles, afiles...)
+
+ for _, a := range allactions {
+ // Gather CgoLDFLAGS, but not from standard packages.
diff --git a/debian/rules.patch b/debian/rules.patch
index b1c0bc3..40da8c9 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -79,6 +79,7 @@ debian_patches += \
pr67590 \
ada-gnattools-ldflags \
libjit-ldflags \
+ gccgo-test-linking
# this is still needed on powerpc, e.g. firefox and insighttoolkit4 will ftbfs.
ifneq (,$(filter $(DEB_TARGET_ARCH),powerpc))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git
More information about the Reproducible-commits
mailing list