[gcc-6] 351/401: * Fix PR go/79037, proposed golang patch (John Paul Adrian Glaubitz). Closes: #852091.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:50:37 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 3eac1d179f6bc4c1a7bd093faa9d96a229b21a08
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Sat Jan 21 17:20:15 2017 +0000

      * Fix PR go/79037, proposed golang patch (John Paul Adrian Glaubitz).
        Closes: #852091.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9236 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog               |  2 ++
 debian/patches/gccgo-m68k.diff | 65 ++++++++++++++++++++++++++++++++++++++++++
 debian/rules.patch             |  1 +
 3 files changed, 68 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3f14681..fb3600b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ gcc-6 (6.3.0-4) UNRELEASED; urgency=medium
 
   * Fix gdc cross build.
   * Better fix symlinks to unprefixed man pages. Closes: #851886.
+  * Fix PR go/79037, proposed golang patch (John Paul Adrian Glaubitz).
+    Closes: #852091.
 
  -- Matthias Klose <doko at debian.org>  Thu, 19 Jan 2017 13:40:26 +0100
 
diff --git a/debian/patches/gccgo-m68k.diff b/debian/patches/gccgo-m68k.diff
new file mode 100644
index 0000000..f8a6924
--- /dev/null
+++ b/debian/patches/gccgo-m68k.diff
@@ -0,0 +1,65 @@
+# DP: Fix PR go/79037, proposed golang patch.
+
+--- a/src/gcc/go/gofrontend/types.cc.orig	2016-02-03 07:54:41.000000000 +0100
++++ b/src/gcc/go/gofrontend/types.cc	2017-01-20 17:54:46.460409688 +0100
+@@ -2175,11 +2175,25 @@
+       is_common = true;
+     }
+ 
++  // The current garbage collector requires that the GC symbol be
++  // aligned to at least a four byte boundary.  See the use of PRECISE
++  // and LOOP in libgo/runtime/mgc0.c.
++  int64_t align;
++  if (!sym_init->type()->backend_type_align(gogo, &align))
++    go_assert(saw_errors());
++  if (align < 4)
++    align = 4;
++  else
++    {
++      // Use default alignment.
++      align = 0;
++    }
++
+   // Since we are building the GC symbol in this package, we must create the
+   // variable before converting the initializer to its backend representation
+   // because the initializer may refer to the GC symbol for this type.
+   this->gc_symbol_var_ =
+-    gogo->backend()->implicit_variable(sym_name, sym_btype, false, true, is_common, 0);
++    gogo->backend()->implicit_variable(sym_name, sym_btype, false, true, is_common, align);
+   if (phash != NULL)
+     *phash = this->gc_symbol_var_;
+ 
+--- a/src/libgo/runtime/go-unsafe-pointer.c.orig	2015-10-29 19:14:50.000000000 +0100
++++ b/src/libgo/runtime/go-unsafe-pointer.c	2017-01-20 17:57:12.227392567 +0100
+@@ -36,7 +36,8 @@
+   sizeof REFLECTION - 1
+ };
+ 
+-const uintptr unsafe_Pointer_gc[] = {sizeof(void*), GC_APTR, 0, GC_END};
++const uintptr unsafe_Pointer_gc[] __attribute__((aligned(4))) =
++  {sizeof(void*), GC_APTR, 0, GC_END};
+ 
+ const struct __go_type_descriptor unsafe_Pointer =
+ {
+--- a/src/libgo/runtime/parfor.c.orig	2015-10-31 01:59:47.000000000 +0100
++++ b/src/libgo/runtime/parfor.c	2017-01-20 17:58:47.154729980 +0100
+@@ -10,7 +10,7 @@
+ struct ParForThread
+ {
+ 	// the thread's iteration space [32lsb, 32msb)
+-	uint64 pos;
++	uint64 pos __attribute__((aligned(8)));
+ 	// stats
+ 	uint64 nsteal;
+ 	uint64 nstealcnt;
+--- a/src/libgo/runtime/runtime.h.orig	2016-02-12 23:10:09.000000000 +0100
++++ b/src/libgo/runtime/runtime.h	2017-01-21 00:58:07.386595035 +0100
+@@ -431,7 +431,7 @@
+ 					// otherwise parfor may return while other threads are still working
+ 	ParForThread *thr;		// array of thread descriptors
+ 	// stats
+-	uint64 nsteal;
++	uint64 nsteal  __attribute__((aligned(8))); // force alignment for m68k
+ 	uint64 nstealcnt;
+ 	uint64 nprocyield;
+ 	uint64 nosyield;
diff --git a/debian/rules.patch b/debian/rules.patch
index 2ca2d8f..fdd13fd 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -381,6 +381,7 @@ ifeq ($(DEB_TARGET_ARCH),m68k)
   ifeq ($(with_ada),yes)
     debian_patches += m68k-revert-pr45144
   endif
+  debian_patches += gccgo-m68k
 endif
 
 # don't remove, this is regularly overwritten, see PR sanitizer/63958.

-- 
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