Bug#840574: Please backport libgo fixes for sparc64

2016-10-20 Thread James Clarke
Hi Matthias,
As promised yesterday on #debian-toolchain, here is a debdiff to fix the
libgo debug/elf testsuite failure by providing a uuencoded copy of
go-relocation-test-gcc620-sparc64.obj.

Regards,
James
diff -u gcc-6-6.2.0/debian/changelog gcc-6-6.2.0/debian/changelog
--- gcc-6-6.2.0/debian/changelog
+++ gcc-6-6.2.0/debian/changelog
@@ -1,3 +1,10 @@
+gcc-6 (6.2.0-9+sparc64) UNRELEASED; urgency=medium
+
+  * Include go-relocation-test-gcc620-sparc64.obj.uue to fix libgo's
+debug/elf TestDWARFRelocations test case.
+
+ -- James Clarke   Thu, 20 Oct 2016 20:32:51 +0100
+
 gcc-6 (6.2.0-9) unstable; urgency=medium
 
   * Regenerate the control file.
diff -u gcc-6-6.2.0/debian/patches/libgo-elf-relocations-sparc64.diff 
gcc-6-6.2.0/debian/patches/libgo-elf-relocations-sparc64.diff
--- gcc-6-6.2.0/debian/patches/libgo-elf-relocations-sparc64.diff
+++ gcc-6-6.2.0/debian/patches/libgo-elf-relocations-sparc64.diff
@@ -1,4 +1,7 @@
 # DP: Backport r241051 from trunk
+# DP: src/libgo/go/debug/elf/testdata/go-relocation-test-gcc620-sparc64.obj is
+# DP: encoded in debian/go-relocation-test-gcc620-sparc64.obj.uue and is
+# DP: decoded at patch time.
 
 debug/elf: add sparc64 relocations
 
@@ -104,4 +106,0 @@
-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 -u gcc-6-6.2.0/debian/rules.patch gcc-6-6.2.0/debian/rules.patch
--- gcc-6-6.2.0/debian/rules.patch
+++ gcc-6-6.2.0/debian/rules.patch
@@ -392,6 +392,10 @@
  $(patchdir)/svn-updates.diff > src/LAST_UPDATED
 endif
 
+ifneq (,$(filter libgo-elf-relocations-sparc64, $(debian_patches)))
+   uudecode debian/go-relocation-test-gcc620-sparc64.obj.uue
+endif
+
: # only needed when we have changes, and currently fails with autogen 
5.18
: #cd $(srcdir)/fixincludes && ./genfixes
 
@@ -409,6 +413,11 @@
mv pxxx $@
 
 unpatch:
+ifneq (,$(filter libgo-elf-relocations-sparc64, $(debian_patches)))
+   # uudecoded in $(patch_stamp) rule
+   rm -f 
$(srcdir)/libgo/go/debug/elf/testdata/go-relocation-test-gcc620-sparc64.obj
+endif
+
QUILT_PATCHES=$(patchdir) \
  quilt --quiltrc /dev/null pop -a -R || test $$? = 2
rm -rf .pc
only in patch2:
unchanged:
--- gcc-6-6.2.0.orig/debian/go-relocation-test-gcc620-sparc64.obj.uue
+++ gcc-6-6.2.0/debian/go-relocation-test-gcc620-sparc64.obj.uue
@@ -0,0 +1,136 @@
+begin 644 src/libgo/go/debug/elf/testdata/go-relocation-test-gcc620-sparc64.obj
+M?T5,1@("`0`!`"L!
+M`!(``@!```!``!4`$IWCOU""$``8\G>HA\(GJ'\#D!!@`$``
+M```!`0```('/X`@!`+"!W;W)L9`-"``0`
+M"`$`#```+``"``+8
+M.`,(!P`#`0@``P('``,$!P`#`08``P(%``0$
+M!6EN=``#"`4``@`#@P```"``.$:0,(!P`%"`8(
+ME0,!!@`'E0@`V`3Q```"'@D`!/(```!B``D`
+M!/<```"/"`D`!/@```"/$`D`!/D```"/&`D`!/H```"/(`D`
+M!/L```"/*`D`!/P```"/,`D`!/T```"/.`D`!/X```"/
+M0`H`!`$`CT@*``0!`0```(]0"@`$`0(```"/6`H`
+M!`$$```"5F`*``0!!@```EQH"@`$`0@```!B<`H`!`$,
+M8G0*``0!#@```'!X"@`$`1(```!&@`H`!`$35((*
+M``0!%F*#"@`$`1@```)RB`H`!`$A>Y`*``0!*0``
+M`(V8"@`$`2H```"-H`H`!`$KC:@*``0!+(VP"@``
+M```$`2XMN`H`!`$O8L`*``0!,0```GC$``L`!)8(
+M`!@$GE8)``2=```"5@`)``2>```"7`@)``2B
+M8A``!@@```(E!@@```"A#)4```)R#0```(8```8(```"'@P```"5```"
+MB`T```"&$P`.``\`!`$[```"B`\`!`$\```"B`\`!`$]
+M```"B`8(G`<```*Q$``%J@```EP0``6K```"7!``!:P`
+M``)<$``&&@```&(,```"MP```O,1``<```+H$``&```O,2
+M``$$+`&<```#/Q,``00```!B`Y&``1,`
+M`00```,_`Y&(`0`&"(\``1$!)0X3"P,.`1('$!<```(6``,..@L[
+M"TD3```#)``+"SX+`PX```0D``L+/@L#"```!0\`"PL```8/``L+21,```7-?;F5R<@!?24]?F5?=`!S:7IE
+M='EP90!?;V9F7-?97)R;=`!?9FEL96YO`+F,`
+M

Bug#840574: Please backport libgo fixes for sparc64

2016-10-18 Thread James Clarke
Control: tags -1 patch
(almost; explained below)

Hi Matthias,
On Tue, Oct 18, 2016 at 01:47:20PM +0200, Matthias Klose wrote:
> Control: tags -1 - patch
>
> James, based on your feedback, I tried to apply these revisions on the branch,
> had to update some of these, and got a failed build. I'm not intending to work
> on this, and would like to ask you to prepare a tested debdiff for a backport 
> or
> to get the backport upstream if you want to include the libgo port into the
> gcc-6 Debian packages.

Please find a debdiff attached; I have successfully built it on sparc64.

There is just *one* little detail which messes this up (and perhaps was
the cause of your failure?): libgo-elf-relocations-sparc64.diff
references a new binary file (for the test suite), but "svn diff"
doesn't include the actual data, nor does quilt seem to support
git-style binary diffs. Please either remove the hunks for
libgo/go/debug/elf/{file_test.go,testdata/go-relocation-test-gcc620-sparc64.obj}
or place a copy of the latter .obj in the source package and ensure it
gets copied to the same relative directory under src when
unpacking/patching.

Do let me know if I can do anything else to make this happen. I will
also see if I can get them backported upstream (though even with that
you'll still need to faff about with the .obj or drop the test...).

Thanks,
James

> On 16.10.2016 19:40, James Clarke wrote:
> > Control: tags -1 - help + patch
> >
> > Hi Matthias,
> > On Thu, Oct 13, 2016 at 01:50:43PM +0200, Matthias Klose wrote:
> >> Control: tags -1 + help
> >> Control: tags -1 - patch
> >>
> >> James, please could you name the revisions in the GCC subversion 
> >> repository?
> >> Afaics these are r241084, r241077, r241051.  Even better, could you test 
> >> and
> >> propose this backport upstream?
> >
> > To confirm, they are the following revisions:
> >
> > * r241171 (sparc64 relocations, e1fc2925 in go master, now also in
> >gofrontend/gccgo)
> > * r241084 (don't use pt_regs; unnecessary, and seemingly not defined by
> >the included headers on arm64)
> > * r241072 (make rawClone no_split_stack)
> > * r241051 (fix getrandom on sparc64 and clone on sparc*)
> > * r240457 (add getrandom for MIPS/SPARC)
> >
> > We've been using the latest gcc-6 package with these patches (other than
> > no_split_stack and pt_regs fixups) applied on top for sparc64 (uploaded
> > to unreleased) for the past few days, and the only packages which fail
> > to build seem to be because Debian currently has an out-of-date x/sys
> > package without sparc64 definitions. I haven't been aware of any
> > regressions.
> >
> > Ian: I imagine the getrandom and elf changes would be fine for gcc-6,
> > but what about the clone changes? I can understand if that's too
> > invasive, but backporting would be great.
> >
> > Regards,
> > James
> >
> >> On 12.10.2016 23:35, James Clarke wrote:
> >>> Source: gcc-6
> >>> Version: 6.2.0-6
> >>> User: debian-sp...@lists.debian.org
> >>> Usertags: sparc64
> >>> X-Debbugs-Cc: debian-sp...@lists.debian.org
> >>> Tags: patch fixed-upstream
> >>>
> >>> Hi,
> >>> Could you please backport the patches listed below so that we can have a
> >>> working gccgo? They fix the (minor) issue of using the wrong syscall
> >>> number for getrandom (if code uses it), add support for sparc64's
> >>> relocations, and also the following error when running go build:
> >>>
> >>> /usr/bin/sparc64-linux-gnu-gccgo-6: wait: no child processes
> >>> /usr/bin/sparc64-linux-gnu-gccgo-6: exit status 1
> >>>
> >>> The patches are:
> >>>
> >>> https://go.googlesource.com/go/+/e1fc292500aa70c265937aebad00ac010031cbaf
> >>> (not yet pulled into gofrontend's libgo)
> >>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a357a86a9f2772561454ce17ef13a89a51fc4a27
> >>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0509fa0eae193f8d99886e9b6a1feda4c6c16356
> >>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3457370357929d70f26873e914fae6ea6f1a8ffd
> >>>
> >>> With all but the last patch (a minor fixup after my patches), I have
> >>> been able to successfully build and run go programs on sparc64.
> >>>
> >>> Regards,
> >>> James
> >>>
> >>
>
diff -u gcc-6-6.2.0/debian/changelog gcc-6-6.2.0/debian/changelog
--- gcc-6-6.2.0/debian/changelog
+++ gcc-6-6.2.0/debian/changelog
@@ -1,3 +1,16 @@
+gcc-6 (6.2.0-7+sparc64) unreleased; urgency=medium
+
+  * Backport upstream revisions from trunk:
+- 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)
+
+ -- James Clarke   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 

Bug#840574: Please backport libgo fixes for sparc64

2016-10-18 Thread Matthias Klose
Control: tags -1 - patch

James, based on your feedback, I tried to apply these revisions on the branch,
had to update some of these, and got a failed build. I'm not intending to work
on this, and would like to ask you to prepare a tested debdiff for a backport or
to get the backport upstream if you want to include the libgo port into the
gcc-6 Debian packages.

Matthias

 proposed patches, please really check
On 16.10.2016 19:40, James Clarke wrote:
> Control: tags -1 - help + patch
> 
> Hi Matthias,
> On Thu, Oct 13, 2016 at 01:50:43PM +0200, Matthias Klose wrote:
>> Control: tags -1 + help
>> Control: tags -1 - patch
>>
>> James, please could you name the revisions in the GCC subversion repository?
>> Afaics these are r241084, r241077, r241051.  Even better, could you test and
>> propose this backport upstream?
> 
> To confirm, they are the following revisions:
> 
> * r241171 (sparc64 relocations, e1fc2925 in go master, now also in
>gofrontend/gccgo)
> * r241084 (don't use pt_regs; unnecessary, and seemingly not defined by
>the included headers on arm64)
> * r241072 (make rawClone no_split_stack)
> * r241051 (fix getrandom on sparc64 and clone on sparc*)
> * r240457 (add getrandom for MIPS/SPARC)
> 
> We've been using the latest gcc-6 package with these patches (other than
> no_split_stack and pt_regs fixups) applied on top for sparc64 (uploaded
> to unreleased) for the past few days, and the only packages which fail
> to build seem to be because Debian currently has an out-of-date x/sys
> package without sparc64 definitions. I haven't been aware of any
> regressions.
> 
> Ian: I imagine the getrandom and elf changes would be fine for gcc-6,
> but what about the clone changes? I can understand if that's too
> invasive, but backporting would be great.
> 
> Regards,
> James
> 
>> On 12.10.2016 23:35, James Clarke wrote:
>>> Source: gcc-6
>>> Version: 6.2.0-6
>>> User: debian-sp...@lists.debian.org
>>> Usertags: sparc64
>>> X-Debbugs-Cc: debian-sp...@lists.debian.org
>>> Tags: patch fixed-upstream
>>>
>>> Hi,
>>> Could you please backport the patches listed below so that we can have a
>>> working gccgo? They fix the (minor) issue of using the wrong syscall
>>> number for getrandom (if code uses it), add support for sparc64's
>>> relocations, and also the following error when running go build:
>>>
>>> /usr/bin/sparc64-linux-gnu-gccgo-6: wait: no child processes
>>> /usr/bin/sparc64-linux-gnu-gccgo-6: exit status 1
>>>
>>> The patches are:
>>>
>>> https://go.googlesource.com/go/+/e1fc292500aa70c265937aebad00ac010031cbaf
>>> (not yet pulled into gofrontend's libgo)
>>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a357a86a9f2772561454ce17ef13a89a51fc4a27
>>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0509fa0eae193f8d99886e9b6a1feda4c6c16356
>>> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3457370357929d70f26873e914fae6ea6f1a8ffd
>>>
>>> With all but the last patch (a minor fixup after my patches), I have
>>> been able to successfully build and run go programs on sparc64.
>>>
>>> Regards,
>>> James
>>>
>>



Bug#840574: Please backport libgo fixes for sparc64

2016-10-16 Thread James Clarke
Control: tags -1 - help + patch

Hi Matthias,
On Thu, Oct 13, 2016 at 01:50:43PM +0200, Matthias Klose wrote:
> Control: tags -1 + help
> Control: tags -1 - patch
>
> James, please could you name the revisions in the GCC subversion repository?
> Afaics these are r241084, r241077, r241051.  Even better, could you test and
> propose this backport upstream?

To confirm, they are the following revisions:

* r241171 (sparc64 relocations, e1fc2925 in go master, now also in
   gofrontend/gccgo)
* r241084 (don't use pt_regs; unnecessary, and seemingly not defined by
   the included headers on arm64)
* r241072 (make rawClone no_split_stack)
* r241051 (fix getrandom on sparc64 and clone on sparc*)
* r240457 (add getrandom for MIPS/SPARC)

We've been using the latest gcc-6 package with these patches (other than
no_split_stack and pt_regs fixups) applied on top for sparc64 (uploaded
to unreleased) for the past few days, and the only packages which fail
to build seem to be because Debian currently has an out-of-date x/sys
package without sparc64 definitions. I haven't been aware of any
regressions.

Ian: I imagine the getrandom and elf changes would be fine for gcc-6,
but what about the clone changes? I can understand if that's too
invasive, but backporting would be great.

Regards,
James

> On 12.10.2016 23:35, James Clarke wrote:
> > Source: gcc-6
> > Version: 6.2.0-6
> > User: debian-sp...@lists.debian.org
> > Usertags: sparc64
> > X-Debbugs-Cc: debian-sp...@lists.debian.org
> > Tags: patch fixed-upstream
> >
> > Hi,
> > Could you please backport the patches listed below so that we can have a
> > working gccgo? They fix the (minor) issue of using the wrong syscall
> > number for getrandom (if code uses it), add support for sparc64's
> > relocations, and also the following error when running go build:
> >
> > /usr/bin/sparc64-linux-gnu-gccgo-6: wait: no child processes
> > /usr/bin/sparc64-linux-gnu-gccgo-6: exit status 1
> >
> > The patches are:
> >
> > https://go.googlesource.com/go/+/e1fc292500aa70c265937aebad00ac010031cbaf
> > (not yet pulled into gofrontend's libgo)
> > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a357a86a9f2772561454ce17ef13a89a51fc4a27
> > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0509fa0eae193f8d99886e9b6a1feda4c6c16356
> > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3457370357929d70f26873e914fae6ea6f1a8ffd
> >
> > With all but the last patch (a minor fixup after my patches), I have
> > been able to successfully build and run go programs on sparc64.
> >
> > Regards,
> > James
> >
>


signature.asc
Description: PGP signature


Bug#840574: Please backport libgo fixes for sparc64

2016-10-13 Thread Matthias Klose
Control: tags -1 + help
Control: tags -1 - patch

James, please could you name the revisions in the GCC subversion repository?
Afaics these are r241084, r241077, r241051.  Even better, could you test and
propose this backport upstream?

Thanks, Matthias

On 12.10.2016 23:35, James Clarke wrote:
> Source: gcc-6
> Version: 6.2.0-6
> User: debian-sp...@lists.debian.org
> Usertags: sparc64
> X-Debbugs-Cc: debian-sp...@lists.debian.org
> Tags: patch fixed-upstream
> 
> Hi,
> Could you please backport the patches listed below so that we can have a
> working gccgo? They fix the (minor) issue of using the wrong syscall
> number for getrandom (if code uses it), add support for sparc64's
> relocations, and also the following error when running go build:
> 
> /usr/bin/sparc64-linux-gnu-gccgo-6: wait: no child processes
> /usr/bin/sparc64-linux-gnu-gccgo-6: exit status 1
> 
> The patches are:
> 
> https://go.googlesource.com/go/+/e1fc292500aa70c265937aebad00ac010031cbaf
> (not yet pulled into gofrontend's libgo)
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a357a86a9f2772561454ce17ef13a89a51fc4a27
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0509fa0eae193f8d99886e9b6a1feda4c6c16356
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3457370357929d70f26873e914fae6ea6f1a8ffd
> 
> With all but the last patch (a minor fixup after my patches), I have
> been able to successfully build and run go programs on sparc64.
> 
> Regards,
> James
> 



Bug#840574: Please backport libgo fixes for sparc64

2016-10-12 Thread James Clarke
Source: gcc-6
Version: 6.2.0-6
User: debian-sp...@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sp...@lists.debian.org
Tags: patch fixed-upstream

Hi,
Could you please backport the patches listed below so that we can have a
working gccgo? They fix the (minor) issue of using the wrong syscall
number for getrandom (if code uses it), add support for sparc64's
relocations, and also the following error when running go build:

/usr/bin/sparc64-linux-gnu-gccgo-6: wait: no child processes
/usr/bin/sparc64-linux-gnu-gccgo-6: exit status 1

The patches are:

https://go.googlesource.com/go/+/e1fc292500aa70c265937aebad00ac010031cbaf
(not yet pulled into gofrontend's libgo)
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a357a86a9f2772561454ce17ef13a89a51fc4a27
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0509fa0eae193f8d99886e9b6a1feda4c6c16356
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3457370357929d70f26873e914fae6ea6f1a8ffd

With all but the last patch (a minor fixup after my patches), I have
been able to successfully build and run go programs on sparc64.

Regards,
James


signature.asc
Description: PGP signature