]> granicus.if.org Git - python/commitdiff
Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:01:36 +0000 (17:01 +0000)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:01:36 +0000 (17:01 +0000)
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.

Misc/NEWS
Python/ceval.c

index 98f7f8a79e2d7a647ee2d294732aff7d9d8c55d9..3fc052aeaa6534f3c18906964bdca3c1884bfb84 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -145,6 +145,11 @@ Build
 - Issue #10679: The "idle", "pydoc" and "2to3" scripts are now installed with
   a version-specific suffix on "make altinstall".
 
+- 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.
+
 Tools/Demos
 -----------
 
index 684c6c28f34d4d339493629ca058e98099d2aeb6..f6d4b0b84ba12a9ba43c59a3524f417f63d93d99 100644 (file)
 
 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)