[gcc-6] 79/401: * GCC 6 snapshot build, taken from the trunk 20160211.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:48:05 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 78feca34b21a3004b87f2e232b5a03ac1f5a7e90
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Thu Feb 11 22:03:49 2016 +0000

      * GCC 6 snapshot build, taken from the trunk 20160211.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8662 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog            |   5 +-
 debian/patches/pr66904.diff | 163 --------------------------------------------
 debian/rules.patch          |   1 -
 3 files changed, 3 insertions(+), 166 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ad51f10..6e00282 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
-gcc-6 (6-20160205-2) UNRELEASED; urgency=medium
+gcc-6 (6-20160211-1) UNRELEASED; urgency=medium
 
+  * GCC 6 snapshot build, taken from the trunk 20160211.
   * Update symbols files.
 
- -- Matthias Klose <doko at debian.org>  Sun, 07 Feb 2016 11:16:31 +0100
+ -- Matthias Klose <doko at debian.org>  Thu, 11 Feb 2016 22:36:28 +0100
 
 gcc-6 (6-20160205-1) experimental; urgency=medium
 
diff --git a/debian/patches/pr66904.diff b/debian/patches/pr66904.diff
deleted file mode 100644
index ac86b7d..0000000
--- a/debian/patches/pr66904.diff
+++ /dev/null
@@ -1,163 +0,0 @@
-# DP: PR go/66904, pass linker flags from "#cgo pkg-config:" directives.
-
-commit 6209b6e6b849b6d913be74253e0e972de01d4785
-Author: Michael Hudson-Doyle <michael.hudson at canonical.com>
-Date:   Thu Jan 21 14:53:55 2016 +1300
-
-    cmd/go: fix "#cgo pkg-config:" comments with gccgo
-    
-    DO NOT SUBMIT
-    
-    This is too late for Go 1.6 but we'd like to get a fix into Ubuntu (as a distro
-    patch) so a review would be appreciated.
-    
-    The unique difficulty of #cgo pkg-config is that the linker flags are recorded
-    when the package is compiled but (obviously) must be used when the package is
-    linked into an executable -- so the flags need to be stored on disk somewhere.
-    As it happens cgo already writes out a _cgo_flags file: nothing uses it
-    currently, but this change adds it to the lib$pkg.a file when compiling a
-    package, reads it out when linking (and passes a version of the .a file with
-    _cgo_flags stripped out of it to the linker). It's all fairly ugly but it works
-    and I can't really think of any way of reducing the essential level of
-    ugliness.
-    
-    Fixes #11739
-    
-    Change-Id: I35621878014e1e107eda77a5b0b23d0240ec5750
-
---- a/src/libgo/go/cmd/go/build.go
-+++ a/src/libgo/go/cmd/go/build.go
-@@ -1327,6 +1327,9 @@ func (b *builder) build(a *action) (err error) {
- 		if err != nil {
- 			return err
- 		}
-+		if _, ok := buildToolchain.(gccgoToolchain); ok {
-+			cgoObjects = append(cgoObjects, filepath.Join(a.objdir, "_cgo_flags"))
-+		}
- 		cgoObjects = append(cgoObjects, outObj...)
- 		gofiles = append(gofiles, outGo...)
- 	}
-@@ -2480,12 +2483,64 @@ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions
- 	cxx := len(root.p.CXXFiles) > 0 || len(root.p.SwigCXXFiles) > 0
- 	objc := len(root.p.MFiles) > 0
- 
-+	readCgoFlags := func(flagsFile string) error {
-+		flags, err := ioutil.ReadFile(flagsFile)
-+		if err != nil {
-+			return err
-+		}
-+		for _, line := range strings.Split(string(flags), "\n") {
-+			if strings.HasPrefix(line, "_CGO_LDFLAGS=") {
-+				cgoldflags = append(cgoldflags, strings.Fields(line[13:])...)
-+			}
-+		}
-+		return nil
-+	}
-+
-+	readAndRemoveCgoFlags := func(archive string) (string, error) {
-+		newa, err := ioutil.TempFile(b.work, filepath.Base(archive))
-+		if err != nil {
-+			return "", err
-+		}
-+		olda, err := os.Open(archive)
-+		if err != nil {
-+			return "", err
-+		}
-+		_, err = io.Copy(newa, olda)
-+		if err != nil {
-+			return "", err
-+		}
-+		err = olda.Close()
-+		if err != nil {
-+			return "", err
-+		}
-+		err = newa.Close()
-+		if err != nil {
-+			return "", err
-+		}
-+
-+		newarchive := newa.Name()
-+		err = b.run(b.work, root.p.ImportPath, nil, "ar", "x", newarchive, "_cgo_flags")
-+		if err != nil {
-+			return "", err
-+		}
-+		err = b.run(".", root.p.ImportPath, nil, "ar", "d", newarchive, "_cgo_flags")
-+		if err != nil {
-+			return "", err
-+		}
-+		err = readCgoFlags(filepath.Join(b.work, "_cgo_flags"))
-+		if err != nil {
-+			return "", err
-+		}
-+		return newarchive, nil
-+	}
-+
- 	actionsSeen := make(map[*action]bool)
- 	// Make a pre-order depth-first traversal of the action graph, taking note of
- 	// whether a shared library action has been seen on the way to an action (the
- 	// construction of the graph means that if any path to a node passes through
- 	// a shared library action, they all do).
- 	var walk func(a *action, seenShlib bool)
-+	var err error
- 	walk = func(a *action, seenShlib bool) {
- 		if actionsSeen[a] {
- 			return
-@@ -2504,16 +2559,23 @@ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions
- 			// doesn't work.
- 			if !apackagesSeen[a.p] {
- 				apackagesSeen[a.p] = true
-+				target := a.target
-+				if len(a.p.CgoFiles) > 0 {
-+					target, err = readAndRemoveCgoFlags(target)
-+					if err != nil {
-+						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, a.target)
-+					xfiles = append(xfiles, target)
- 				} else if a.p.fake {
- 					// move _test files to the top of the link order
--					afiles = append([]string{a.target}, afiles...)
-+					afiles = append([]string{target}, afiles...)
- 				} else {
--					afiles = append(afiles, a.target)
-+					afiles = append(afiles, target)
- 				}
- 			}
- 		}
-@@ -2523,10 +2585,16 @@ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions
- 		}
- 		for _, a1 := range a.deps {
- 			walk(a1, seenShlib)
-+			if err != nil {
-+				return
-+			}
- 		}
- 	}
- 	for _, a1 := range root.deps {
- 		walk(a1, false)
-+		if err != nil {
-+			return err
-+		}
- 	}
- 	afiles = append(xfiles, afiles...)
- 
-@@ -2555,6 +2623,14 @@ func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions
- 		}
- 	}
- 
-+	for i, o := range ofiles {
-+		if filepath.Base(o) == "_cgo_flags" {
-+			readCgoFlags(o)
-+			ofiles = append(ofiles[:i], ofiles[i+1:]...)
-+			break
-+		}
-+	}
-+
- 	ldflags = append(ldflags, "-Wl,--whole-archive")
- 	ldflags = append(ldflags, afiles...)
- 	ldflags = append(ldflags, "-Wl,--no-whole-archive")
diff --git a/debian/rules.patch b/debian/rules.patch
index 555f441..bacc322 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -81,7 +81,6 @@ debian_patches += \
 	pr67590 \
 	ada-gnattools-ldflags \
 	libjit-ldflags \
-	pr66904 \
 
 # 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