msg123652 - (view) |
Author: Adrian Reber (adrian) |
Date: 2010-12-08 21:50 |
In Python/ceval.c is following line: #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 :-) */ which seems wrong and aborts the build on powerpc. Changing it to __powerpc__ fixes it for me. The following output of gcc confirms it: $ gcc -dM -E -x c /tmp/foo.c | grep powerpc #define __powerpc__ 1 #define __powerpc 1 #define powerpc 1 Whereas there are no defines containing "ppc" |
|
|
msg123653 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2010-12-08 21:57 |
How about accepting either of these symbols? Do you want to provide a patch? |
|
|
msg123656 - (view) |
Author: Dave Malcolm (dmalcolm)  |
Date: 2010-12-08 22:13 |
What version of the compiler was this with? (For reference, I see that you also filed this downstream in Fedora's bug tracker as: https://bugzilla.redhat.com/show_bug.cgi?id=661510 ) |
|
|
msg123660 - (view) |
Author: Dave Malcolm (dmalcolm)  |
Date: 2010-12-08 23:06 |
One of RH's gcc gurus told me in IRC that: __ppc__ is not a standard powerpc*-linux macro __PPC__ or __powerpc__ is |
|
|
msg123661 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2010-12-08 23:23 |
Le mercredi 08 décembre 2010 à 23:06 +0000, Dave Malcolm a écrit : > Dave Malcolm <dmalcolm@redhat.com> added the comment: > > One of RH's gcc gurus told me in IRC that: > __ppc__ is not a standard powerpc*-linux macro > __PPC__ or __powerpc__ is Keep in mind that we have currently working PPC buildbots (under OS X). |
|
|
msg123679 - (view) |
Author: Adrian Reber (adrian) |
Date: 2010-12-09 12:48 |
Here is a patch that I had to include in my Linux PowerPC build of 2.7 and 3.2 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -31,10 +31,12 @@ typedef unsigned long long uint64; -#if defined(__ppc__) /* <- Don't know if this is the correct symbol; this +#if defined(__ppc__) | |
defined (__powerpc__) /* <- 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 :-) */ + POWER? Who knows :-) + __powerpc__ is necessary for Linux */ #define READ_TIMESTAMP(var) ppc_getcounter(&var) |
|
msg125479 - (view) |
Author: Dave Malcolm (dmalcolm)  |
Date: 2011-01-05 23:40 |
FWIW, I just added this patch downstream to Fedora's python 3 builds: http://pkgs.fedoraproject.org/gitweb/?p=python3.git;a=blob_plain;f=python-3.2b2-fix-ppc-debug-build.patch;hb=5659c63442be2e91eb42e60284d7a9a9ab0b80dd |
|
|
msg125480 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2011-01-05 23:41 |
> FWIW, I just added this patch downstream to Fedora's python 3 builds: > http://pkgs.fedoraproject.org/gitweb/?p=python3.git;a=blob_plain;f=python-3.2b2-fix-ppc-debug-build.patch;hb=5659c63442be2e91eb42e60284d7a9a9ab0b80dd Any reason not to commit it here? |
|
|
msg125565 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2011-01-06 16:49 |
Issue5369 is a duplicate with the same patch. Dave, can you apply? |
|
|
msg125567 - (view) |
Author: Dave Malcolm (dmalcolm)  |
Date: 2011-01-06 17:04 |
Adrian verified in the downstream bug tracker that this fixed the build for him (and the logs show it successfully ran the test suite), so I committed my patch to py3k as r87796. |
|
|
msg125572 - (view) |
Author: Dave Malcolm (dmalcolm)  |
Date: 2011-01-06 17:39 |
Merged back to 3.1 as r87800 and to 2.7-maint as r87801 |
|
|