aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2012-07-26 16:29:52 +0000
committerUlrich Müller <ulm@gentoo.org>2012-07-26 16:29:52 +0000
commit61a1389068f52dc841d1cb291538d6f620ef9af2 (patch)
treef50b1ec11ef25b74805203713bbab9294b671a48
parentFix compilation with glibc-2.16. (diff)
downloademacs-patches-61a1389068f52dc841d1cb291538d6f620ef9af2.tar.gz
emacs-patches-61a1389068f52dc841d1cb291538d6f620ef9af2.tar.bz2
emacs-patches-61a1389068f52dc841d1cb291538d6f620ef9af2.zip
Run paxctl only if the toolchain supports PT_PAX_FLAGS, bug 426394.emacs-23.4-patches-5
-rw-r--r--emacs/23.4/10_all_paxctl.patch22
-rw-r--r--emacs/24.1/02_all_paxctl.patch22
2 files changed, 31 insertions, 13 deletions
diff --git a/emacs/23.4/10_all_paxctl.patch b/emacs/23.4/10_all_paxctl.patch
index dd79a88..d323c76 100644
--- a/emacs/23.4/10_all_paxctl.patch
+++ b/emacs/23.4/10_all_paxctl.patch
@@ -1,21 +1,29 @@
-https://bugs.gentoo.org/411439
-http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11398
-
On grsecurity/PaX systems, unexec will fail due to a gap between
the bss section and the heap. This can be prevented by disabling
memory randomization in temacs with "paxctl -r".
+https://bugs.gentoo.org/411439
+https://bugs.gentoo.org/426394
+http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11398
--- emacs-23.4-orig/configure.in
+++ emacs-23.4/configure.in
-@@ -800,6 +800,8 @@
- AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin)
+@@ -801,6 +801,16 @@
dnl Don't use GZIP, which is used by gzip for additional parameters.
AC_PATH_PROG(GZIP_PROG, gzip)
-+AC_PATH_PROG(PAXCTL, paxctl,,
-+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
++if test $opsys = gnu-linux; then
++ AC_PATH_PROG(PAXCTL, paxctl,,
++ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
++ if test "X$PAXCTL" != X; then
++ AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
++ [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes)
++ else AC_MSG_RESULT(no); PAXCTL=""; fi])
++ fi
++fi
## Need makeinfo >= 4.6 (?) to build the manuals.
+ AC_PATH_PROG(MAKEINFO, makeinfo, no)
--- emacs-23.4-orig/src/Makefile.in
+++ emacs-23.4/src/Makefile.in
@@ -508,6 +508,12 @@
diff --git a/emacs/24.1/02_all_paxctl.patch b/emacs/24.1/02_all_paxctl.patch
index 02c00cb..1f659e6 100644
--- a/emacs/24.1/02_all_paxctl.patch
+++ b/emacs/24.1/02_all_paxctl.patch
@@ -1,19 +1,29 @@
-Disable memory randomization for the temacs binary via PaX flags
-if the paxctl utility is available.
+On grsecurity/PaX systems, unexec will fail due to a gap between
+the bss section and the heap. This can be prevented by disabling
+memory randomization in temacs with "paxctl -r".
https://bugs.gentoo.org/411439
+https://bugs.gentoo.org/426394
http://debbugs.gnu.org/11398
--- emacs-24.1-orig/configure.in
+++ emacs-24.1/configure.in
-@@ -756,6 +756,8 @@
- AC_PATH_PROG(INSTALL_INFO, install-info,:, /sbin)
+@@ -757,6 +757,16 @@
dnl Don't use GZIP, which is used by gzip for additional parameters.
AC_PATH_PROG(GZIP_PROG, gzip)
-+AC_PATH_PROG(PAXCTL, paxctl,,
-+ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
++if test $opsys = gnu-linux; then
++ AC_PATH_PROG(PAXCTL, paxctl,,
++ [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
++ if test "X$PAXCTL" != X; then
++ AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
++ [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then AC_MSG_RESULT(yes)
++ else AC_MSG_RESULT(no); PAXCTL=""; fi])
++ fi
++fi
## Need makeinfo >= 4.6 (?) to build the manuals.
+ AC_PATH_PROG(MAKEINFO, makeinfo, no)
--- emacs-24.1-orig/src/Makefile.in
+++ emacs-24.1/src/Makefile.in
@@ -116,6 +116,12 @@