]> granicus.if.org Git - python/commitdiff
On MacOSX, added -prebind option to link phase for executable (and
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 20 Jan 2003 10:47:48 +0000 (10:47 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 20 Jan 2003 10:47:48 +0000 (10:47 +0000)
framework, if applicable). This speeds up startup time by up to 50%.

Makefile.pre.in
configure
configure.in

index 63f03c4508d292bab68842914ae41b4d991706fb..361d8b289615a2558f25c1a63e667c72252f6fe0 100644 (file)
@@ -107,6 +107,8 @@ PYTHONFRAMEWORK=    @PYTHONFRAMEWORK@
 PYTHONFRAMEWORKDIR=    @PYTHONFRAMEWORKDIR@
 PYTHONFRAMEWORKPREFIX= @PYTHONFRAMEWORKPREFIX@
 PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
+# Options to enable prebinding (for fast startup)
+OTHER_LIBTOOL_OPT = -prebind -seg1addr 0x10000000
 
 # Environment to run shared python without installed libraries
 RUNSHARED=       @RUNSHARED@
index 39c9892fa4ce8df5daf33da60bd1ee6c856abdb4..df432d81f0b2aa0b0dd88302a0a008d679c148a8 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.384 .
+# From configure.in Revision: 1.385 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.53 for python 2.3.
 #
@@ -9443,7 +9443,11 @@ then
                # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
                # not used by the core itself but which needs to be in the core so
                # that dynamically loaded extension modules have access to it.
-               LINKFORSHARED="$extra_undefs -framework System"
+               # -prebind causes the executable to assume dynamic libraries are at their
+               # preferred address, which speeds up startup. We specify it here
+               # in stead of in LDFLAGS because it does not seem to work for bundle
+               # plugins (as of OSX 10.2).
+               LINKFORSHARED="$extra_undefs -framework System -prebind"
                if test "$enable_framework"
                then
                        LINKFORSHARED="$LINKFORSHARED -framework Python"
index 9ec081aeb0344d7dbb62508309188920b82844b6..c8ba86bb4c3a9465ed99d0bbfc3634e6e320be66 100644 (file)
@@ -1164,7 +1164,11 @@ then
                # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
                # not used by the core itself but which needs to be in the core so
                # that dynamically loaded extension modules have access to it.
-               LINKFORSHARED="$extra_undefs -framework System"
+               # -prebind causes the executable to assume dynamic libraries are at their
+               # preferred address, which speeds up startup. We specify it here
+               # in stead of in LDFLAGS because it does not seem to work for bundle
+               # plugins (as of OSX 10.2).
+               LINKFORSHARED="$extra_undefs -framework System -prebind"
                if test "$enable_framework"
                then
                        LINKFORSHARED="$LINKFORSHARED -framework Python"