SHA256
1
0
forked from pool/emacs

Check for Execution Shield

OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=211
This commit is contained in:
Dr. Werner Fink 2016-11-11 09:27:16 +00:00 committed by Git OBS Bridge
parent ec97e04ae5
commit dd6660d29e
3 changed files with 24 additions and 2 deletions

View File

@ -16,5 +16,13 @@ case $BUILD_BASENAME in
;;
esac
exec_shield=0
if test -e /proc/sys/kernel/exec-shield; then
read -t 1 exec_shield < /proc/sys/kernel/exec-shield
fi
if test $exec_shield -ne 0 ; then
echo Sorry, Execution Shield exists and is enabled 1>&2
exit 1
fi
exit 0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Nov 11 09:01:36 UTC 2016 - werner@suse.de
- Avoid address space randomization during emacs build
- Check for active Execution Shield as this breaks emacs
-------------------------------------------------------------------
Wed Sep 21 06:31:44 UTC 2016 - werner@suse.de

View File

@ -267,6 +267,14 @@ exit 1
%endif
%endif
%endif
exec_shield=0
if test -e /proc/sys/kernel/exec-shield; then
read -t 1 exec_shield < /proc/sys/kernel/exec-shield
fi
if test $exec_shield -ne 0 ; then
echo Sorry, Execution Shield exists and is enabled 1>&2
exit 1
fi
cflags ()
{
@ -410,12 +418,12 @@ make_mchkoff ()
local OMC=$MALLOC_CHECK_
unset MALLOC_CHECK_
if test -n "${1}" ; then
make ${1+"$@"}
setarch $(uname -m) -R make ${1+"$@"}
set -- $(src/emacs -batch --eval "(print pure-space-overflow)")
test "$1" = "nil" || exit 1
fi
make -C src/ versionclean
make
setarch $(uname -m) -R make
set -- $(src/emacs -batch --eval "(print pure-space-overflow)")
test "$1" = "nil" || exit 1
if test -n "$OMC" ; then