aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-12-12 19:50:12 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-12-12 14:57:46 -0500
commit382afaee42d294e84e45318790de6593b5b39219 (patch)
tree41c370be1d35e58c34e5597b30ceb53bf7738533 /configure.ac
parentconfigure.ac: disable silent rules (diff)
downloadelfix-382afaee42d294e84e45318790de6593b5b39219.tar.gz
elfix-382afaee42d294e84e45318790de6593b5b39219.tar.bz2
elfix-382afaee42d294e84e45318790de6593b5b39219.zip
Add logic for NEED_PAX_DECLS when gelf.h is present but lacks them
On a gentoo system <sys-libs/glibc-2.16, elf.h is no longer patched to provide PT_PAX_FLAGS and PF_* for the PAX program header of ELF binaries. As a result, we must include them. These will eventuall be exported by upstream PAX team in a separate header but for now we test 1) do we want PT_PAX, if yes, then test for gelf.h and for the DECLS. If we don't have the DECLS, then include our local copy. or 2) so we want only XATTR PAX, in which case don't test for gelf.h, don't include it and provide our local DECLS.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 43c74e9..7c7e3f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,13 +66,15 @@ AS_IF(
AC_CHECK_DECLS(
[PT_PAX_FLAGS, PF_PAGEEXEC, PF_MPROTECT, PF_RANDMMAP],
[],
- [AC_MSG_ERROR(["Missing necessary define's in gelf.h"])],
+ [
+ CFLAGS+=" -DNEED_PAX_DECLS"
+ ],
[[#include <gelf.h>]]
)
CFLAGS+=" -DPTPAX"
],
[
- CFLAGS+=" -UPTPAX"
+ CFLAGS+=" -UPTPAX -DNEED_PAX_DECLS"
]
)