Restore shared libpython. The problem was that pthreads' 64k stack
size is not adequate for some of the complex processing that Zope does, and -fPIC was aggravating that condition. Now, if we're using shared libs, up the stack size to 128k. Also remove some stray files that never should have been committed in the first place.
This commit is contained in:
parent
92f2f9524c
commit
1ee8599ea4
36
lang/python/2.1/patches/patch-Python_thread_pthread_h
Normal file
36
lang/python/2.1/patches/patch-Python_thread_pthread_h
Normal file
@ -0,0 +1,36 @@
|
||||
$OpenBSD: patch-Python_thread_pthread_h,v 1.1 2002/02/25 21:25:37 matt Exp $
|
||||
--- Python/thread_pthread.h.orig Thu Jan 10 06:12:20 2002
|
||||
+++ Python/thread_pthread.h Mon Feb 25 15:37:53 2002
|
||||
@@ -128,16 +128,21 @@ PyThread_start_new_thread(void (*func)(v
|
||||
{
|
||||
pthread_t th;
|
||||
int success;
|
||||
-#ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
|
||||
+#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) || defined(THREAD_STACK_SIZE)
|
||||
pthread_attr_t attrs;
|
||||
#endif
|
||||
dprintf(("PyThread_start_new_thread called\n"));
|
||||
if (!initialized)
|
||||
PyThread_init_thread();
|
||||
-#ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
|
||||
+#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) || defined(THREAD_STACK_SIZE)
|
||||
pthread_attr_init(&attrs);
|
||||
+#endif
|
||||
+#ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
|
||||
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
|
||||
#endif
|
||||
+#ifdef THREAD_STACK_SIZE
|
||||
+ pthread_attr_setstacksize(&attrs, THREAD_STACK_SIZE);
|
||||
+#endif
|
||||
|
||||
success = pthread_create(&th,
|
||||
#if defined(PY_PTHREAD_D4)
|
||||
@@ -153,7 +158,7 @@ PyThread_start_new_thread(void (*func)(v
|
||||
func,
|
||||
arg
|
||||
#elif defined(PY_PTHREAD_STD)
|
||||
-#ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
|
||||
+#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED) || defined(THREAD_STACK_SIZE)
|
||||
&attrs,
|
||||
#else
|
||||
(pthread_attr_t*)NULL,
|
@ -1,5 +1,8 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1 2002/02/15 19:42:18 matt Exp $
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.2 2002/02/25 21:25:37 matt Exp $
|
||||
%%mm%%
|
||||
lib/libpython2.1.so.0.0
|
||||
DYNLIBDIR(%B)
|
||||
lib/python2.1/config/libpython2.1.so.0.0
|
||||
lib/python2.1/lib-dynload/_codecsmodule.so
|
||||
lib/python2.1/lib-dynload/_curses_panel.so
|
||||
lib/python2.1/lib-dynload/_cursesmodule.so
|
||||
|
@ -1,5 +0,0 @@
|
||||
@comment $OpenBSD: PFRAG.shared.new,v 1.1 2002/02/15 19:42:18 matt Exp $
|
||||
lib/libpython2.1.so.0.0
|
||||
lib/python2.1/config/libpython2.1.so.0.0
|
||||
DYNLIBDIR(%D/lib)
|
||||
NEWDYNLIBDIR(%D/lib/python2.1/config)
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,8 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1 2002/02/15 19:42:19 matt Exp $
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.2 2002/02/25 21:25:38 matt Exp $
|
||||
%%mm%%
|
||||
lib/libpython2.2.so.0.0
|
||||
DYNLIBDIR(%B)
|
||||
lib/python2.2/config/libpython2.2.so.0.0
|
||||
lib/python2.2/lib-dynload/_codecsmodule.so
|
||||
lib/python2.2/lib-dynload/_curses_panel.so
|
||||
lib/python2.2/lib-dynload/_cursesmodule.so
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.2 2002/02/15 19:55:14 matt Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.3 2002/02/25 21:25:37 matt Exp $
|
||||
|
||||
COMMENT= "interpreted object-oriented programming language"
|
||||
COMMENT-tests= "Python testsuite"
|
||||
@ -98,7 +98,6 @@ FULLPKGNAME-expat= python-expat-${VERSION}${PATCHLEVEL}${FLAVOR_EXT}
|
||||
CONFIGURE_STYLE= autoconf dest
|
||||
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
|
||||
CONFIGURE_ARGS+= --with-fpectl --with-threads --without-pymalloc
|
||||
CONFIGURE_ENV+= LDFLAGS='-L${WRKSRC}' OPT='${CFLAGS}' # -fPIC == Zope crash
|
||||
|
||||
REGRESS_TARGET= test
|
||||
|
||||
@ -114,16 +113,17 @@ SED_PLIST+=-e '/%%mm%%/r${PKGDIR}/PFRAG.mm' -e '//d'
|
||||
|
||||
.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES
|
||||
NOSHARED= \#
|
||||
#CONFIGURE_ENV+= OPT='${CFLAGS} -fPIC' LDFLAGS='-L${WRKSRC}'
|
||||
#.else
|
||||
#CONFIGURE_ENV+= OPT='${CFLAGS} -fPIC' LDFLAGS='-L${WRKSRC}'
|
||||
#MAKE_FLAGS+= MAJOR=0 MINOR=0 LDLIBRARY=libpython2.1.so.0.0 \
|
||||
# LD_LIBRARY_PATH=${WRKSRC}
|
||||
#FAKE_FLAGS+= MAJOR=0 MINOR=0 LDLIBRARY=libpython2.1.so.0.0 \
|
||||
# LD_LIBRARY_PATH=${WRKSRC} RANLIB=:
|
||||
CONFIGURE_ENV+= OPT='${CFLAGS}' LDFLAGS='-L${WRKSRC}'
|
||||
.else
|
||||
CONFIGURE_ENV+= OPT='${CFLAGS} -DTHREAD_STACK_SIZE=0x20000 -fPIC' \
|
||||
LDFLAGS='-L${WRKSRC}'
|
||||
MAKE_FLAGS+= MAJOR=0 MINOR=0 LDLIBRARY=libpython${VERSION}.so.0.0 \
|
||||
LD_LIBRARY_PATH=${WRKSRC}
|
||||
FAKE_FLAGS+= MAJOR=0 MINOR=0 LDLIBRARY=libpython${VERSION}.so.0.0 \
|
||||
LD_LIBRARY_PATH=${WRKSRC} RANLIB=:
|
||||
.endif
|
||||
|
||||
#ALL_TARGET= all ./Lib/plat-openbsd3
|
||||
ALL_TARGET= all ./Lib/plat-openbsd3
|
||||
|
||||
patch:
|
||||
|
||||
@ -142,9 +142,9 @@ post-install:
|
||||
@strip ${PREFIX}/bin/python
|
||||
@cd ${WRKSRC}; tar -cf - Tools | (cd ${PREFIX}/lib/python${VERSION}; \
|
||||
tar -xf -)
|
||||
# ${INSTALL_DATA} ${WRKSRC}/libpython${VERSION}.a \
|
||||
# ${PREFIX}/lib/python${VERSION}/config
|
||||
# @if [ -f ${PREFIX}/lib/python${VERSION}/config/libpython${VERSION}.so.0.0 ]; then \
|
||||
# cd ${PREFIX}/lib && ln -s python${VERSION}/config/libpython${VERSION}.so.0.0; \
|
||||
# fi
|
||||
${INSTALL_DATA} ${WRKSRC}/libpython${VERSION}.a \
|
||||
${PREFIX}/lib/python${VERSION}/config
|
||||
@if [ -f ${PREFIX}/lib/python${VERSION}/config/libpython${VERSION}.so.0.0 ]; then \
|
||||
cd ${PREFIX}/lib && ln -s python${VERSION}/config/libpython${VERSION}.so.0.0; \
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user