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>
Tue, 30 Jan 2018 02:01:08 +0000 (02:01 +0000)
commit16ee8ecc57525a29127c3d381e0b97b510d56b9d
treebdc88179edf9869dffe9b54a752aa4d3de5f26f4
parentae70381646eb93a8d113ad0a8622fab83e3a8b6a
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