mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
Build updates for OS/2 EMX port
This commit is contained in:
parent
8133f9da17
commit
bb4503716f
5 changed files with 412 additions and 259 deletions
|
@ -2,15 +2,15 @@
|
||||||
#
|
#
|
||||||
# Top-Level Makefile for Building Python 2.4 for OS/2 using GCC/EMX
|
# Top-Level Makefile for Building Python 2.4 for OS/2 using GCC/EMX
|
||||||
# Originally written by Andrew Zabolotny, <bit@eltech.ru> for Python 1.5.2
|
# Originally written by Andrew Zabolotny, <bit@eltech.ru> for Python 1.5.2
|
||||||
# Modified by Andrew MacIntyre, <andymac@pcug.org.au> for Python 2.4
|
# Modified by Andrew MacIntyre, <andymac@pcug.org.au> for Python 2.5
|
||||||
#
|
#
|
||||||
# This makefile was developed for use with [P]GCC/EMX compiler any
|
# This makefile was developed for use with [P]GCC/EMX compiler any
|
||||||
# version and GNU Make.
|
# version and GNU Make.
|
||||||
#
|
#
|
||||||
# The output of the build is a largish Python24.DLL containing the
|
# The output of the build is a largish Python25.DLL containing the
|
||||||
# essential modules of Python and a small Python.exe program to start
|
# essential modules of Python and a small Python.exe program to start
|
||||||
# the interpreter. When embedding Python within another program, only
|
# the interpreter. When embedding Python within another program, only
|
||||||
# Python24.DLL is needed. We also build python_s.a static library (which
|
# Python25.DLL is needed. We also build python_s.a static library (which
|
||||||
# can be converted into OMF (.lib) format using emxomf tool) and both
|
# can be converted into OMF (.lib) format using emxomf tool) and both
|
||||||
# python.a and python.lib import libraries. Then the optional
|
# python.a and python.lib import libraries. Then the optional
|
||||||
# extension modules, which are OS/2 DLLs renamed with a PYD file extension.
|
# extension modules, which are OS/2 DLLs renamed with a PYD file extension.
|
||||||
|
@ -64,7 +64,7 @@ HAVE_OPENSSL= no
|
||||||
|
|
||||||
# === install locations ===
|
# === install locations ===
|
||||||
# default value of PYTHONHOME
|
# default value of PYTHONHOME
|
||||||
LIB_DIR=C:/Python24
|
LIB_DIR=C:/Python25
|
||||||
# default is to have everything in or under PYTHONHOME
|
# default is to have everything in or under PYTHONHOME
|
||||||
EXE_DIR=$(LIB_DIR)
|
EXE_DIR=$(LIB_DIR)
|
||||||
DLL_DIR=$(EXE_DIR)
|
DLL_DIR=$(EXE_DIR)
|
||||||
|
@ -236,8 +236,8 @@ $(OUT)%$O: %.c
|
||||||
@echo STACKSIZE 2097152 >>$@
|
@echo STACKSIZE 2097152 >>$@
|
||||||
|
|
||||||
# Output file names
|
# Output file names
|
||||||
PYTHON_VER= 2.4
|
PYTHON_VER= 2.5
|
||||||
PYTHON_LIB= python24
|
PYTHON_LIB= python25
|
||||||
PYTHON.LIB= $(PYTHON_LIB)_s$A
|
PYTHON.LIB= $(PYTHON_LIB)_s$A
|
||||||
PYTHON.IMPLIB= $(PYTHON_LIB)$A
|
PYTHON.IMPLIB= $(PYTHON_LIB)$A
|
||||||
ifeq ($(EXEOMF),yes)
|
ifeq ($(EXEOMF),yes)
|
||||||
|
@ -295,20 +295,23 @@ SRC.MODULES= $(addprefix $(TOP), \
|
||||||
Modules/dlmodule.c \
|
Modules/dlmodule.c \
|
||||||
Modules/errnomodule.c \
|
Modules/errnomodule.c \
|
||||||
Modules/fcntlmodule.c \
|
Modules/fcntlmodule.c \
|
||||||
|
Modules/_functoolsmodule.c \
|
||||||
Modules/_heapqmodule.c \
|
Modules/_heapqmodule.c \
|
||||||
Modules/imageop.c \
|
Modules/imageop.c \
|
||||||
Modules/itertoolsmodule.c \
|
Modules/itertoolsmodule.c \
|
||||||
Modules/_localemodule.c \
|
Modules/_localemodule.c \
|
||||||
Modules/mathmodule.c \
|
Modules/mathmodule.c \
|
||||||
Modules/md5c.c \
|
Modules/md5.c \
|
||||||
Modules/md5module.c \
|
Modules/md5module.c \
|
||||||
Modules/operator.c \
|
Modules/operator.c \
|
||||||
Modules/_randommodule.c \
|
Modules/_randommodule.c \
|
||||||
Modules/rgbimgmodule.c \
|
Modules/rgbimgmodule.c \
|
||||||
Modules/shamodule.c \
|
Modules/shamodule.c \
|
||||||
|
Modules/sha256module.c \
|
||||||
|
Modules/sha512module.c \
|
||||||
Modules/_sre.c \
|
Modules/_sre.c \
|
||||||
Modules/stropmodule.c \
|
Modules/stropmodule.c \
|
||||||
Modules/structmodule.c \
|
Modules/_struct.c \
|
||||||
Modules/symtablemodule.c \
|
Modules/symtablemodule.c \
|
||||||
Modules/termios.c \
|
Modules/termios.c \
|
||||||
Modules/timemodule.c \
|
Modules/timemodule.c \
|
||||||
|
@ -331,6 +334,9 @@ SRC.PARSE2= $(addprefix $(TOP), \
|
||||||
SRC.PARSER= $(SRC.PARSE1) \
|
SRC.PARSER= $(SRC.PARSE1) \
|
||||||
$(SRC.PARSE2)
|
$(SRC.PARSE2)
|
||||||
SRC.PYTHON= $(addprefix $(TOP), \
|
SRC.PYTHON= $(addprefix $(TOP), \
|
||||||
|
Python/Python-ast.c \
|
||||||
|
Python/asdl.c \
|
||||||
|
Python/ast.c \
|
||||||
Python/bltinmodule.c \
|
Python/bltinmodule.c \
|
||||||
Python/exceptions.c \
|
Python/exceptions.c \
|
||||||
Python/ceval.c \
|
Python/ceval.c \
|
||||||
|
@ -353,6 +359,7 @@ SRC.PYTHON= $(addprefix $(TOP), \
|
||||||
Python/modsupport.c \
|
Python/modsupport.c \
|
||||||
Python/mysnprintf.c \
|
Python/mysnprintf.c \
|
||||||
Python/mystrtoul.c \
|
Python/mystrtoul.c \
|
||||||
|
Python/pyarena.c \
|
||||||
Python/pyfpe.c \
|
Python/pyfpe.c \
|
||||||
Python/pystate.c \
|
Python/pystate.c \
|
||||||
Python/pystrtod.c \
|
Python/pystrtod.c \
|
||||||
|
@ -371,6 +378,7 @@ SRC.OBJECT= $(addprefix $(TOP), \
|
||||||
Objects/cellobject.c \
|
Objects/cellobject.c \
|
||||||
Objects/classobject.c \
|
Objects/classobject.c \
|
||||||
Objects/cobject.c \
|
Objects/cobject.c \
|
||||||
|
Objects/codeobject.c \
|
||||||
Objects/complexobject.c \
|
Objects/complexobject.c \
|
||||||
Objects/descrobject.c \
|
Objects/descrobject.c \
|
||||||
Objects/dictobject.c \
|
Objects/dictobject.c \
|
||||||
|
|
|
@ -612,22 +612,11 @@ functionality. Most of the sub-tests pass, but the "ismount" and
|
||||||
|
|
||||||
test_posixpath should skip these tests on EMX.
|
test_posixpath should skip these tests on EMX.
|
||||||
|
|
||||||
24. I have had a report that attempting to use the Bittorrent package
|
24. I have reports of BitTorrent not working. It appears that the
|
||||||
(http://bitconjurer.org/BitTorrent/) with this port causes traps not
|
EMX select() emulation, possibly in concert with bugs in the TCP/IP
|
||||||
long after starting the download; this using the "headless" download
|
stack, runs into problems under the stress imposed by this application.
|
||||||
script on eCS v1.1. I have not been able to duplicate this myself,
|
I think it suffices to say that BitTorrent is a fair stress test of a
|
||||||
but the indications I have suggest a failure in the 32 bit TCP/IP
|
system's networking capability.
|
||||||
stack (v4.3.2? on eCS v1.1) - on my v4.0 FP12 system with MPTS fixpack
|
|
||||||
WR8425 applied (16 bit TCP/IP stack v4.02), BitTorrent appears to work
|
|
||||||
normally in testing on a 100Mbit LAN. With the curses.panel fix (see
|
|
||||||
item 13 above), the BitTorrent curses downloader works too. I'd
|
|
||||||
appreciate any success or failure reports with BitTorrent, though
|
|
||||||
I've regretfully recommended that the person who reported the failure
|
|
||||||
take this up with eCS support. Since this report, I have received a
|
|
||||||
followup which suggests that the problem may be addressed by TCP/IP
|
|
||||||
fixes (IC35005+PJ29457, contained in NEWSTACK.ZIP in the Hobbes
|
|
||||||
archive). I think it suffices to say that BitTorrent is a fair stress
|
|
||||||
test of a system's networking capability.
|
|
||||||
|
|
||||||
25. In the absence of an EMX implementation of the link() function, I've
|
25. In the absence of an EMX implementation of the link() function, I've
|
||||||
implemented a crude Python emulation, in the file
|
implemented a crude Python emulation, in the file
|
||||||
|
@ -659,14 +648,16 @@ test_subprocess has a number of failures as a result.
|
||||||
|
|
||||||
29. The default stack size for threads has been 64k. This is proving
|
29. The default stack size for threads has been 64k. This is proving
|
||||||
insufficient for some codebases, such as Zope. The thread stack size
|
insufficient for some codebases, such as Zope. The thread stack size
|
||||||
still defaults to 64k, but this can now be increased by defining
|
still defaults to 64k, but this can now be increased via the stack_size()
|
||||||
|
function exposed by the threading & thread modules as well as by defining
|
||||||
THREAD_STACK_SIZE to an appropriate value in the Makefile (which contains
|
THREAD_STACK_SIZE to an appropriate value in the Makefile (which contains
|
||||||
a commented out definition for 128kB thread stacks). I have seen
|
a commented out definition for 128kB thread stacks). I have seen
|
||||||
references to heavy Zope/Plone usage requiring 1MB thread stacks on
|
references to heavy Zope/Plone usage requiring 1MB thread stacks on
|
||||||
FreeBSD and Linux, but doubt that for most likely usage on OS/2 that
|
FreeBSD and Linux, but doubt that for most likely usage on OS/2 that
|
||||||
more than 256kB is necessary. The size of the required stacks (main
|
more than 256kB is necessary. The size of the required stacks (main
|
||||||
and thread) can vary significantly depending on which version of gcc
|
and thread) can vary significantly depending on which version of gcc
|
||||||
is used along with the compiler optimisations selected.
|
is used along with the compiler optimisations selected. Note that the
|
||||||
|
main thread stack size is set during linking and is currently 2MB.
|
||||||
|
|
||||||
... probably other issues that I've not encountered, or don't remember :-(
|
... probably other issues that I've not encountered, or don't remember :-(
|
||||||
|
|
||||||
|
@ -707,4 +698,4 @@ Andrew MacIntyre
|
||||||
E-mail: andymac@bullseye.apana.org.au, or andymac@pcug.org.au
|
E-mail: andymac@bullseye.apana.org.au, or andymac@pcug.org.au
|
||||||
Web: http://www.andymac.org/
|
Web: http://www.andymac.org/
|
||||||
|
|
||||||
17 February, 2005.
|
23 July, 2006.
|
||||||
|
|
|
@ -58,16 +58,19 @@ extern void initdatetime();
|
||||||
extern void initdl();
|
extern void initdl();
|
||||||
extern void initerrno();
|
extern void initerrno();
|
||||||
extern void initfcntl();
|
extern void initfcntl();
|
||||||
|
extern void init_functools();
|
||||||
extern void init_heapq();
|
extern void init_heapq();
|
||||||
extern void initimageop();
|
extern void initimageop();
|
||||||
extern void inititertools();
|
extern void inititertools();
|
||||||
extern void initmath();
|
extern void initmath();
|
||||||
extern void initmd5();
|
extern void init_md5();
|
||||||
extern void initoperator();
|
extern void initoperator();
|
||||||
extern void initrgbimg();
|
extern void initrgbimg();
|
||||||
extern void initsha();
|
extern void init_sha();
|
||||||
|
extern void init_sha256();
|
||||||
|
extern void init_sha512();
|
||||||
extern void initstrop();
|
extern void initstrop();
|
||||||
extern void initstruct();
|
extern void init_struct();
|
||||||
extern void inittermios();
|
extern void inittermios();
|
||||||
extern void inittime();
|
extern void inittime();
|
||||||
extern void inittiming();
|
extern void inittiming();
|
||||||
|
@ -121,16 +124,19 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"dl", initdl},
|
{"dl", initdl},
|
||||||
{"errno", initerrno},
|
{"errno", initerrno},
|
||||||
{"fcntl", initfcntl},
|
{"fcntl", initfcntl},
|
||||||
|
{"_functools", init_functools},
|
||||||
{"_heapq", init_heapq},
|
{"_heapq", init_heapq},
|
||||||
{"imageop", initimageop},
|
{"imageop", initimageop},
|
||||||
{"itertools", inititertools},
|
{"itertools", inititertools},
|
||||||
{"math", initmath},
|
{"math", initmath},
|
||||||
{"md5", initmd5},
|
{"_md5", init_md5},
|
||||||
{"operator", initoperator},
|
{"operator", initoperator},
|
||||||
{"rgbimg", initrgbimg},
|
{"rgbimg", initrgbimg},
|
||||||
{"sha", initsha},
|
{"_sha", init_sha},
|
||||||
|
{"_sha256", init_sha256},
|
||||||
|
{"_sha512", init_sha512},
|
||||||
{"strop", initstrop},
|
{"strop", initstrop},
|
||||||
{"struct", initstruct},
|
{"_struct", init_struct},
|
||||||
{"termios", inittermios},
|
{"termios", inittermios},
|
||||||
{"time", inittime},
|
{"time", inittime},
|
||||||
{"timing", inittiming},
|
{"timing", inittiming},
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#define TCPIPV4 1
|
#define TCPIPV4 1
|
||||||
#define USE_SOCKET 1
|
#define USE_SOCKET 1
|
||||||
#define socklen_t int
|
#define socklen_t int
|
||||||
|
#define FD_SETSIZE 1024
|
||||||
|
|
||||||
/* enable the Python object allocator */
|
/* enable the Python object allocator */
|
||||||
#define WITH_PYMALLOC 1
|
#define WITH_PYMALLOC 1
|
||||||
|
@ -61,6 +62,9 @@
|
||||||
#define PY_UNICODE_TYPE wchar_t
|
#define PY_UNICODE_TYPE wchar_t
|
||||||
#define Py_UNICODE_SIZE SIZEOF_SHORT
|
#define Py_UNICODE_SIZE SIZEOF_SHORT
|
||||||
|
|
||||||
|
/* EMX defines ssize_t */
|
||||||
|
#define HAVE_SSIZE_T 1
|
||||||
|
|
||||||
/* system capabilities */
|
/* system capabilities */
|
||||||
#define HAVE_TTYNAME 1
|
#define HAVE_TTYNAME 1
|
||||||
#define HAVE_WAIT 1
|
#define HAVE_WAIT 1
|
||||||
|
@ -137,6 +141,9 @@ typedef long intptr_t;
|
||||||
/* The number of bytes in a void *. */
|
/* The number of bytes in a void *. */
|
||||||
#define SIZEOF_VOID_P 4
|
#define SIZEOF_VOID_P 4
|
||||||
|
|
||||||
|
/* The number of bytes in a size_t. */
|
||||||
|
#define SIZEOF_SIZE_T 4
|
||||||
|
|
||||||
/* Define if you have the alarm function. */
|
/* Define if you have the alarm function. */
|
||||||
#define HAVE_ALARM 1
|
#define HAVE_ALARM 1
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue