[gcc-6] 233/401: * Backport upstream revisions from trunk (James Clark). Closes: #840574.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:49:44 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 62564bf1d70f2c48f35b907dc639999c06700312
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Wed Oct 19 11:33:04 2016 +0000

      * Backport upstream revisions from trunk (James Clark). Closes: #840574.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@9006 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog                                   |  19 +
 debian/control                                     | 517 +--------------------
 debian/patches/libgo-add-getrandom-mips-sparc.diff |  67 +++
 debian/patches/libgo-elf-relocations-sparc64.diff  | 107 +++++
 .../patches/libgo-fix-getrandom-clone-sparc64.diff | 343 ++++++++++++++
 debian/patches/libgo-rawClone-no-pt_regs.diff      |  33 ++
 debian/patches/libgo-rawClone-no_split_stack.diff  |  22 +
 debian/rules.patch                                 |   5 +
 8 files changed, 597 insertions(+), 516 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fdbd800..ab77237 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+gcc-6 (6.2.0-8) UNRELEASED; urgency=medium
+
+  * 
+  * Backport upstream revisions from trunk (James Clark). Closes: #840574.
+    - r240457 (add getrandom for MIPS/SPARC)
+    - r241051 (fix getrandom on sparc64 and clone on sparc*)
+    - r241072 (make rawClone no_split_stack)
+    - r241084 (don't use pt_regs; unnecessary, and seemingly not defined by
+               the included headers on arm64)
+    - r241171 (sparc64 relocations, e1fc2925 in go master, now also in
+               gofrontend/gccgo)
+
+ -- Matthias Klose <doko at debian.org>  Wed, 19 Oct 2016 08:57:23 +0200
+
+gcc-6 (6.2.0-7+sparc64) unreleased; urgency=medium
+
+
+ -- James Clarke <jrtc27 at jrtc27.com>  Tue, 18 Oct 2016 18:11:43 +0100
+
 gcc-6 (6.2.0-7) unstable; urgency=medium
 
   * Update to SVN 20161018 (r241301, 6.2.1) from the gcc-6-branch.
diff --git a/debian/control b/debian/control
index ab82dd9..755fa98 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9.20141010), dpkg-dev (>= 1.17.14),
   gperf (>= 3.0.1), bison (>= 1:2.3), flex, gettext, 
   gdb:native, 
   texinfo (>= 4.3), locales, sharutils, 
-  procps, zlib1g-dev, libantlr-java, python:native, libffi-dev, fastjar, libmagic-dev, libecj-java (>= 3.3.0-2), zip, libasound2-dev [ !hurd-any !kfreebsd-any], libxtst-dev, libxt-dev, libgtk2.0-dev (>= 2.4.4-2), libart-2.0-dev, libcairo2-dev, gnat-6:native [!m32r !sh3 !sh3eb !sh4eb !powerpcspe !m68k !mips64 !x32], g++-6:native, netbase, 
+  procps, zlib1g-dev, libantlr-java, python:native, libffi-dev, gnat-6:native [!m32r !sh3 !sh3eb !sh4eb !powerpcspe !m68k !mips64 !x32], g++-6:native, netbase, 
   libisl-dev (>= 0.14), libmpc-dev (>= 1.0), libmpfr-dev (>= 3.0.0-9~), libgmp-dev (>= 2:5.0.1~), 
   dejagnu [!m68k], realpath (>= 1.9.12), chrpath, lsb-release, quilt, 
    g++-6-alpha-linux-gnu [alpha] <cross>, gobjc-6-alpha-linux-gnu [alpha] <cross>, gfortran-6-alpha-linux-gnu [alpha] <cross>, gcj-6-alpha-linux-gnu [alpha] <cross>, gdc-6-alpha-linux-gnu [alpha] <cross>, gccgo-6-alpha-linux-gnu [alpha] <cross>, gnat-6-alpha-linux-gnu [alpha] <cross>, g++-6-x86-64-linux-gnu [amd64] <cross>, gobjc-6-x86-64-linux-gnu [amd64] <cross>, gfortran-6-x86-64-linux-gnu [amd64] <cross>, gcj-6-x86-64-linux-gnu [amd64] <cross>, gdc-6-x86-64-linux-gnu [amd64] <cross>, [...]
@@ -1410,92 +1410,6 @@ Description: Runtime library for GNU Objective-C applications (x32 development f
  This package contains the headers and static library files needed to build
  GNU ObjC applications.
 
-Package: libobjc4
-Section: libs
-Architecture: any
-Provides: libobjc4-armel [armel], libobjc4-armhf [armhf]
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: libobjc4-dbg
-Section: debug
-Architecture: any
-Provides: libobjc4-dbg-armel [armel], libobjc4-dbg-armhf [armhf]
-Multi-Arch: same
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), libobjc4 (= ${gcc:Version}), libgcc1-dbg (>= ${libgcc:Version}), ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (debug symbols)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: lib64objc4
-Section: libs
-Architecture: i386 powerpc sparc s390 mips mipsel mipsn32 mipsn32el x32
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (64bit)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: lib64objc4-dbg
-Section: debug
-Architecture: i386 powerpc sparc s390 mips mipsel mipsn32 mipsn32el x32
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), lib64objc4 (= ${gcc:Version}), lib64gcc1-dbg (>= ${gcc:EpochVersion}), ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (64 bit debug symbols)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: lib32objc4
-Section: libs
-Architecture: amd64 ppc64 kfreebsd-amd64 s390x sparc64 x32 mipsn32 mipsn32el mips64 mips64el
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends}
-Conflicts: ${confl:lib32}
-Description: Runtime library for GNU Objective-C applications (32bit)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: lib32objc4-dbg
-Section: debug
-Architecture: amd64 ppc64 kfreebsd-amd64 s390x sparc64 x32 mipsn32 mipsn32el mips64 mips64el
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), lib32objc4 (= ${gcc:Version}), lib32gcc1-dbg (>= ${gcc:EpochVersion}), ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (32 bit debug symbols)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: libn32objc4
-Section: libs
-Architecture: mips mipsel mips64 mips64el
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (n32)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: libn32objc4-dbg
-Section: debug
-Architecture: mips mipsel mips64 mips64el
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), libn32objc4 (= ${gcc:Version}), libn32gcc1-dbg (>= ${gcc:EpochVersion}), ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (n32 debug symbols)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: libx32objc4
-Section: libs
-Architecture: amd64 i386
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:libcbiarch}, ${shlibs:Depends}, ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (x32)
- Library needed for GNU ObjC applications linked against the shared library.
-
-Package: libx32objc4-dbg
-Section: debug
-Architecture: amd64 i386
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), libx32objc4 (= ${gcc:Version}), libx32gcc1-dbg (>= ${gcc:EpochVersion}), ${misc:Depends}
-Description: Runtime library for GNU Objective-C applications (x32 debug symbols)
- Library needed for GNU ObjC applications linked against the shared library.
-
 Package: gfortran-6
 Architecture: any
 Priority: optional
@@ -1794,156 +1708,6 @@ Description: Runtime library for GNU Go applications (x32 debug symbols)
  shared library. This currently is an empty package, because the
  library is completely unstripped.
 
-Package: gcj-6
-Section: java
-Architecture: any
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:gcj}, ${dep:gcjcross}, ${dep:libcdev}, ${dep:ecj}, ${shlibs:Depends}, dpkg (>= 1.15.4) | install-info, ${misc:Depends}
-Recommends: libecj-java-gcj
-Replaces: gcj-5-jdk (<< 5.2.1-19)
-Suggests: gcj-6-jdk
-Description: GCJ byte code and native compiler for Java(TM)
- GCJ is a front end to the GCC compiler which can natively compile both
- Java(tm) source and bytecode files. The compiler can also generate class
- files.
- .
- Install the gcj-6-jdk package for a more complete SDK environment.
-
-Package: gcj-6-jdk
-Section: java
-Architecture: any
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${dep:gcj}, ${dep:libcdev}, gcj-6 (= ${gcj:Version}), gcj-6-jre (= ${gcj:Version}), libgcj17-dev (>= ${gcj:Version}), fastjar, libgcj-bc, java-common, libantlr-java, ${shlibs:Depends}, dpkg (>= 1.15.4) | install-info, ${misc:Depends}
-Recommends: libecj-java-gcj
-Suggests: gcj-6-source (>= ${gcj:SoftVersion}), libgcj17-dbg (>= ${gcc:Version})
-Provides: java-compiler, java-sdk, java2-sdk, java5-sdk
-Conflicts: gcj-4.4, cpp-4.1 (<< 4.1.1), gcc-4.1 (<< 4.1.1)
-Replaces: libgcj11 (<< 4.5-20100101-1)
-Description: GCJ and Classpath development tools for Java(TM)
- GCJ is a front end to the GCC compiler which can natively compile both
- Java(tm) source and bytecode files. The compiler can also generate class
- files. Other java development tools from classpath are included in this
- package.
- .
- The package contains as well a collection of wrapper scripts and symlinks.
- It is meant to provide a Java-SDK-like interface to the GCJ tool set.
-
-Package: gcj-6-jre-headless
-Priority: optional
-Section: java
-Architecture: any
-Depends: gcc-6-base (= ${gcc:Version}), gcj-6-jre-lib (>= ${gcj:SoftVersion}), libgcj17 (>= ${gcj:Version}), ${dep:prctl}, ${shlibs:Depends}, ${misc:Depends}
-Suggests: fastjar, gcj-6-jdk (= ${gcj:Version}), libgcj17-awt (>= ${gcj:Version})
-Provides: java5-runtime-headless, java2-runtime-headless, java1-runtime-headless, java-runtime-headless
-Description: Java runtime environment using GIJ/Classpath (headless version)
- GIJ is a Java bytecode interpreter, not limited to interpreting bytecode.
- It includes a class loader which can dynamically load shared objects, so
- it is possible to give it the name of a class which has been compiled and
- put into a shared library on the class path.
- .
- The package contains as well a collection of wrapper scripts and symlinks.
- It is meant to provide a Java-RTE-like interface to the GIJ/GCJ tool set,
- limited to the headless tools and libraries.
-
-Package: gcj-6-jre
-Section: java
-Architecture: any
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), gcj-6-jre-headless (= ${gcj:Version}), libgcj17-awt (>= ${gcj:Version}), ${shlibs:Depends}, ${misc:Depends}
-Provides: java5-runtime, java2-runtime, java1-runtime, java-runtime
-Description: Java runtime environment using GIJ/Classpath
- GIJ is a Java bytecode interpreter, not limited to interpreting bytecode.
- It includes a class loader which can dynamically load shared objects, so
- it is possible to give it the name of a class which has been compiled and
- put into a shared library on the class path.
- .
- The package contains as well a collection of wrapper scripts and symlinks.
- It is meant to provide a Java-RTE-like interface to the GIJ/GCJ tool set.
-
-Package: libgcj17
-Section: libs
-Architecture: any
-Priority: optional
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), libgcj-common (>= 1:4.1.1-21), ${shlibs:Depends}, ${misc:Depends}
-Recommends: gcj-6-jre-lib (>= ${gcj:SoftVersion})
-Suggests: libgcj17-dbg (>= ${gcc:Version}), libgcj17-awt (= ${gcj:Version})
-Description: Java runtime library for use with gcj
- This is the runtime that goes along with the gcj front end to
- gcc. libgcj includes parts of the Java Class Libraries, plus glue to
- connect the libraries to the compiler and the underlying OS.
- .
- To show file names and line numbers in stack traces, the packages
- libgcj17-dbg and binutils are required.
-
-Package: gcj-6-jre-lib
-Section: java
-Architecture: all
-Priority: optional
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), libgcj17 (>= ${gcj:SoftVersion}), ${misc:Depends}
-Description: Java runtime library for use with gcj (jar files)
- This is the jar file that goes along with the gcj front end to gcc.
-
-Package: libgcj17-awt
-Section: libs
-Architecture: any
-Priority: optional
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), libgcj17 (= ${gcj:Version}), ${shlibs:Depends}, ${misc:Depends}
-Suggests: ${pkg:gcjqt}
-Description: AWT peer runtime libraries for use with gcj
- These are runtime libraries holding the AWT peer implementations
- for libgcj (currently the GTK+ based peer library is required, the
- QT bases library is not built).
-
-Package: libgcj17-dev
-Section: libdevel
-Architecture: any
-Multi-Arch: same
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), libgcj17-awt (= ${gcj:Version}), libgcj-bc, ${pkg:gcjgtk}, ${pkg:gcjqt}, zlib1g-dev, ${shlibs:Depends}, ${misc:Depends}
-Suggests: libgcj-doc
-Description: Java development headers for use with gcj
- These are the development headers that go along with the gcj front end
- to gcc. libgcj includes parts of the Java Class Libraries, plus glue
- to connect the libraries to the compiler and the underlying OS.
-
-Package: libgcj17-dbg
-Section: debug
-Architecture: any
-Priority: extra
-Pre-Depends: ${misc:Pre-Depends}
-Multi-Arch: same
-Depends: gcc-6-base (= ${gcc:Version}), libgcj17 (= ${gcj:Version}), ${misc:Depends}
-Recommends: binutils, libc6-dbg | libc-dbg
-Description: Debugging symbols for libraries provided in libgcj17-dev
- The package provides debugging symbols for the libraries provided
- in libgcj17-dev.
- .
- binutils is required to show file names and line numbers in stack traces.
-
-Package: gcj-6-source
-Section: java
-Architecture: all
-Priority: optional
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), gcj-6-jdk (>= ${gcj:SoftVersion}), ${misc:Depends}
-Description: GCJ java sources for use in IDEs like eclipse and netbeans
- These are the java source files packaged as a zip file for use in development
- environments like eclipse and netbeans.
-
-Package: libgcj-doc
-Section: doc
-Architecture: all
-Priority: optional
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), ${misc:Depends}
-Enhances: libgcj17-dev
-Provides: classpath-doc
-Description: libgcj API documentation and example programs
- Autogenerated documentation describing the API of the libgcj library.
- Sources and precompiled example programs from the Classpath library.
-
 Package: libstdc++6
 Architecture: any
 Section: libs
@@ -2198,285 +1962,6 @@ Description: GNU Standard C++ Library v3 (documentation files)
  alphabetical list, compound list, file list, namespace members,
  compound members and file members.
 
-Package: gnat-6
-Architecture: any
-Priority: optional
-Pre-Depends: ${misc:Pre-Depends}
-Depends: gcc-6-base (= ${gcc:Version}), gcc-6 (>= ${gcc:SoftVersion}), ${dep:libgnat}, ${dep:libcdev}, ${shlibs:Depends}, ${misc:Depends}
-Suggests: gnat-6-doc, ada-reference-manual-2012, gnat-6-sjlj
-Breaks:   gnat (<< 4.6.1), dh-ada-library (<< 6.0), gnat-4.6-base (= 4.6.4-2),
- gnat-4.9-base (= 4.9-20140330-1)
-Replaces: gnat (<< 4.6.1), dh-ada-library (<< 6.0), gnat-4.6-base (= 4.6.4-2),
- gnat-4.9-base (= 4.9-20140330-1)
-# Takes over symlink from gnat (<< 4.6.1): /usr/bin/gnatgcc.
-# Takes over file from dh-ada-library (<< 6.0): debian_packaging.mk.
-# g-base 4.6.4-2, 4.9-20140330-1 contain debian_packaging.mk by mistake.
-# Newer versions of gnat and dh-ada-library will not provide these files.
-Conflicts: gnat (<< 4.1), gnat-3.1, gnat-3.2, gnat-3.3, gnat-3.4, gnat-3.5,
- gnat-4.0, gnat-4.1, gnat-4.2, gnat-4.3, gnat-4.4, gnat-4.6, gnat-4.7, gnat-4.8,
- gnat-4.9, gnat-5
-# These other packages will continue to provide /usr/bin/gnatmake and
-# other files.
-Description: GNU Ada compiler
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- This package provides the compiler, tools and runtime library that handles
- exceptions using the default zero-cost mechanism.
-
-Package: gnat-6-sjlj
-Architecture: any
-Priority: extra
-Pre-Depends: ${misc:Pre-Depends}
-Depends: gcc-6-base (= ${gcc:Version}), gnat-6 (= ${gnat:Version}), ${misc:Depends}
-Description: GNU Ada compiler (setjump/longjump runtime library)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- This package provides an alternative runtime library that handles
- exceptions using the setjump/longjump mechanism (as a static library
- only).  You can install it to supplement the normal compiler.
-
-Package: libgnat-6
-Section: libs
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), ${shlibs:Depends}, ${misc:Depends}
-Description: runtime for applications compiled with GNAT (shared library)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- The libgnat library provides runtime components needed by most
- applications produced with GNAT.
- .
- This package contains the runtime shared library.
-
-Package: libgnat-6-dbg
-Section: debug
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), libgnat-6 (= ${gnat:Version}), ${misc:Depends}
-Description: runtime for applications compiled with GNAT (debugging symbols)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- The libgnat library provides runtime components needed by most
- applications produced with GNAT.
- .
- This package contains the debugging symbols.
-
-Package: libgnatvsn6-dev
-Section: libdevel
-Architecture: any
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), gnat-6 (= ${gnat:Version}),
- libgnatvsn6 (= ${gnat:Version}), ${misc:Depends}
-Conflicts: libgnatvsn-dev (<< 6),
- libgnatvsn4.1-dev, libgnatvsn4.3-dev, libgnatvsn4.4-dev,
- libgnatvsn4.5-dev, libgnatvsn4.6-dev, libgnatvsn4.9-dev,
- libgnatvsn5-dev,
-Description: GNU Ada compiler selected components (development files)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- The libgnatvsn library exports selected GNAT components for use in other
- packages, most notably ASIS tools. It is licensed under the GNAT-Modified
- GPL, allowing to link proprietary programs with it.
- .
- This package contains the development files and static library.
-
-Package: libgnatvsn6
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: optional
-Section: libs
-Depends: gcc-6-base (= ${gcc:Version}), libgnat-6 (= ${gnat:Version}),
- ${shlibs:Depends}, ${misc:Depends}
-Description: GNU Ada compiler selected components (shared library)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- The libgnatvsn library exports selected GNAT components for use in other
- packages, most notably ASIS tools. It is licensed under the GNAT-Modified
- GPL, allowing to link proprietary programs with it.
- .
- This package contains the runtime shared library.
-
-Package: libgnatvsn6-dbg
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: extra
-Section: debug
-Depends: gcc-6-base (= ${gcc:Version}), libgnatvsn6 (= ${gnat:Version}), ${misc:Depends}
-Suggests: gnat
-Description: GNU Ada compiler selected components (debugging symbols)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- The libgnatvsn library exports selected GNAT components for use in other
- packages, most notably ASIS tools. It is licensed under the GNAT-Modified
- GPL, allowing to link proprietary programs with it.
- .
- This package contains the debugging symbols.
-
-Package: libgnatprj6-dev
-Section: libdevel
-Architecture: any
-Priority: extra
-Depends: gcc-6-base (= ${gcc:Version}), gnat-6 (= ${gnat:Version}),
- libgnatprj6 (= ${gnat:Version}),
- libgnatvsn6-dev (= ${gnat:Version}), ${misc:Depends}
-Conflicts: libgnatprj-dev (<< 6),
- libgnatprj4.1-dev, libgnatprj4.3-dev, libgnatprj4.4-dev,
- libgnatprj4.5-dev, libgnatprj4.6-dev, libgnatprj4.9-dev,
- libgnatprj5-dev,
-Description: GNU Ada compiler Project Manager (development files)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- GNAT uses project files to organise source and object files in large-scale
- development efforts. The libgnatprj library exports GNAT project files
- management for use in other packages, most notably ASIS tools (package
- asis-programs) and GNAT Programming Studio (package gnat-gps). It is
- licensed under the pure GPL; all programs that use it must also be
- distributed under the GPL, or not distributed at all.
- .
- This package contains the development files and static library.
-
-Package: libgnatprj6
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: optional
-Section: libs
-Depends: gcc-6-base (= ${gcc:Version}), libgnat-6 (= ${gnat:Version}),
- libgnatvsn6 (= ${gnat:Version}),
- ${shlibs:Depends}, ${misc:Depends}
-Description: GNU Ada compiler Project Manager (shared library)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- GNAT uses project files to organise source and object files in large-scale
- development efforts. The libgnatprj library exports GNAT project files
- management for use in other packages, most notably ASIS tools (package
- asis-programs) and GNAT Programming Studio (package gnat-gps). It is
- licensed under the pure GPL; all programs that use it must also be
- distributed under the GPL, or not distributed at all.
- .
- This package contains the runtime shared library.
-
-Package: libgnatprj6-dbg
-Architecture: any
-Multi-Arch: same
-Pre-Depends: ${misc:Pre-Depends}
-Priority: extra
-Section: debug
-Depends: gcc-6-base (= ${gcc:Version}), libgnatprj6 (= ${gnat:Version}), ${misc:Depends}
-Suggests: gnat
-Description: GNU Ada compiler Project Manager (debugging symbols)
- GNAT is a compiler for the Ada programming language. It produces optimized
- code on platforms supported by the GNU Compiler Collection (GCC).
- .
- GNAT uses project files to organise source and object files in large-scale
- development efforts. The libgnatprj library exports GNAT project files
- management for use in other packages, most notably ASIS tools (package
- asis-programs) and GNAT Programming Studio (package gnat-gps). It is
- licensed under the pure GPL; all programs that use it must also be
- distributed under the GPL, or not distributed at all.
- .
- This package contains the debugging symbols.
-
-Package: gdc-6
-Architecture: any
-Priority: optional
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), g++-6 (>= ${gcc:SoftVersion}), ${dep:gdccross}, ${dep:phobosdev}, ${shlibs:Depends}, ${misc:Depends}
-Provides: gdc, d-compiler, d-v2-compiler
-Replaces: gdc (<< 4.4.6-5)
-Description: GNU D compiler (version 2)
- This is the GNU D compiler, which compiles D on platforms supported by gcc.
- It uses the gcc backend to generate optimised code.
- .
- This compiler supports D language version 2.
-
-Package: gdc-6-multilib
-Architecture: any
-Priority: optional
-Depends: gcc-6-base (>= ${gcc:SoftVersion}), gdc-6 (= ${gcc:Version}), gcc-6-multilib (= ${gcc:Version}), ${dep:libphobosbiarchdev}${shlibs:Depends}, ${misc:Depends}
-Description: GNU D compiler (version 2, multilib support)
- This is the GNU D compiler, which compiles D on platforms supported by gcc.
- It uses the gcc backend to generate optimised code.
- .
- This is a dependency package, depending on development packages
- for the non-default multilib architecture(s).
-
-Package: libphobos-6-dev
-Architecture: amd64 armel armhf i386 x32 kfreebsd-amd64 kfreebsd-i386
-Section: libdevel
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), zlib1g-dev, ${shlibs:Depends}, ${misc:Depends}
-Description: Phobos D standard library
- This is the Phobos standard library that comes with the D2 compiler.
- .
- For more information check http://www.dlang.org/phobos/
-
-#Package: libphobos`'PHOBOS_V`'PV`'TS-dbg
-#Section: debug
-#Architecture: ifdef(`TARGET',`CROSS_ARCH',`libphobos_archs')
-#Priority: extra
-#Depends: BASELDEP, libphobos`'PHOBOS_V`'PV-dev (= ${gdc:Version}), ${misc:Depends}
-#Provides: libphobos`'PHOBOS_V`'TS-dbg
-#BUILT_USING`'dnl
-#Description: The Phobos D standard library (debug symbols)
-# This is the Phobos standard library that comes with the D2 compiler.
-# .
-# For more information check http://www.dlang.org/phobos/
-
-Package: lib64phobos-6-dev
-Architecture: i386 powerpc sparc s390 mips mipsel mipsn32 mipsn32el x32
-Section: libdevel
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), lib64gcc-6-dev (= ${gcc:Version}), lib64z1-dev, ${shlibs:Depends}, ${misc:Depends}
-Description: Phobos D standard library (64bit development files)
- This is the Phobos standard library that comes with the D2 compiler.
- .
- For more information check http://www.dlang.org/phobos/
-
-Package: lib32phobos-6-dev
-Architecture: amd64 ppc64 kfreebsd-amd64 s390x sparc64 x32 mipsn32 mipsn32el mips64 mips64el
-Section: libdevel
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), lib32gcc-6-dev (= ${gcc:Version}), lib32z1-dev, ${shlibs:Depends}, ${misc:Depends}
-Description: Phobos D standard library (64bit development files)
- This is the Phobos standard library that comes with the D2 compiler.
- .
- For more information check http://www.dlang.org/phobos/
-
-Package: libx32phobos-6-dev
-Architecture: amd64 i386
-Section: libdevel
-Priority: optional
-Depends: gcc-6-base (= ${gcc:Version}), libx32gcc-6-dev (= ${gcc:Version}), ${dep:libx32z}, ${shlibs:Depends}, ${misc:Depends}
-Description: Phobos D standard library (x32 development files)
- This is the Phobos standard library that comes with the D2 compiler.
- .
- For more information check http://www.dlang.org/phobos/
-
-#Package: gcc`'PV-soft-float
-#Architecture: arm armel armhf
-#Priority: PRI(optional)
-#Depends: BASEDEP, depifenabled(`cdev',`gcc`'PV (= ${gcc:Version}),') ${shlibs:Depends}, ${misc:Depends}
-#Conflicts: gcc-4.4-soft-float, gcc-4.5-soft-float, gcc-4.6-soft-float
-#BUILT_USING`'dnl
-#Description: GCC soft-floating-point gcc libraries (ARM)
-# These are versions of basic static libraries such as libgcc.a compiled
-# with the -msoft-float option, for CPUs without a floating-point unit.
-
 Package: fixincludes
 Architecture: any
 Priority: optional
diff --git a/debian/patches/libgo-add-getrandom-mips-sparc.diff b/debian/patches/libgo-add-getrandom-mips-sparc.diff
new file mode 100644
index 0000000..378e78c
--- /dev/null
+++ b/debian/patches/libgo-add-getrandom-mips-sparc.diff
@@ -0,0 +1,67 @@
+# DP: Backport r240457 from trunk
+
+internal/syscall/unix: add getrandom syscall for MIPS and SPARC
+
+Reviewed-on: https://go-review.googlesource.com/29678
+
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go
+===================================================================
+--- a/src/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go	(nonexistent)
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_mipso32.go	(revision 240457)
+@@ -0,0 +1,11 @@
++// Copyright 2016 The Go Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style
++// license that can be found in the LICENSE file.
++
++// +build mipso32
++
++package unix
++
++// Linux getrandom system call number.
++// See GetRandom in getrandom_linux.go.
++const randomTrap uintptr = 4353
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go
+===================================================================
+--- a/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go	(nonexistent)
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go	(revision 240457)
+@@ -0,0 +1,11 @@
++// Copyright 2016 The Go Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style
++// license that can be found in the LICENSE file.
++
++// +build sparc sparc64
++
++package unix
++
++// Linux getrandom system call number.
++// See GetRandom in getrandom_linux.go.
++const randomTrap uintptr = 347
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go
+===================================================================
+--- a/src/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go	(revision 240456)
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_mips64x.go	(revision 240457)
+@@ -2,7 +2,7 @@
+ // Use of this source code is governed by a BSD-style
+ // license that can be found in the LICENSE file.
+ 
+-// +build mips64 mips64le
++// +build mips64 mips64le mipsn64 mipso64
+ 
+ package unix
+ 
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go
+===================================================================
+--- a/src/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go	(nonexistent)
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_mipsn32.go	(revision 240457)
+@@ -0,0 +1,11 @@
++// Copyright 2016 The Go Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style
++// license that can be found in the LICENSE file.
++
++// +build mipsn32
++
++package unix
++
++// Linux getrandom system call number.
++// See GetRandom in getrandom_linux.go.
++const randomTrap uintptr = 6317
diff --git a/debian/patches/libgo-elf-relocations-sparc64.diff b/debian/patches/libgo-elf-relocations-sparc64.diff
new file mode 100644
index 0000000..6972714
--- /dev/null
+++ b/debian/patches/libgo-elf-relocations-sparc64.diff
@@ -0,0 +1,107 @@
+# DP: Backport r241051 from trunk
+
+debug/elf: add sparc64 relocations
+
+This is a backport of https://go-review.googlesource.com/30870.
+
+Reviewed-on: https://go-review.googlesource.com/30916
+
+Index: b/src/libgo/go/debug/elf/file_test.go
+===================================================================
+--- a/src/libgo/go/debug/elf/file_test.go	(revision 241170)
++++ b/src/libgo/go/debug/elf/file_test.go	(revision 241171)
+@@ -492,6 +492,25 @@
+ 		},
+ 	},
+ 	{
++		"testdata/go-relocation-test-gcc620-sparc64.obj",
++		[]relocationTestEntry{
++			{0, &dwarf.Entry{
++				Offset:   0xb,
++				Tag:      dwarf.TagCompileUnit,
++				Children: true,
++				Field: []dwarf.Field{
++					{Attr: dwarf.AttrProducer, Val: "GNU C11 6.2.0 20160914 -mcpu=v9 -g -fstack-protector-strong", Class: dwarf.ClassString},
++					{Attr: dwarf.AttrLanguage, Val: int64(12), Class: dwarf.ClassConstant},
++					{Attr: dwarf.AttrName, Val: "hello.c", Class: dwarf.ClassString},
++					{Attr: dwarf.AttrCompDir, Val: "/tmp", Class: dwarf.ClassString},
++					{Attr: dwarf.AttrLowpc, Val: uint64(0x0), Class: dwarf.ClassAddress},
++					{Attr: dwarf.AttrHighpc, Val: int64(0x2c), Class: dwarf.ClassConstant},
++					{Attr: dwarf.AttrStmtList, Val: int64(0), Class: dwarf.ClassLinePtr},
++				},
++			}},
++		},
++	},
++	{
+ 		"testdata/go-relocation-test-gcc493-mips64le.obj",
+ 		[]relocationTestEntry{
+ 			{0, &dwarf.Entry{
+Index: b/src/libgo/go/debug/elf/file.go
+===================================================================
+--- a/src/libgo/go/debug/elf/file.go	(revision 241170)
++++ b/src/libgo/go/debug/elf/file.go	(revision 241171)
+@@ -598,6 +598,8 @@
+ 		return f.applyRelocationsMIPS64(dst, rels)
+ 	case f.Class == ELFCLASS64 && f.Machine == EM_S390:
+ 		return f.applyRelocationsS390x(dst, rels)
++	case f.Class == ELFCLASS64 && f.Machine == EM_SPARCV9:
++		return f.applyRelocationsSPARC64(dst, rels)
+ 	default:
+ 		return errors.New("applyRelocations: not implemented")
+ 	}
+@@ -962,6 +964,51 @@
+ 	return nil
+ }
+ 
++func (f *File) applyRelocationsSPARC64(dst []byte, rels []byte) error {
++	// 24 is the size of Rela64.
++	if len(rels)%24 != 0 {
++		return errors.New("length of relocation section is not a multiple of 24")
++	}
++
++	symbols, _, err := f.getSymbols(SHT_SYMTAB)
++	if err != nil {
++		return err
++	}
++
++	b := bytes.NewReader(rels)
++	var rela Rela64
++
++	for b.Len() > 0 {
++		binary.Read(b, f.ByteOrder, &rela)
++		symNo := rela.Info >> 32
++		t := R_SPARC(rela.Info & 0xffff)
++
++		if symNo == 0 || symNo > uint64(len(symbols)) {
++			continue
++		}
++		sym := &symbols[symNo-1]
++		if SymType(sym.Info&0xf) != STT_SECTION {
++			// We don't handle non-section relocations for now.
++			continue
++		}
++
++		switch t {
++		case R_SPARC_64, R_SPARC_UA64:
++			if rela.Off+8 >= uint64(len(dst)) || rela.Addend < 0 {
++				continue
++			}
++			f.ByteOrder.PutUint64(dst[rela.Off:rela.Off+8], uint64(rela.Addend))
++		case R_SPARC_32, R_SPARC_UA32:
++			if rela.Off+4 >= uint64(len(dst)) || rela.Addend < 0 {
++				continue
++			}
++			f.ByteOrder.PutUint32(dst[rela.Off:rela.Off+4], uint32(rela.Addend))
++		}
++	}
++
++	return nil
++}
++
+ func (f *File) DWARF() (*dwarf.Data, error) {
+ 	// sectionData gets the data for s, checks its size, and
+ 	// applies any applicable relations.
+Index: b/src/libgo/go/debug/elf/testdata/go-relocation-test-gcc620-sparc64.obj
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
diff --git a/debian/patches/libgo-fix-getrandom-clone-sparc64.diff b/debian/patches/libgo-fix-getrandom-clone-sparc64.diff
new file mode 100644
index 0000000..7df5d9b
--- /dev/null
+++ b/debian/patches/libgo-fix-getrandom-clone-sparc64.diff
@@ -0,0 +1,343 @@
+# DP: Backport r241072 from trunk
+
+syscall, internal/syscall/unix: Fix getrandom, clone on sparc64
+
+Since sparc is a valid architecture, the name of
+getrandom_linux_sparc.go means that it will be ignored on sparc64,
+even though it's whitelisted with a +build line.
+
+On SPARC, clone has a unique return value convention which requires
+some inline assembly to convert it to the normal convention.
+
+Reviewed-on: https://go-review.googlesource.com/30873
+
+Index: b/src/libgo/mksysinfo.sh
+===================================================================
+--- a/src/libgo/mksysinfo.sh
++++ b/src/libgo/mksysinfo.sh
+@@ -603,8 +603,10 @@ fi
+ sizeof_long=`grep '^const ___SIZEOF_LONG__ = ' gen-sysinfo.go | sed -e 's/.*= //'`
+ if test "$sizeof_long" = "4"; then
+   echo "type _C_long int32" >> ${OUT}
++  echo "type _C_ulong uint32" >> ${OUT}
+ elif test "$sizeof_long" = "8"; then
+   echo "type _C_long int64" >> ${OUT}
++  echo "type _C_ulong uint64" >> ${OUT}
+ else
+   echo 1>&2 "mksysinfo.sh: could not determine size of long (got $sizeof_long)"
+   exit 1
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go
+===================================================================
+--- a/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparc.go
+@@ -1,11 +0,0 @@
+-// Copyright 2016 The Go Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style
+-// license that can be found in the LICENSE file.
+-
+-// +build sparc sparc64
+-
+-package unix
+-
+-// Linux getrandom system call number.
+-// See GetRandom in getrandom_linux.go.
+-const randomTrap uintptr = 347
+Index: b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparcx.go
+===================================================================
+--- /dev/null
++++ b/src/libgo/go/internal/syscall/unix/getrandom_linux_sparcx.go
+@@ -0,0 +1,11 @@
++// Copyright 2016 The Go Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style
++// license that can be found in the LICENSE file.
++
++// +build sparc sparc64
++
++package unix
++
++// Linux getrandom system call number.
++// See GetRandom in getrandom_linux.go.
++const randomTrap uintptr = 347
+Index: b/src/libgo/go/syscall/clone_linux.c
+===================================================================
+--- /dev/null
++++ b/src/libgo/go/syscall/clone_linux.c
+@@ -0,0 +1,100 @@
++/* clone_linux.c -- consistent wrapper around Linux clone syscall
++
++   Copyright 2016 The Go Authors. All rights reserved.
++   Use of this source code is governed by a BSD-style
++   license that can be found in the LICENSE file.  */
++
++#include <errno.h>
++#include <asm/ptrace.h>
++#include <sys/syscall.h>
++
++#include "runtime.h"
++
++long rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs) __asm__ (GOSYM_PREFIX "syscall.rawClone");
++
++long
++rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
++{
++#if defined(__arc__) || defined(__aarch64__) || defined(__arm__) || defined(__mips__) || defined(__hppa__) || defined(__powerpc__) || defined(__score__) || defined(__i386__) || defined(__xtensa__)
++  // CLONE_BACKWARDS
++  return syscall(__NR_clone, flags, child_stack, ptid, regs, ctid);
++#elif defined(__s390__) || defined(__cris__)
++  // CLONE_BACKWARDS2
++  return syscall(__NR_clone, child_stack, flags, ptid, ctid, regs);
++#elif defined(__microblaze__)
++  // CLONE_BACKWARDS3
++  return syscall(__NR_clone, flags, child_stack, 0, ptid, ctid, regs);
++#elif defined(__sparc__)
++
++  /* SPARC has a unique return value convention:
++
++     Parent -->  %o0 == child's  pid, %o1 == 0
++     Child  -->  %o0 == parent's pid, %o1 == 1
++
++     Translate this to look like a normal clone.  */
++
++# if defined(__arch64__)
++
++#  define SYSCALL_STRING						\
++	"ta	0x6d;"							\
++	"bcc,pt	%%xcc, 1f;"						\
++	" mov	0, %%g1;"						\
++	"sub	%%g0, %%o0, %%o0;"					\
++	"mov	1, %%g1;"						\
++	"1:"
++
++#  define SYSCALL_CLOBBERS						\
++	"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",			\
++	"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",		\
++	"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",		\
++	"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",		\
++	"f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46",		\
++	"f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62",		\
++	"cc", "memory"
++
++# else /* __arch64__ */
++
++#  define SYSCALL_STRING						\
++	"ta	0x10;"							\
++	"bcc	1f;"							\
++	" mov	0, %%g1;"						\
++	"sub	%%g0, %%o0, %%o0;"					\
++	"mov	1, %%g1;"						\
++	"1:"
++
++#  define SYSCALL_CLOBBERS						\
++	"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",			\
++	"f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",		\
++	"f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",		\
++	"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",		\
++	"cc", "memory"
++
++# endif /* __arch64__ */
++
++  register long o0 __asm__ ("o0") = (long)flags;
++  register long o1 __asm__ ("o1") = (long)child_stack;
++  register long o2 __asm__ ("o2") = (long)ptid;
++  register long o3 __asm__ ("o3") = (long)ctid;
++  register long o4 __asm__ ("o4") = (long)regs;
++  register long g1 __asm__ ("g1") = __NR_clone;
++
++  __asm __volatile (SYSCALL_STRING :
++		    "=r" (g1), "=r" (o0), "=r" (o1) :
++		    "0" (g1), "1" (o0), "2" (o1),
++		    "r" (o2), "r" (o3), "r" (o4) :
++		    SYSCALL_CLOBBERS);
++
++  if (__builtin_expect(g1 != 0, 0))
++    {
++      errno = -o0;
++      o0 = -1L;
++    }
++  else
++    o0 &= (o1 - 1);
++
++  return o0;
++
++#else
++  return syscall(__NR_clone, flags, child_stack, ptid, ctid, regs);
++#endif
++}
+Index: b/src/libgo/go/syscall/exec_linux.go
+===================================================================
+--- a/src/libgo/go/syscall/exec_linux.go
++++ b/src/libgo/go/syscall/exec_linux.go
+@@ -7,7 +7,6 @@
+ package syscall
+ 
+ import (
+-	"runtime"
+ 	"unsafe"
+ )
+ 
+@@ -48,6 +47,9 @@ type SysProcAttr struct {
+ func runtime_BeforeFork()
+ func runtime_AfterFork()
+ 
++// Implemented in clone_linux.c
++func rawClone(flags _C_ulong, child_stack *byte, ptid *Pid_t, ctid *Pid_t, regs unsafe.Pointer) _C_long
++
+ // Fork, dup fd onto 0..len(fd), and exec(argv0, argvv, envv) in child.
+ // If a dup or exec fails, write the errno error to pipe.
+ // (Pipe is close-on-exec so if exec succeeds, it will be closed.)
+@@ -63,6 +65,7 @@ func forkAndExecInChild(argv0 *byte, arg
+ 	// declarations require heap allocation (e.g., err1).
+ 	var (
+ 		r1     uintptr
++		r2     _C_long
+ 		err1   Errno
+ 		err2   Errno
+ 		nextfd int
+@@ -97,20 +100,16 @@ func forkAndExecInChild(argv0 *byte, arg
+ 	// About to call fork.
+ 	// No more allocation or calls of non-assembly functions.
+ 	runtime_BeforeFork()
+-	if runtime.GOARCH == "s390x" || runtime.GOARCH == "s390" {
+-		r1, _, err1 = RawSyscall6(SYS_CLONE, 0, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0)
+-	} else {
+-		r1, _, err1 = RawSyscall6(SYS_CLONE, uintptr(SIGCHLD)|sys.Cloneflags, 0, 0, 0, 0, 0)
+-	}
+-	if err1 != 0 {
++	r2 = rawClone(_C_ulong(uintptr(SIGCHLD)|sys.Cloneflags), nil, nil, nil, unsafe.Pointer(nil))
++	if r2 < 0 {
+ 		runtime_AfterFork()
+-		return 0, err1
++		return 0, GetErrno()
+ 	}
+ 
+-	if r1 != 0 {
++	if r2 != 0 {
+ 		// parent; return PID
+ 		runtime_AfterFork()
+-		pid = int(r1)
++		pid = int(r2)
+ 
+ 		if sys.UidMappings != nil || sys.GidMappings != nil {
+ 			Close(p[0])
+Index: b/src/libgo/Makefile.am
+===================================================================
+--- a/src/libgo/Makefile.am
++++ b/src/libgo/Makefile.am
+@@ -2145,6 +2145,12 @@ else
+ os_lib_inotify_lo =
+ endif
+ 
++if LIBGO_IS_LINUX
++syscall_lib_clone_lo = syscall/clone_linux.lo
++else
++syscall_lib_clone_lo =
++endif
++
+ libgo_go_objs = \
+ 	bufio.lo \
+ 	bytes.lo \
+@@ -2175,6 +2181,7 @@ libgo_go_objs = \
+ 	strings/index.lo \
+ 	sync.lo \
+ 	syscall.lo \
++	$(syscall_lib_clone_lo) \
+ 	syscall/errno.lo \
+ 	syscall/signame.lo \
+ 	syscall/wait.lo \
+@@ -3820,6 +3827,9 @@ syscall.lo.dep: $(go_syscall_files)
+ 	$(BUILDDEPS)
+ syscall.lo: $(go_syscall_files)
+ 	$(BUILDPACKAGE)
++syscall/clone_linux.lo: go/syscall/clone_linux.c
++	@$(MKDIR_P) syscall
++	$(LTCOMPILE) -c -o $@ $<
+ syscall/errno.lo: go/syscall/errno.c
+ 	@$(MKDIR_P) syscall
+ 	$(LTCOMPILE) -c -o $@ $<
+Index: b/src/libgo/Makefile.in
+===================================================================
+--- a/src/libgo/Makefile.in
++++ b/src/libgo/Makefile.in
+@@ -173,15 +173,16 @@ am__objects_3 = $(am__objects_2)
+ am_libnetgo_a_OBJECTS = $(am__objects_3)
+ libnetgo_a_OBJECTS = $(am_libnetgo_a_OBJECTS)
+ LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+-am__DEPENDENCIES_1 =
+-am__DEPENDENCIES_2 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
++ at LIBGO_IS_LINUX_TRUE@am__DEPENDENCIES_1 = syscall/clone_linux.lo
++am__DEPENDENCIES_2 =
++am__DEPENDENCIES_3 = bufio.lo bytes.lo bytes/index.lo crypto.lo \
+ 	encoding.lo errors.lo expvar.lo flag.lo fmt.lo hash.lo html.lo \
+ 	image.lo io.lo log.lo math.lo mime.lo net.lo os.lo path.lo \
+ 	reflect-go.lo reflect/makefunc_ffi_c.lo regexp.lo \
+ 	runtime-go.lo sort.lo strconv.lo strings.lo strings/index.lo \
+-	sync.lo syscall.lo syscall/errno.lo syscall/signame.lo \
+-	syscall/wait.lo testing.lo time-go.lo unicode.lo \
+-	archive/tar.lo archive/zip.lo compress/bzip2.lo \
++	sync.lo syscall.lo $(am__DEPENDENCIES_1) syscall/errno.lo \
++	syscall/signame.lo syscall/wait.lo testing.lo time-go.lo \
++	unicode.lo archive/tar.lo archive/zip.lo compress/bzip2.lo \
+ 	compress/flate.lo compress/gzip.lo compress/lzw.lo \
+ 	compress/zlib.lo container/heap.lo container/list.lo \
+ 	container/ring.lo crypto/aes.lo crypto/cipher.lo crypto/des.lo \
+@@ -213,18 +214,18 @@ am__DEPENDENCIES_2 = bufio.lo bytes.lo b
+ 	math/rand.lo mime/multipart.lo mime/quotedprintable.lo \
+ 	net/http.lo net/internal/socktest.lo net/mail.lo net/rpc.lo \
+ 	net/smtp.lo net/textproto.lo net/url.lo old/regexp.lo \
+-	old/template.lo os/exec.lo $(am__DEPENDENCIES_1) os/signal.lo \
++	old/template.lo os/exec.lo $(am__DEPENDENCIES_2) os/signal.lo \
+ 	os/user.lo path/filepath.lo regexp/syntax.lo \
+ 	net/rpc/jsonrpc.lo runtime/debug.lo runtime/pprof.lo \
+ 	sync/atomic.lo sync/atomic_c.lo text/scanner.lo \
+ 	text/tabwriter.lo text/template.lo text/template/parse.lo \
+ 	testing/iotest.lo testing/quick.lo unicode/utf16.lo \
+ 	unicode/utf8.lo
+-am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) \
+-	../libbacktrace/libbacktrace.la $(am__DEPENDENCIES_1) \
+-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+-libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_3)
++am__DEPENDENCIES_4 = $(am__DEPENDENCIES_3) \
++	../libbacktrace/libbacktrace.la $(am__DEPENDENCIES_2) \
++	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2) \
++	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_2)
++libgo_llgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
+ @LIBGO_IS_LINUX_FALSE at am__objects_4 = lock_sema.lo thread-sema.lo
+ @LIBGO_IS_LINUX_TRUE at am__objects_4 = lock_futex.lo thread-linux.lo
+ @HAVE_SYS_MMAN_H_FALSE at am__objects_5 = mem_posix_memalign.lo
+@@ -276,7 +277,7 @@ libgo_llgo_la_LINK = $(LIBTOOL) --tag=CC
+ 	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ 	$(libgo_llgo_la_LDFLAGS) $(LDFLAGS) -o $@
+ @GOC_IS_LLGO_TRUE at am_libgo_llgo_la_rpath = -rpath $(toolexeclibdir)
+-libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_3)
++libgo_la_DEPENDENCIES = $(am__DEPENDENCIES_4)
+ am_libgo_la_OBJECTS = $(am__objects_9)
+ libgo_la_OBJECTS = $(am_libgo_la_OBJECTS)
+ libgo_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+@@ -2156,6 +2157,8 @@ go_syscall_test_files = \
+ 
+ # os_lib_inotify_lo = os/inotify.lo
+ @LIBGO_IS_LINUX_TRUE at os_lib_inotify_lo = 
++ at LIBGO_IS_LINUX_FALSE@syscall_lib_clone_lo = 
++ at LIBGO_IS_LINUX_TRUE@syscall_lib_clone_lo = syscall/clone_linux.lo
+ libgo_go_objs = \
+ 	bufio.lo \
+ 	bytes.lo \
+@@ -2186,6 +2189,7 @@ libgo_go_objs = \
+ 	strings/index.lo \
+ 	sync.lo \
+ 	syscall.lo \
++	$(syscall_lib_clone_lo) \
+ 	syscall/errno.lo \
+ 	syscall/signame.lo \
+ 	syscall/wait.lo \
+@@ -6197,6 +6201,9 @@ syscall.lo.dep: $(go_syscall_files)
+ 	$(BUILDDEPS)
+ syscall.lo: $(go_syscall_files)
+ 	$(BUILDPACKAGE)
++syscall/clone_linux.lo: go/syscall/clone_linux.c
++	@$(MKDIR_P) syscall
++	$(LTCOMPILE) -c -o $@ $<
+ syscall/errno.lo: go/syscall/errno.c
+ 	@$(MKDIR_P) syscall
+ 	$(LTCOMPILE) -c -o $@ $<
diff --git a/debian/patches/libgo-rawClone-no-pt_regs.diff b/debian/patches/libgo-rawClone-no-pt_regs.diff
new file mode 100644
index 0000000..8ae15de
--- /dev/null
+++ b/debian/patches/libgo-rawClone-no-pt_regs.diff
@@ -0,0 +1,33 @@
+# DP: Backport r241084 from trunk
+
+syscall: don't use pt_regs in clone_linux.c
+
+It's unnecessary and it reportedly breaks the build on arm64 GNU/Linux.
+
+Reviewed-on: https://go-review.googlesource.com/30978
+
+Index: b/src/libgo/go/syscall/clone_linux.c
+===================================================================
+--- a/src/libgo/go/syscall/clone_linux.c	(revision 241083)
++++ b/src/libgo/go/syscall/clone_linux.c	(revision 241084)
+@@ -5,18 +5,17 @@
+    license that can be found in the LICENSE file.  */
+ 
+ #include <errno.h>
+-#include <asm/ptrace.h>
+ #include <sys/syscall.h>
+ 
+ #include "runtime.h"
+ 
+ long rawClone (unsigned long flags, void *child_stack, void *ptid,
+-	       void *ctid, struct pt_regs *regs)
++	       void *ctid, void *regs)
+   __asm__ (GOSYM_PREFIX "syscall.rawClone")
+   __attribute__ ((no_split_stack));
+ 
+ long
+-rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
++rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, void *regs)
+ {
+ #if defined(__arc__) || defined(__aarch64__) || defined(__arm__) || defined(__mips__) || defined(__hppa__) || defined(__powerpc__) || defined(__score__) || defined(__i386__) || defined(__xtensa__)
+   // CLONE_BACKWARDS
diff --git a/debian/patches/libgo-rawClone-no_split_stack.diff b/debian/patches/libgo-rawClone-no_split_stack.diff
new file mode 100644
index 0000000..a758566
--- /dev/null
+++ b/debian/patches/libgo-rawClone-no_split_stack.diff
@@ -0,0 +1,22 @@
+# DP: Backport r241171 from trunk
+
+syscall: mark rawClone as no_split_stack
+
+Reviewed-on: https://go-review.googlesource.com/30955
+
+Index: b/src/libgo/go/syscall/clone_linux.c
+===================================================================
+--- a/src/libgo/go/syscall/clone_linux.c	(revision 241071)
++++ b/src/libgo/go/syscall/clone_linux.c	(revision 241072)
+@@ -10,7 +10,10 @@
+ 
+ #include "runtime.h"
+ 
+-long rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs) __asm__ (GOSYM_PREFIX "syscall.rawClone");
++long rawClone (unsigned long flags, void *child_stack, void *ptid,
++	       void *ctid, struct pt_regs *regs)
++  __asm__ (GOSYM_PREFIX "syscall.rawClone")
++  __attribute__ ((no_split_stack));
+ 
+ long
+ rawClone (unsigned long flags, void *child_stack, void *ptid, void *ctid, struct pt_regs *regs)
diff --git a/debian/rules.patch b/debian/rules.patch
index 194fae1..8e0f68f 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -94,6 +94,11 @@ debian_patches += \
 	libffi-pax \
 	libffi-race-condition \
 	pr77686-workaround \
+	libgo-add-getrandom-mips-sparc \
+	libgo-fix-getrandom-clone-sparc64 \
+	libgo-rawClone-no_split_stack \
+	libgo-rawClone-no-pt_regs \
+	libgo-elf-relocations-sparc64 \
 
 # 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