Skip to content

Commit

Permalink
dev-libs/efl: fix builds on PaX kernels #547076
Browse files Browse the repository at this point in the history
The luajit code modifies its mappings at runtime as it jit-compiles code
and then executes it.  The efl build process creates a lua tool (named
elua) and then executes it to compile other efl code.  This fails under
PaX kernels by default.

Hack the src_compile in this situations to build up elua first, tweak
the PaX file marks on the new binary, and then resume the compilation.
  • Loading branch information
vapier committed Oct 21, 2015
1 parent b95c7dc commit 1cf7651
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion dev-libs/efl/efl-1.15.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
EKEY_STATE="snap"
fi

inherit enlightenment
inherit enlightenment pax-utils

DESCRIPTION="Enlightenment Foundation Libraries all-in-one package"

Expand Down Expand Up @@ -256,6 +256,18 @@ src_configure() {
enlightenment_src_configure
}

src_compile() {
if host-is-pax && ! use oldlua ; then
# We need to build the lua code first so we can pax-mark it. #547076
local target='_e_built_sources_target_gogogo_'
printf '%s: $(BUILT_SOURCES)\n' "${target}" >> src/Makefile || die
emake -C src "${target}"
emake -C src bin/elua/elua
pax-mark m src/bin/elua/.libs/elua
fi
enlightenment_src_compile
}

src_install() {
MAKEOPTS+=" -j1"

Expand Down

0 comments on commit 1cf7651

Please sign in to comment.