summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-07-15 13:07:09 +0200
committerPaul Eggert <eggert@cs.ucla.edu>2016-07-15 21:27:05 +0200
commite95b023163e96538b15f030b7176b7ec59cf86f5 (patch)
treec0ad4b151e8740015949c0aa868deaee14dc8582 /configure.ac
parent098d29af10a869e65a36804579f16edc49aabcfa (diff)
Port to glibc 2.24 (pre-release) + ppc64
Inspired by a suggestion by Florian Weimer in: https://sourceware.org/ml/libc-alpha/2016-07/msg00425.html * configure.ac (HAVE_PERSONALITY_ADDR_NO_RANDOMIZE): Rename from HAVE_PERSONALITY_LINUX32, and check for ADDR_NO_RANDOMIZE (the crucial thing) instead of for LINUX32. All uses changed. * src/emacs.c (main) [HAVE_PERSONALITY_ADDR_NO_RANDOMIZE]: Use ADDR_NO_RANDOMIZE from personality.h rather than inventing the flag ourselves. Just set that flag, rather than also setting the persona. When doing it, avoid functions like putenv that may allocate memory.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 11 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index dd1af5b435..c94ecb629e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1643,15 +1643,17 @@ AC_CHECK_HEADERS_ONCE(
sys/resource.h
sys/utsname.h pwd.h utmp.h util.h)
-AC_MSG_CHECKING(if personality LINUX32 can be set)
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/personality.h>]], [[personality (PER_LINUX32)]])],
- emacs_cv_personality_linux32=yes,
- emacs_cv_personality_linux32=no)
-AC_MSG_RESULT($emacs_cv_personality_linux32)
-
-if test $emacs_cv_personality_linux32 = yes; then
- AC_DEFINE(HAVE_PERSONALITY_LINUX32, 1,
- [Define to 1 if personality LINUX32 can be set.])
+AC_CACHE_CHECK([for ADDR_NO_RANDOMIZE],
+ [emacs_cv_personality_addr_no_randomize],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <sys/personality.h>]],
+ [[personality (personality (0xffffffff)
+ | ADDR_NO_RANDOMIZE)]])],
+ [emacs_cv_personality_addr_no_randomize=yes],
+ [emacs_cv_personality_addr_no_randomize=no])])
+if test $emacs_cv_personality_addr_no_randomize = yes; then
+ AC_DEFINE([HAVE_PERSONALITY_ADDR_NO_RANDOMIZE], [1],
+ [Define to 1 if personality flag ADDR_NO_RANDOMIZE exists.])
fi
# Note that Solaris has sys/sysinfo.h which defines struct