[Patches] [Patch #102354] Fix dynamic module linking on Mac OSX/OSXS

noreply@sourceforge.net noreply@sourceforge.net
Sat, 11 Nov 2000 11:07:32 -0800


Patch #102354 has been updated. 

Project: python
Category: Build
Status: Open
Summary: Fix dynamic module linking on Mac OSX/OSXS

Follow-Ups:

Date: 2000-Nov-11 11:05
By: bbum

Comment:
*** /tmp/Python-2.0/configure.in        Mon Oct 16 17:50:06 2000
--- configure.in        Sat Nov 11 13:54:43 2000
***************
*** 573,581 ****
          Darwin/*|next/*) 
                if test "$ns_dyld"
                then 
!                 if test "$ac_sys_system" = Darwin
!                 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
!                 else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
                  fi
                else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
                fi
--- 573,579 ----
          Darwin/*|next/*) 
                if test "$ns_dyld"
                then 
!                 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
                  fi
                else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
                fi
***************
*** 646,652 ****
        # in System.framework; otherwise, __objcInit (referenced in
        # crt1.o) gets erroneously defined as common, which breaks dynamic
        # loading of any modules which reference it in System.framework
!       next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
        Darwin/*) LINKFORSHARED="-framework System" ;;
        SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
        ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
--- 644,650 ----
        # in System.framework; otherwise, __objcInit (referenced in
        # crt1.o) gets erroneously defined as common, which breaks dynamic
        # loading of any modules which reference it in System.framework
!       next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
        Darwin/*) LINKFORSHARED="-framework System" ;;
        SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
        ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;

-------------------------------------------------------

Date: 2000-Nov-11 11:07
By: bbum

Comment:
The addition of -framework Foundation is required to allow dynamically loaded modules to have access to the Objective-C runtiem under OSXS.

This *may* also be required under Darwin/OSX, but-- if that is the case-- it will be submitted as a separate patch once I restore my OSX work environment and can verify that it is the case.
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=102354&group_id=5470