mirror of
https://github.com/python/cpython
synced 2024-09-16 00:17:02 +00:00
Patch #418659: Fixes for UnixWare and ReliantUnix.
back-out 1.215 of configure.in and 1.34 of Makefile.pre.in Check for -Kpthread compiler support, and use this as the sole option for MT if available.
This commit is contained in:
parent
d0cd95ce7f
commit
130fb17578
|
@ -314,7 +314,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
|
|||
$(AR) cr $@ $(MODOBJS)
|
||||
$(RANLIB) $@
|
||||
|
||||
# This rule is only here for DG/UX, UnixWare, and BeOS!!!
|
||||
# This rule is only here for DG/UX and BeOS!!!
|
||||
libpython$(VERSION).so: $(LIBRARY)
|
||||
case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
|
||||
*dgux*) \
|
||||
|
@ -322,9 +322,6 @@ libpython$(VERSION).so: $(LIBRARY)
|
|||
(cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
|
||||
/bin/rm -rf ./dgux \
|
||||
;; \
|
||||
unixware*) \
|
||||
$(LDSHARED) -o $@ $(LIBRARY_OBJS) \
|
||||
;; \
|
||||
beos) \
|
||||
$(AR) so $(LIBRARY) $@ \
|
||||
;; \
|
||||
|
|
51
configure.in
51
configure.in
|
@ -52,9 +52,7 @@ AC_MSG_CHECKING(MACHDEP)
|
|||
if test -z "$MACHDEP"
|
||||
then
|
||||
ac_sys_system=`uname -s`
|
||||
if test "$ac_sys_system" = "AIX" -o \
|
||||
"$ac_sys_system" = "Monterey64" -o \
|
||||
"$ac_sys_system" = "UnixWare"; then
|
||||
if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
|
||||
ac_sys_release=`uname -v`
|
||||
else
|
||||
ac_sys_release=`uname -r`
|
||||
|
@ -127,15 +125,8 @@ AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [
|
|||
;;
|
||||
Monterey*)
|
||||
RANLIB=:
|
||||
without_gcc=
|
||||
;;
|
||||
UnixWare*)
|
||||
RANLIB=:
|
||||
without_gcc=
|
||||
;;
|
||||
*)
|
||||
without_gcc=no
|
||||
;;
|
||||
without_gcc=;;
|
||||
*) without_gcc=no;;
|
||||
esac])
|
||||
AC_MSG_RESULT($without_gcc)
|
||||
|
||||
|
@ -273,9 +264,6 @@ cygwin*)
|
|||
LDLIBRARY='libpython$(VERSION).dll.a'
|
||||
DLLLIBRARY='libpython$(VERSION).dll'
|
||||
;;
|
||||
unixware*)
|
||||
LDLIBRARY='libpython$(VERSION).so'
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT($LDLIBRARY)
|
||||
|
||||
|
@ -530,6 +518,24 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# -Kpthread, if available, provides the right #defines
|
||||
# and linker options to make pthread_create available
|
||||
AC_MSG_CHECKING(whether $CC accepts -Kpthread)
|
||||
AC_CACHE_VAL(ac_cv_kpthread,
|
||||
[ac_save_cc="$CC"
|
||||
CC="$CC -Kpthread"
|
||||
AC_TRY_LINK([#include <pthread.h>],[pthread_create(0,0,0,0)],
|
||||
ac_cv_kpthread=yes,
|
||||
ac_cv_kpthread=no)
|
||||
CC="$ac_save_cc"])
|
||||
|
||||
# GCC does not reject -Kpthread as an illegal option, it merely complains that
|
||||
# it is unrecognized
|
||||
if test "$GCC" = "yes"
|
||||
then ac_cv_kpthread="no, we have gcc"
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_kpthread)
|
||||
|
||||
dnl # check for ANSI or K&R ("traditional") preprocessor
|
||||
dnl AC_MSG_CHECKING(for C preprocessor type)
|
||||
dnl AC_TRY_COMPILE([
|
||||
|
@ -779,7 +785,7 @@ then
|
|||
UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
then LDSHARED="$(CC) -shared"
|
||||
else LDSHARED="ld -G -dy -Bdynamic"
|
||||
else LDSHARED="$(CC) -G"
|
||||
fi;;
|
||||
SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
|
||||
Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
|
||||
|
@ -809,7 +815,7 @@ then
|
|||
UnixWare*)
|
||||
if test "$GCC" = "yes"
|
||||
then CCSHARED="-fPIC"
|
||||
else CCSHARED="-KPIC -G -dy -Bdynamic"
|
||||
else CCSHARED="-KPIC"
|
||||
fi;;
|
||||
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
|
||||
Monterey*) CCSHARED="-G";;
|
||||
|
@ -840,7 +846,7 @@ then
|
|||
# loading of any modules which reference it in System.framework
|
||||
next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
|
||||
Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
|
||||
UnixWare*) LINKFORSHARED="-dy -Bdynamic -Wl,-Bexport";;
|
||||
UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
|
||||
SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
|
||||
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
|
||||
FreeBSD*|NetBSD*)
|
||||
|
@ -964,14 +970,12 @@ AC_MSG_RESULT($with_threads)
|
|||
if test "$with_threads" = "no"
|
||||
then
|
||||
USE_THREAD_MODULE="#"
|
||||
else
|
||||
if test "$ac_sys_system" = "UnixWare"
|
||||
elif test "$ac_cv_kpthread" = "yes"
|
||||
then
|
||||
CC="${CC} -Kthread"
|
||||
LIBOBJS="$LIBOBJS thread.o"
|
||||
CC="$CC -Kpthread"
|
||||
AC_DEFINE(WITH_THREAD)
|
||||
AC_DEFINE(_POSIX_THREADS)
|
||||
USE_THREAD_MODULE=""
|
||||
LIBOBJS="$LIBOBJS thread.o"
|
||||
else
|
||||
if test ! -z "$with_threads" -a -d "$with_threads"
|
||||
then LDFLAGS="$LDFLAGS -L$with_threads"
|
||||
|
@ -1046,7 +1050,6 @@ else
|
|||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for GC support
|
||||
AC_SUBST(USE_GC_MODULE)
|
||||
|
|
Loading…
Reference in a new issue