changeset 8323:a4521bae2693 jdk7u85-b00

8133970: Only apply PaX-marking when needed by a running PaX kernel Reviewed-by: aph
author andrew
date Tue, 07 Jul 2015 14:28:43 +0100
parents bf2e9b824179
children 4f02eca4b7e4
files make/com/sun/jmx/Makefile
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/com/sun/jmx/Makefile	Wed Jun 03 20:23:19 2015 -0700
+++ b/make/com/sun/jmx/Makefile	Tue Jul 07 14:28:43 2015 +0100
@@ -123,8 +123,10 @@
 $(CLASSDESTDIR)/%_Stub.class: $(CLASSDESTDIR)/%.class
 	$(prep-target)
 	if [ -x $(PAX_COMMAND) ] ; then \
-	  if [ -w $(RMIC_VM) ] ; then \
-	    $(PAX_COMMAND) $(PAX_COMMAND_ARGS) $(RMIC_VM) ; \
+	  if $(CAT) /proc/self/status | grep '^PaX' > /dev/null ; then \
+	    if [ -w $(RMIC_VM) ] ; then \
+	      $(PAX_COMMAND) $(PAX_COMMAND_ARGS) $(RMIC_VM) ; \
+	    fi ; \
 	  fi ; \
 	fi
 	$(RMIC) -classpath "$(CLASSDESTDIR)"    \