Skip to content

Commit

Permalink
app-emulation/containerd: use hardened USEflag for -fno-PIC
Browse files Browse the repository at this point in the history
Thanks to WilliamH

Package-Manager: portage-2.3.0
  • Loading branch information
mrueg committed Nov 9, 2016
1 parent ece5e78 commit a9cd255
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app-emulation/containerd/containerd-0.2.4-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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() {
Expand Down

0 comments on commit a9cd255

Please sign in to comment.