On Wed, 22 Apr 2020 11:52:52 +0200
Jeremie Courreges-Anglas wrote:

> On Tue, Apr 21 2020, Charlene Wendling <[email protected]> wrote:
> > Hi,
> >
> > greenlet is broken in the current macppc bulk, and neovim won't be
> > built without it.
> >
> >> cc -fno-strict-aliasing -O2 -pipe -DNDEBUG -O2 -pipe -fPIC -O2
> >> -pipe -fPIC -I/usr/local/include/python2.7 -c greenlet.c
> >> -o 
> >> /usr/obj/ports/py-greenlet-0.4.15/greenlet-0.4.15/temp.openbsd-6.7-macppc-2.7/greenlet.o
> >> In file included from greenlet.c:343: In file included
> >> from ./slp_platformselect.h:24: ./platform/switch_ppc_unix.h:
> >> 53:14: error: invalid operand for instruction __asm__ ("mr %0,
> >> 1" : "=g" (stackref) : ); ^ <inline asm>:1:11: note: instantiated
> >> into assembly here mr 0(4), 1
> >>                  ^
> >> In file included from greenlet.c:343:
> >> In file included from ./slp_platformselect.h:24:
> >> ./platform/switch_ppc_unix.h:57:13: error: invalid operand for
> >> instruction "mr 11, %0\n"
> >>             ^
> >> <inline asm>:1:11: note: instantiated into assembly here
> >
> > Using the linux code [0] allows greenlet to build, but tests
> > segfault.
> 
> I'd suggest you use the Linux code path like FreeBSD does.
> People who truly need a working py-greenlet on powerpc can take care
> of fixing it.

It's what i did in the diff below, actually i tried neovim's basic usage 
without issues, so yes it's not a big blocker.

> Maybe you could nudge gkoehler to look at it. :)

The problem is there is this more important backend error i've
reported to bugs ;)

Here is a diff with the Linux code.

> > The build can also be fixed by applying a related change in
> > switch-ppc_aix.h [1], but tests segfault as well.
> >
> > Charlène.

> > [0]
> > https://github.com/freebsd/freebsd-ports/blob/master/devel/py-greenlet/files/patch-slp_platformselect.h
> > [1]
> > https://github.com/python-greenlet/greenlet/commit/829b44f62b024a3f9b79453b1c0c6a2eb766c336
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE
> 1524 E7EE
> 


Index: patches/patch-slp_platformselect_h
===================================================================
RCS file: /cvs/ports/devel/py-greenlet/patches/patch-slp_platformselect_h,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-slp_platformselect_h
--- patches/patch-slp_platformselect_h  18 Oct 2015 14:49:04 -0000      1.2
+++ patches/patch-slp_platformselect_h  22 Apr 2020 12:02:46 -0000
@@ -1,17 +1,18 @@
 $OpenBSD: patch-slp_platformselect_h,v 1.2 2015/10/18 14:49:04 czarkoff Exp $
 Give it a chance to build on ppc & mips
---- slp_platformselect.h.orig  Sun May 31 19:06:02 2015
-+++ slp_platformselect.h       Sat Oct 17 10:34:13 2015
-@@ -20,6 +20,8 @@
+Index: slp_platformselect.h
+--- slp_platformselect.h.orig
++++ slp_platformselect.h
+@@ -14,7 +14,7 @@
+ #include "platform/switch_x86_unix.h" /* gcc on X86 */
+ #elif defined(__GNUC__) && defined(__powerpc64__) && defined(__linux__)
+ #include "platform/switch_ppc64_linux.h" /* gcc on PowerPC 64-bit */
+-#elif defined(__GNUC__) && defined(__PPC__) && defined(__linux__)
++#elif defined(__GNUC__) && defined(__PPC__) && defined(__OpenBSD__)
+ #include "platform/switch_ppc_linux.h" /* gcc on PowerPC */
+ #elif defined(__GNUC__) && defined(__ppc__) && defined(__APPLE__)
  #include "platform/switch_ppc_macosx.h" /* Apple MacOS X on PowerPC */
- #elif defined(__GNUC__) && defined(_ARCH_PPC) && defined(_AIX)
- #include "platform/switch_ppc_aix.h" /* gcc on AIX/PowerPC */
-+#elif defined(__GNUC__) && defined(__powerpc__)
-+#include "platform/switch_ppc_unix.h" /* gcc on unix/PowerPC */
- #elif defined(__GNUC__) && defined(sparc)
- #include "platform/switch_sparc_sun_gcc.h" /* SunOS sparc with gcc */
- #elif defined(__SUNPRO_C) && defined(sparc) && defined(sun)
-@@ -41,7 +43,7 @@
+@@ -41,7 +41,7 @@
  #else
  #include "platform/switch_arm32_gcc.h" /* gcc using arm32 */
  #endif

Reply via email to