misc/cgo/testcarchive: use -no-pie where needed
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 11 Oct 2017 20:02:59 +0000 (16:02 -0400)
committerMichael Hudson-Doyle <mwhudson@debian.org>
Fri, 8 Dec 2017 01:09:24 +0000 (01:09 +0000)
commit51f9348db076e291a163b02c46f0db9992f87059
tree1ffe7a5f4349eb78b4ab96ccbc371bccd639c6f8
parentc2561d6b3b3f2fb02b190156ba76d6c56db837c3
misc/cgo/testcarchive: use -no-pie where needed

Starting in gcc 6, -pie is passed to the linker by default
on some platforms, including ppc64le. If the objects
being linked are not built for -pie then in some cases the
executable could be in error. To avoid that problem, -no-pie
should be used with gcc to override the default -pie option
and generate a correct executable that can be run without error.

Fixes #22126

Change-Id: I4a052bba8b9b3bd6706f5d27ca9a7cebcb504c95
Reviewed-on: https://go-review.googlesource.com/70072
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Gbp-Pq: Name 0006-misc-cgo-testcarchive-use-no-pie-where-needed.patch
misc/cgo/testcarchive/carchive_test.go