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>
Wed, 7 Feb 2018 21:38:27 +0000 (21:38 +0000)
commitf349793946d640e7bd2e4f4d3442c919fe6efb4f
tree38cd2fec77029b15bcf2ea0cf0a4e3250b5530aa
parentaf1912fc22dbf81ee267b49e828125ec3b84dd02
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