Commit 130fb175 authored by Martin v. Löwis's avatar Martin v. Löwis

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.
parent d0cd95ce
...@@ -314,7 +314,7 @@ $(LIBRARY): $(LIBRARY_OBJS) ...@@ -314,7 +314,7 @@ $(LIBRARY): $(LIBRARY_OBJS)
$(AR) cr $@ $(MODOBJS) $(AR) cr $@ $(MODOBJS)
$(RANLIB) $@ $(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) libpython$(VERSION).so: $(LIBRARY)
case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \ case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
*dgux*) \ *dgux*) \
...@@ -322,9 +322,6 @@ libpython$(VERSION).so: $(LIBRARY) ...@@ -322,9 +322,6 @@ libpython$(VERSION).so: $(LIBRARY)
(cd dgux;ar x ../$^;ld -G -o ../$@ * ); \ (cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
/bin/rm -rf ./dgux \ /bin/rm -rf ./dgux \
;; \ ;; \
unixware*) \
$(LDSHARED) -o $@ $(LIBRARY_OBJS) \
;; \
beos) \ beos) \
$(AR) so $(LIBRARY) $@ \ $(AR) so $(LIBRARY) $@ \
;; \ ;; \
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -52,9 +52,7 @@ AC_MSG_CHECKING(MACHDEP) ...@@ -52,9 +52,7 @@ AC_MSG_CHECKING(MACHDEP)
if test -z "$MACHDEP" if test -z "$MACHDEP"
then then
ac_sys_system=`uname -s` ac_sys_system=`uname -s`
if test "$ac_sys_system" = "AIX" -o \ if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
"$ac_sys_system" = "Monterey64" -o \
"$ac_sys_system" = "UnixWare"; then
ac_sys_release=`uname -v` ac_sys_release=`uname -v`
else else
ac_sys_release=`uname -r` ac_sys_release=`uname -r`
...@@ -127,15 +125,8 @@ AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [ ...@@ -127,15 +125,8 @@ AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [
;; ;;
Monterey*) Monterey*)
RANLIB=: RANLIB=:
without_gcc= without_gcc=;;
;; *) without_gcc=no;;
UnixWare*)
RANLIB=:
without_gcc=
;;
*)
without_gcc=no
;;
esac]) esac])
AC_MSG_RESULT($without_gcc) AC_MSG_RESULT($without_gcc)
...@@ -273,9 +264,6 @@ cygwin*) ...@@ -273,9 +264,6 @@ cygwin*)
LDLIBRARY='libpython$(VERSION).dll.a' LDLIBRARY='libpython$(VERSION).dll.a'
DLLLIBRARY='libpython$(VERSION).dll' DLLLIBRARY='libpython$(VERSION).dll'
;; ;;
unixware*)
LDLIBRARY='libpython$(VERSION).so'
;;
esac esac
AC_MSG_RESULT($LDLIBRARY) AC_MSG_RESULT($LDLIBRARY)
...@@ -530,6 +518,24 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then ...@@ -530,6 +518,24 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
fi fi
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 # check for ANSI or K&R ("traditional") preprocessor
dnl AC_MSG_CHECKING(for C preprocessor type) dnl AC_MSG_CHECKING(for C preprocessor type)
dnl AC_TRY_COMPILE([ dnl AC_TRY_COMPILE([
...@@ -779,7 +785,7 @@ then ...@@ -779,7 +785,7 @@ then
UnixWare*) UnixWare*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
then LDSHARED="$(CC) -shared" then LDSHARED="$(CC) -shared"
else LDSHARED="ld -G -dy -Bdynamic" else LDSHARED="$(CC) -G"
fi;; fi;;
SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";; Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
...@@ -809,7 +815,7 @@ then ...@@ -809,7 +815,7 @@ then
UnixWare*) UnixWare*)
if test "$GCC" = "yes" if test "$GCC" = "yes"
then CCSHARED="-fPIC" then CCSHARED="-fPIC"
else CCSHARED="-KPIC -G -dy -Bdynamic" else CCSHARED="-KPIC"
fi;; fi;;
SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Monterey*) CCSHARED="-G";; Monterey*) CCSHARED="-G";;
...@@ -840,7 +846,7 @@ then ...@@ -840,7 +846,7 @@ then
# loading of any modules which reference it in System.framework # loading of any modules which reference it in System.framework
next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;; next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;; 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";; SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
FreeBSD*|NetBSD*) FreeBSD*|NetBSD*)
...@@ -964,15 +970,13 @@ AC_MSG_RESULT($with_threads) ...@@ -964,15 +970,13 @@ AC_MSG_RESULT($with_threads)
if test "$with_threads" = "no" if test "$with_threads" = "no"
then then
USE_THREAD_MODULE="#" USE_THREAD_MODULE="#"
else elif test "$ac_cv_kpthread" = "yes"
if test "$ac_sys_system" = "UnixWare" then
then CC="$CC -Kpthread"
CC="${CC} -Kthread"
LIBOBJS="$LIBOBJS thread.o"
AC_DEFINE(WITH_THREAD) AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS) AC_DEFINE(_POSIX_THREADS)
USE_THREAD_MODULE="" LIBOBJS="$LIBOBJS thread.o"
else else
if test ! -z "$with_threads" -a -d "$with_threads" if test ! -z "$with_threads" -a -d "$with_threads"
then LDFLAGS="$LDFLAGS -L$with_threads" then LDFLAGS="$LDFLAGS -L$with_threads"
fi fi
...@@ -1045,7 +1049,6 @@ else ...@@ -1045,7 +1049,6 @@ else
OSF1) LDLAST=-threads;; OSF1) LDLAST=-threads;;
esac esac
fi fi
fi
fi fi
# Check for GC support # Check for GC support
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment