diff -Nru golang-1.5.1/debian/changelog golang-1.5.1/debian/changelog --- golang-1.5.1/debian/changelog 2015-10-15 22:41:16.000000000 +1300 +++ golang-1.5.1/debian/changelog 2015-11-13 10:28:30.000000000 +1300 @@ -1,3 +1,9 @@ +golang (2:1.5.1-0ubuntu2) xenial; urgency=medium + + * Add d/patches/qemu-compat.patch (LP: 1501651) + + -- Michael Hudson-Doyle Fri, 13 Nov 2015 10:26:17 +1300 + golang (2:1.5.1-0ubuntu1.1) wily; urgency=medium * Recommends: golang-race-detector-runtime on amd64. diff -Nru golang-1.5.1/debian/patches/qemu-compat.patch golang-1.5.1/debian/patches/qemu-compat.patch --- golang-1.5.1/debian/patches/qemu-compat.patch 1970-01-01 12:00:00.000000000 +1200 +++ golang-1.5.1/debian/patches/qemu-compat.patch 2015-11-13 10:26:02.000000000 +1300 @@ -0,0 +1,17 @@ +Description: handle a quirk of rt_sigaction under user-mode qemu +Origin: https://go.googlesource.com/go/+/d10675089d74db0408f2432eae3bd89a8e1c2d6a +Bug: https://github.com/golang/go/issues/13024 +Applied-Upstream: commit:d10675089d74db0408f2432eae3bd89a8e1c2d6a + +--- a/src/runtime/os1_linux.go ++++ b/src/runtime/os1_linux.go +@@ -293,7 +293,8 @@ + fn = funcPC(sigtramp) + } + sa.sa_handler = fn +- if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 { ++ // Qemu rejects rt_sigaction of SIGRTMAX (64). ++ if rt_sigaction(uintptr(i), &sa, nil, unsafe.Sizeof(sa.sa_mask)) != 0 && i != 64 { + throw("rt_sigaction failure") + } + } diff -Nru golang-1.5.1/debian/patches/series golang-1.5.1/debian/patches/series --- golang-1.5.1/debian/patches/series 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/patches/series 2015-11-13 10:17:49.000000000 +1300 @@ -1 +1,2 @@ armhf-elf-header.patch +qemu-compat.patch