[Python-checkins] r87800 - in python/branches/release31-maint: Misc/NEWS Python/ceval.c

david.malcolm python-checkins at python.org
Thu Jan 6 18:36:32 CET 2011


Author: david.malcolm
Date: Thu Jan  6 18:36:32 2011
New Revision: 87800

Log:
Merged revisions 87796 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87796 | david.malcolm | 2011-01-06 12:01:36 -0500 (Thu, 06 Jan 2011) | 6 lines
  
  Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
  timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
  support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
  only be present on OS X; the former is the correct one for Linux with GCC.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Misc/NEWS
   python/branches/release31-maint/Python/ceval.c

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Thu Jan  6 18:36:32 2011
@@ -111,6 +111,11 @@
 - Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
   and DragonFly BSD.  Patch by Nicolas Joly.
 
+- Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
+  timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
+  support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
+  only be present on OS X; the former is the correct one for Linux with GCC.
+
 Tests
 -----
 

Modified: python/branches/release31-maint/Python/ceval.c
==============================================================================
--- python/branches/release31-maint/Python/ceval.c	(original)
+++ python/branches/release31-maint/Python/ceval.c	Thu Jan  6 18:36:32 2011
@@ -27,10 +27,11 @@
 
 typedef unsigned long long uint64;
 
-#if defined(__ppc__) /* <- Don't know if this is the correct symbol; this
-                           section should work for GCC on any PowerPC
-                           platform, irrespective of OS.
-                           POWER?  Who knows :-) */
+/* PowerPC suppport.
+   "__ppc__" appears to be the preprocessor definition to detect on OS X, whereas
+   "__powerpc__" appears to be the correct one for Linux with GCC
+*/
+#if defined(__ppc__) || defined (__powerpc__)
 
 #define READ_TIMESTAMP(var) ppc_getcounter(&var)
 


More information about the Python-checkins mailing list