]> granicus.if.org Git - python/commitdiff
Merged revisions 87796 via svnmerge from
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:39:24 +0000 (17:39 +0000)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:39:24 +0000 (17:39 +0000)
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.
........

Misc/NEWS
Python/ceval.c

index 1ac5985059620f78099919d3eb193007cbadad08..eea77ce0b4a71ffd79d10064b60a99844d591f41 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -116,6 +116,11 @@ Build
 - 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
 -----
 
index 673eac2ed42ffbfc245187f2707f27a7a26bed3e..4c6c0eaf6917e6b09e13b597bac4b76a6a4723b4 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)