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>
Mon, 30 Oct 2017 23:16:17 +0000 (23:16 +0000)
commitb210be5ff1e34b142d172981d6aecbee2c005dc7
treed93e2a3b4e0f9b301f99597eadeab9bb96a65e91
parentae2b7e3c20e369e662f286208fc1f1d7020a9e65
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