]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 87796 via svnmerge from
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:36:32 +0000 (17:36 +0000)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 6 Jan 2011 17:36:32 +0000 (17:36 +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 a7b49de66d14df6ca30d271d80a8c5a9773c56bb..c3268558143ee7a1952ddb15295959a9d843354d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -111,6 +111,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 e848fb07cf96f85cf8730b8f8e0bbde322229d04..f3433f1d7dc3442bfac67754498571dddf3ebaf9 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)