Package: src:golang-1.8
Version: 1.8.5-1
Tags: patch pending
User: [email protected]
Usertags: ppc64el 

--

Dear maintainer,

I see that the package golang-1.8 fails to build on ppc64el :
https://buildd.debian.org/status/fetch.php?pkg=golang-1.8&arch=ppc64el&ver=1.8.5-1&stamp=1509012143&raw=0
This is a well known issue fixed in later versions and it was discussed 
here : https://go-review.googlesource.com/c/go/+/66870
For current source, I did minimal changes inspired from the "Patch Set
2" listed above and only targeted linux-ppc64le. Maybe linux-ppc64
could be included as well but I've no machine to test the fix on ppc64.
Also, sorry for the failed upload (hopefully), I wanted to upload to
debomatic but missed some arguments.

Regards.
F.

Attachment: pgpQWdOPcb4uV.pgp
Description: PGP signature

Description: Fix build on ppc64el when using PIE
 This problem is known and has been fixed in different ways depending on the
golang version : https://go-review.googlesource.com/c/go/+/66870 I took patch
set 2 and only applied the fix for ppc64el to not introduce any other issue on
other archs.
Author: Frédéric Bonnard <[email protected]>
Origin: https://go-review.googlesource.com/c/go/+/66870
Bug: https://golang.org/issue/21954
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -899,14 +899,26 @@
                                if err := cmd.Run(); err != nil {
                                        fmt.Println("No support for -pie found, 
skip cgo PIE test.")
                                } else {
-                                       cmd = t.addCmd(dt, "misc/cgo/test", 
"go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-                                       cmd.Env = env
+                                       if pair != "linux-ppc64le" {
+                                               cmd = t.addCmd(dt, 
"misc/cgo/test", "go", "test", "-ldflags", `-linkmode=external -extldflags 
"-pie"`)
+                                               cmd.Env = env
 
-                                       cmd = t.addCmd(dt, "misc/cgo/testtls", 
"go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-                                       cmd.Env = env
+                                               cmd = t.addCmd(dt, 
"misc/cgo/testtls", "go", "test", "-ldflags", `-linkmode=external -extldflags 
"-pie"`)
+                                               cmd.Env = env
 
-                                       cmd = t.addCmd(dt, "misc/cgo/nocgo", 
"go", "test", "-ldflags", `-linkmode=external -extldflags "-pie"`)
-                                       cmd.Env = env
+                                               cmd = t.addCmd(dt, 
"misc/cgo/nocgo", "go", "test", "-ldflags", `-linkmode=external -extldflags 
"-pie"`)
+                                               cmd.Env = env
+                                       } else {
+                                               cmd = t.addCmd(dt, 
"misc/cgo/test", "go", "test", "-buildmode=pie")
+                                               cmd.Env = env
+
+                                               cmd = t.addCmd(dt, 
"misc/cgo/testtls", "go", "test", "-buildmode=pie")
+                                               cmd.Env = env
+
+                                               cmd = t.addCmd(dt, 
"misc/cgo/nocgo", "go", "test", "-buildmode=pie")
+                                               cmd.Env = env
+
+                                       }
 
                                }
                        }

Attachment: pgpEqtaPVwkjY.pgp
Description: PGP signature

Reply via email to