APPROVE COMMIT
NOTE: This patch has been committed.
>>>>"MC" == Marcus Crestani
<crestani(a)informatik.uni-tuebingen.de> writes: 
MC> Is there another
(easier) solution or a shortcut that I've missed?
I found a way to tell the compiler not to do ASLR.
# HG changeset patch
# User Marcus Crestani <crestani(a)informatik.uni-tuebingen.de>
# Date 1322579993 -3600
# Node ID e9f58d024c3ce7ea82f7061ac3ac30cd0ae26419
# Parent  2b2f37e84792bb91a5b974280235fd2743ed1a7f
Disable ASLR on Mac OS X Lion.
2011-11-27  Marcus Crestani  <crestani(a)informatik.uni-tuebingen.de>
	* configure.ac:
	Add "-Wl,-no_pie" to linker flags on Mac OS X Lion to disable ASLR
	that breaks pdump.
	* configure: Regenerate.
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-27  Marcus Crestani  <crestani(a)informatik.uni-tuebingen.de>
+
+	* configure.ac: 
+	Add "-Wl,-no_pie" to linker flags on Mac OS X Lion to disable ASLR
+	that breaks pdump.
+	* configure: Regenerate.
+
 2011-11-21  Marcus Crestani  <crestani(a)informatik.uni-tuebingen.de>
 
 	* .hgignore:
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -11845,6 +11845,18 @@
   fi
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ASLR needs to be
disabled" >&5
+$as_echo_n "checking whether ASLR needs to be disabled... " >&6; }
+case `uname -s`:`uname -r` in
+	    Darwin:11.*)
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	LDFLAGS="$LDFLAGS -Wl,-no_pie" &&  if test "$verbose" =
"yes"; then echo "    Appending \"-Wl,-no_pie\" to
\$LDFLAGS"; fi
+	;;
+    *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;;
+esac
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for specified window system"
>&5
 $as_echo_n "checking for specified window system... " >&6; }
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2786,6 +2786,17 @@
   fi
 fi
 
+dnl Disable ASLR on systems where it breaks pdump.
+AC_MSG_CHECKING([whether ASLR needs to be disabled]) 
+case `uname -s`:`uname -r` in
+	dnl Mac OS X 10.7 Lion
+    Darwin:11.*)
+	AC_MSG_RESULT(yes)
+	XE_APPEND([-Wl,-no_pie], LDFLAGS) 
+	;;
+    *) AC_MSG_RESULT(no) ;;
+esac
+
 dnl ----------------------
 dnl Choose a window system
 dnl ----------------------
-- 
Marcus
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta