mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
Minor CANNOT_DUMP cleanups
Mostly, this avoids munging executables when CANNOT_DUMP = yes, as the munging is needed only for unexec. * configure.ac (PAXCTL_dumped, PAXCTL_notdumped) [CANNOT_DUMP]: Leave these empty. (LD_SWITCH_SYSTEM_TEMACS) [CANNOT_DUMP]: Do not append -no-pie or -nopie. * src/alloc.c (my_heap_start) [CANNOT_DUMP]: Omit; not used.
This commit is contained in:
parent
c2b20948fb
commit
b8b960e5e1
118
configure.ac
118
configure.ac
@ -1226,50 +1226,52 @@ AC_SUBST([FIND_DELETE])
|
||||
|
||||
PAXCTL_dumped=
|
||||
PAXCTL_notdumped=
|
||||
if test $opsys = gnu-linux; then
|
||||
if test "${SETFATTR+set}" != set; then
|
||||
AC_CACHE_CHECK([for setfattr],
|
||||
[emacs_cv_prog_setfattr],
|
||||
[touch conftest.tmp
|
||||
if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
|
||||
emacs_cv_prog_setfattr=yes
|
||||
else
|
||||
emacs_cv_prog_setfattr=no
|
||||
fi])
|
||||
if test "$emacs_cv_prog_setfattr" = yes; then
|
||||
PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er'
|
||||
SETFATTR=setfattr
|
||||
else
|
||||
SETFATTR=
|
||||
fi
|
||||
rm -f conftest.tmp
|
||||
AC_SUBST([SETFATTR])
|
||||
fi
|
||||
fi
|
||||
case $opsys,$PAXCTL_notdumped,$emacs_uname_r in
|
||||
gnu-linux,,* | netbsd,,[0-7].*)
|
||||
AC_PATH_PROG([PAXCTL], [paxctl], [],
|
||||
[$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
|
||||
if test -n "$PAXCTL"; then
|
||||
if test "$opsys" = netbsd; then
|
||||
PAXCTL_dumped='$(PAXCTL) +a'
|
||||
PAXCTL_notdumped=$PAXCTL_dumped
|
||||
if test "$CANNOT_DUMP" != yes; then
|
||||
if test $opsys = gnu-linux; then
|
||||
if test "${SETFATTR+set}" != set; then
|
||||
AC_CACHE_CHECK([for setfattr],
|
||||
[emacs_cv_prog_setfattr],
|
||||
[touch conftest.tmp
|
||||
if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then
|
||||
emacs_cv_prog_setfattr=yes
|
||||
else
|
||||
emacs_cv_prog_setfattr=no
|
||||
fi])
|
||||
if test "$emacs_cv_prog_setfattr" = yes; then
|
||||
PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er'
|
||||
SETFATTR=setfattr
|
||||
else
|
||||
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])
|
||||
if test -n "$PAXCTL"; then
|
||||
PAXCTL_dumped='$(PAXCTL) -zex'
|
||||
PAXCTL_notdumped='$(PAXCTL) -r'
|
||||
fi
|
||||
SETFATTR=
|
||||
fi
|
||||
fi;;
|
||||
esac
|
||||
rm -f conftest.tmp
|
||||
AC_SUBST([SETFATTR])
|
||||
fi
|
||||
fi
|
||||
case $opsys,$PAXCTL_notdumped,$emacs_uname_r in
|
||||
gnu-linux,,* | netbsd,,[0-7].*)
|
||||
AC_PATH_PROG([PAXCTL], [paxctl], [],
|
||||
[$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin])
|
||||
if test -n "$PAXCTL"; then
|
||||
if test "$opsys" = netbsd; then
|
||||
PAXCTL_dumped='$(PAXCTL) +a'
|
||||
PAXCTL_notdumped=$PAXCTL_dumped
|
||||
else
|
||||
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])
|
||||
if test -n "$PAXCTL"; then
|
||||
PAXCTL_dumped='$(PAXCTL) -zex'
|
||||
PAXCTL_notdumped='$(PAXCTL) -r'
|
||||
fi
|
||||
fi
|
||||
fi;;
|
||||
esac
|
||||
fi
|
||||
AC_SUBST([PAXCTL_dumped])
|
||||
AC_SUBST([PAXCTL_notdumped])
|
||||
|
||||
@ -5287,19 +5289,25 @@ esac
|
||||
AC_CACHE_CHECK(
|
||||
[for $CC option to disable position independent executables],
|
||||
[emacs_cv_prog_cc_no_pie],
|
||||
[emacs_save_c_werror_flag=$ac_c_werror_flag
|
||||
emacs_save_LDFLAGS=$LDFLAGS
|
||||
ac_c_werror_flag=yes
|
||||
for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do
|
||||
test $emacs_cv_prog_cc_no_pie = no && break
|
||||
LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break])
|
||||
done
|
||||
ac_c_werror_flag=$emacs_save_c_werror_flag
|
||||
LDFLAGS=$emacs_save_LDFLAGS])
|
||||
if test "$emacs_cv_prog_cc_no_pie" != no; then
|
||||
LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie"
|
||||
fi
|
||||
[if test "$CANNOT_DUMP" = yes; then
|
||||
emacs_cv_prog_cc_no_pie='not needed'
|
||||
else
|
||||
emacs_save_c_werror_flag=$ac_c_werror_flag
|
||||
emacs_save_LDFLAGS=$LDFLAGS
|
||||
ac_c_werror_flag=yes
|
||||
for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do
|
||||
test $emacs_cv_prog_cc_no_pie = no && break
|
||||
LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break])
|
||||
done
|
||||
ac_c_werror_flag=$emacs_save_c_werror_flag
|
||||
LDFLAGS=$emacs_save_LDFLAGS
|
||||
fi])
|
||||
case $emacs_cv_prog_cc_no_pie in
|
||||
-*)
|
||||
LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test x$ac_enable_profiling != x ; then
|
||||
case $opsys in
|
||||
|
@ -104,7 +104,7 @@ static bool valgrind_p;
|
||||
#include "w32heap.h" /* for sbrk */
|
||||
#endif
|
||||
|
||||
#ifdef GNU_LINUX
|
||||
#if defined GNU_LINUX && !defined CANNOT_DUMP
|
||||
/* The address where the heap starts. */
|
||||
void *
|
||||
my_heap_start (void)
|
||||
|
Loading…
Reference in New Issue
Block a user