]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
More pre-2.3 build tweaks for the OS/2 EMX port:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Wed, 16 Jul 2003 13:31:11 +0000 (13:31 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Wed, 16 Jul 2003 13:31:11 +0000 (13:31 +0000)
- more clean up of the generated import library definiton (.DEF file)
  following checking of patch 770521, and tightening of the sed regexps.

- use -O3 even with gcc 2.8.1 - worth nearly 10% with 2.3; worth
  nothing with 2.2.x.

- clean up a couple of whitespace issues introduced by a cut'n'paste.

PC/os2emx/Makefile
PC/os2emx/README.os2emx
PC/os2emx/pyconfig.h
PC/os2emx/python23.def

index 296200b6e0827b8b152a28caac2a07a5665e46b6..fae7fb4c97827b2f8fa477d34c63fbc13406d9f6 100644 (file)
@@ -91,7 +91,7 @@ ifeq ($(MODE),debug)
   CFLAGS+=     -g -O
   LDFLAGS+=    -g
 else
-  CFLAGS+=     -s -O2 -fomit-frame-pointer
+  CFLAGS+=     -s -O3 -fomit-frame-pointer
   LDFLAGS+=    -s
 endif
 CFLAGS+=       $(PY_DEF)
@@ -515,28 +515,16 @@ $(PYTHON.DEF): $(PYTHON.LIB)
        @echo DATA MULTIPLE NONSHARED >>$@
        @echo EXPORTS >>$@
        $(EXPLIB) -u $(PYTHON.LIB) |\
-        sed -e "/ .init.*/s/^ /; /" \
-               -e "/ .pcre_.*/s/^ /; /" \
-               -e "/ .array_methods/s/^ /; /" \
-               -e "/ .fast_save_leave/s/^ /; /" \
-               -e "/ .dlopen/s/^ /; /" \
-               -e "/ .dlsym/s/^ /; /" \
-               -e "/ .dlclose/s/^ /; /" \
-               -e "/ .dlerror/s/^ /; /" \
-               -e "/ .cycle_type/s/^ /; /" \
-               -e "/ .dropwhile_type/s/^ /; /" \
-               -e "/ .takewhile_type/s/^ /; /" \
-               -e "/ .islice_type/s/^ /; /" \
-               -e "/ .starmap_type/s/^ /; /" \
-               -e "/ .imap_type/s/^ /; /" \
-               -e "/ .chain_type/s/^ /; /" \
-               -e "/ .ifilter_type/s/^ /; /" \
-               -e "/ .ifilterfalse_type/s/^ /; /" \
-               -e "/ .count_type/s/^ /; /" \
-               -e "/ .izip_type/s/^ /; /" \
-               -e "/ .repeat_type/s/^ /; /" \
-               -e "/ ._Py_re_.*/s/^ /; /" \
-               -e "/ ._Py_MD5.*/s/^ /; /" >>$@
+        sed -e "/^  .init.*/s/^ /; /" \
+               -e "/^  .pcre_.*/s/^ /; /" \
+               -e "/^  .array_methods/s/^ /; /" \
+               -e "/^  .fast_save_leave/s/^ /; /" \
+               -e "/^  .dlopen/s/^ /; /" \
+               -e "/^  .dlsym/s/^ /; /" \
+               -e "/^  .dlclose/s/^ /; /" \
+               -e "/^  .dlerror/s/^ /; /" \
+               -e "/^  ._Py_re_.*/s/^ /; /" \
+               -e "/^  ._Py_MD5.*/s/^ /; /" >>$@
 
 $(PYTHON.IMPLIB): $(PYTHON.DEF)
        $(IMPLIB) -o $@ $^
index 7201908907e49b80f5989bf9b22e3a37d865f85f..b8d2115becca64266a4c563060900c697b49b097 100644 (file)
@@ -554,10 +554,15 @@ error.
 I have not attempted to compile Python with any version of gcc prior to 
 v2.8.1.
 
-While gcc supports more aggressive optimisation than I use, a lot of 
-benchmarking indicates that Python's performance is at best only 
-marginally improved by more aggressive optimisation, at least on my 
-hardware (AMD Athlon 1.4GHz, VIA C3 800MHz).
+This release sees the default optimisation change to 
+"-O3 -fomit-frame-pointer".  This works fine too for pgcc 2.95 but not 
+for gcc 3.2.1.
+
+With gcc 3.2.1, -O3 causes 2 unexpected test failures: test_format and 
+test_unicode.  Both these tests pass if -O2 is instead of -O3 with this 
+compiler, and the performance difference is negligible (in contrast to 
+gcc 2.8.1 and pgcc 2.95, where the performance difference between the 
+2 optimisation settings approaches 10%).
 
 17.  os.spawnv() and os.spawnve() expose EMX's library routines rather 
 than use the emulation in os.py.
index 206223f4b8620ee45222636c074b06529c333af1..33fbda27e63ea0a5613a307bf9a4a8289562d7e7 100644 (file)
  * imported from the Python core DLL aren't duplicated.
  */
 #ifdef Py_BUILD_CORE
-#  define PyAPI_FUNC(RTYPE)     RTYPE
+#  define PyAPI_FUNC(RTYPE)    RTYPE
 #else
-#  define PyAPI_FUNC(RTYPE)     extern RTYPE
+#  define PyAPI_FUNC(RTYPE)    extern RTYPE
 #endif
-#define PyAPI_DATA(RTYPE)       extern RTYPE
-#define PyMODINIT_FUNC  void
+#define PyAPI_DATA(RTYPE)      extern RTYPE
+#define PyMODINIT_FUNC void
 
 /* Use OS/2 flavour of threads */
 #define WITH_THREAD    1
index 7c33327e1f1f1401f8cfba1c52028a2649f23792..2927fbae04dc4265302640e13512a06562604519 100644 (file)
@@ -1070,18 +1070,6 @@ EXPORTS
 
 ; From python23_s.lib(itertoolsmodule)
 ;  "inititertools"
-;  "cycle_type"
-;  "dropwhile_type"
-;  "takewhile_type"
-;  "islice_type"
-;  "starmap_type"
-;  "imap_type"
-;  "chain_type"
-;  "ifilter_type"
-;  "ifilterfalse_type"
-;  "count_type"
-;  "izip_type"
-;  "repeat_type"
 
 ; From python23_s.lib(_localemodule)
 ;  "init_locale"