app-emulation/containerd: use hardened USEflag for -fno-PIC
authorManuel Rüger <mrueg@gentoo.org>
Wed, 9 Nov 2016 18:57:59 +0000 (19:57 +0100)
committerManuel Rüger <mrueg@gentoo.org>
Wed, 9 Nov 2016 19:01:37 +0000 (20:01 +0100)
Thanks to WilliamH

Package-Manager: portage-2.3.0

app-emulation/containerd/containerd-0.2.4-r1.ebuild

index 4b81e8a432ac52bba0acd4320bbf903b16743c9e..ab4ce7e80243936114e3dae7c5b460ca69b7cd7b 100644 (file)
@@ -22,7 +22,7 @@ HOMEPAGE="https://containerd.tools"
 
 LICENSE="Apache-2.0"
 SLOT="0"
-IUSE="+seccomp"
+IUSE="hardened +seccomp"
 
 DEPEND=""
 RDEPEND=">=app-emulation/runc-1.0.0_rc2
@@ -31,12 +31,9 @@ RDEPEND=">=app-emulation/runc-1.0.0_rc2
 S=${WORKDIR}/${P}/src/${EGO_PN}
 
 src_compile() {
-       local options=( $(usex seccomp "seccomp") ) myldflags
+       local options=( $(usex seccomp "seccomp") )
        export GOPATH="${WORKDIR}/${P}" # ${PWD}/vendor
-       if gcc-specs-pie; then
-               myldflags="-extldflags -fno-PIC"
-       fi
-       LDFLAGS=${myldflags} emake GIT_COMMIT="$EGIT_COMMIT" BUILDTAGS="${options[@]}"
+       LDFLAGS=$(usex hardened '-extldflags -fno-PIC' '') emake GIT_COMMIT="$EGIT_COMMIT" BUILDTAGS="${options[@]}"
 }
 
 src_install() {