changeset 5604:e9f58d024c3c

Disable ASLR on Mac OS X Lion. 2011-11-27 Marcus Crestani <crestani@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.
author Marcus Crestani <crestani@informatik.uni-tuebingen.de>
date Tue, 29 Nov 2011 16:19:53 +0100
parents 2b2f37e84792
children cc7f8a0e569a
files ChangeLog configure configure.ac
diffstat 3 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Nov 29 09:05:36 2011 -0500
+++ b/ChangeLog	Tue Nov 29 16:19:53 2011 +0100
@@ -1,3 +1,10 @@
+2011-11-27  Marcus Crestani  <crestani@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@informatik.uni-tuebingen.de>
 
 	* .hgignore:
--- a/configure	Tue Nov 29 09:05:36 2011 -0500
+++ b/configure	Tue Nov 29 16:19:53 2011 +0100
@@ -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; }
--- a/configure.ac	Tue Nov 29 09:05:36 2011 -0500
+++ b/configure.ac	Tue Nov 29 16:19:53 2011 +0100
@@ -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 ----------------------