Checking in three Darwin-specific patches.

Tony Lownds: [ Patch #101816 ] Fixes shared modules on Mac OS X

    1. Mac OS X is recognized by the Next-ish host recognition code as
    "Darwin/1.2"

    2. When specifying just --with-dyld, modules can compile as shared

    3. --with-dyld and --with-next-framework, modules can compile as
    shared

    4. --with-suffix=.exe, and Lib/plat-darwin1.2 is being made, the regen
    script invokes python as python.exe

    [I had to reformat this patch a bit to make it work.  Please test!]

Dan Wolfe: [ Patch #101823 ] Fix Darwin POSIX Thread redefinition

    The patch below fixes the redefinition problem in Darwin with
    _POSIX_THREADS. I'm not sure if this is the correct long term fix but
    for now it fixes the problem and the fix is specific to Darwin.

Dan Wolfe: [ Patch #101824 ] On Darwin, remove unrecognized option
                             `-OPT:Olimit=0'

  After many, many, many compiles, I finally got itchy of this warning
  cluttering up the output... so I scratched (Darwin configs only) and
  it's gone! :-)
This commit is contained in:
Guido van Rossum 2000-10-09 19:52:35 +00:00
parent 32e20ff838
commit 5839e5861b
2 changed files with 462 additions and 460 deletions

900
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -341,7 +341,10 @@ AC_TRY_RUN([int main() { return 0; }],
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_opt_olimit_ok)
if test $ac_cv_opt_olimit_ok = yes; then
OPT="$OPT -OPT:Olimit=0"
case $ac_sys_system in
Darwin*) OPT="$OPT" ;;
*) OPT="$OPT -OPT:Olimit=0";;
esac
else
AC_MSG_CHECKING(whether $CC accepts -Olimit 1500)
AC_CACHE_VAL(ac_cv_olimit_ok,
@ -493,6 +496,9 @@ fi
# Minor variations in building a framework between NextStep versions 4 and 5
AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in
Darwin/*)
ns_undef_sym='_environ'
LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
next/4*)
ns_undef_sym='__environ'
LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
@ -568,7 +574,11 @@ then
DYNIX/ptx*) LDSHARED="ld -G";;
Darwin/*|next/*)
if test "$ns_dyld"
then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
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
if test "$with_next_framework" ; then
@ -639,6 +649,7 @@ then
# 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";;
FreeBSD*|NetBSD*)
@ -761,7 +772,10 @@ else
LIBS="-lpthread $LIBS"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
case $ac_sys_system in
Darwin*) ;;
*) AC_DEFINE(_POSIX_THREADS);;
esac
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(BEOS_THREADS)
@ -911,7 +925,7 @@ then
AIX*) DYNLOADFILE="dynload_aix.o";;
BeOS*) DYNLOADFILE="dynload_beos.o";;
hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
next/*) DYNLOADFILE="dynload_next.o";;
Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
*)
# use dynload_shlib.c and dlopen() if we have it; otherwise stub
# out any dynamic loading