From 5f6d5922af9995fa5bc000806d6401d9569f2bb6 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Mon, 13 Oct 2014 16:39:32 -0400 Subject: [PATCH] Supply "-extldflags -fno-PIC" to locksmith GOLDFLAGS on hardened gcc A similar workaround is utilized in the docker ebuild, see: https://bugs.gentoo.org/show_bug.cgi?id=493328 --- .../{locksmith-0.1.9.ebuild => locksmith-0.1.9-r1.ebuild} | 0 .../app-admin/locksmith/locksmith-9999.ebuild | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) rename sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/{locksmith-0.1.9.ebuild => locksmith-0.1.9-r1.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-0.1.9.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-0.1.9-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-0.1.9.ebuild rename to sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-0.1.9-r1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-9999.ebuild index b5867c87f5..a1098ab955 100644 --- a/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/app-admin/locksmith/locksmith-9999.ebuild @@ -26,7 +26,13 @@ IUSE="" DEPEND=">=dev-lang/go-1.2" src_compile() { - ./build || die + # work around gentoo hardened gcc incompatibilities with cgo + # see https://bugs.gentoo.org/show_bug.cgi?id=493328 + if gcc-specs-pie; then + GOLDFLAGS="-extldflags -fno-PIC" + fi + + GOLDFLAGS=${GOLDFLAGS} ./build || die } src_install() {