From dc9a391941c5143352bde2709de67f9b9c6f8f859693b17797dd250feb292f94 Mon Sep 17 00:00:00 2001 From: Denisart Benjamin Date: Fri, 13 Dec 2013 15:03:15 +0000 Subject: [PATCH] Accepting request 210802 from openSUSE:Factory:PowerLE - ppc64le-support.patch: Support powerpc64le-linux (ELFv2 ABI). Save/restore vector and floating-point registers as well on ppc. OBS-URL: https://build.opensuse.org/request/show/210802 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=15 --- ppc64le-support.patch | 36 ++++++++++++++++++++++++++++++++++++ python-greenlet.changes | 6 ++++++ python-greenlet.spec | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 ppc64le-support.patch diff --git a/ppc64le-support.patch b/ppc64le-support.patch new file mode 100644 index 0000000..103c0f9 --- /dev/null +++ b/ppc64le-support.patch @@ -0,0 +1,36 @@ +Index: greenlet-0.4.1/platform/switch_ppc64_linux.h +=================================================================== +--- greenlet-0.4.1.orig/platform/switch_ppc64_linux.h ++++ greenlet-0.4.1/platform/switch_ppc64_linux.h +@@ -2,6 +2,8 @@ + * this is the internal transfer function. + * + * HISTORY ++ * 10-Dec-13 Ulrich Weigand ++ * Support ELFv2 ABI. Save float/vector registers. + * 09-Mar-12 Michael Ellerman + * 64-bit implementation, copied from 32-bit. + * 07-Sep-05 (py-dev mailing list discussion) +@@ -40,13 +42,22 @@ + + #ifdef SLP_EVAL + ++#if _CALL_ELF == 2 ++#define STACK_MAGIC 4 ++#else + #define STACK_MAGIC 6 ++#endif + + /* !!!!WARNING!!!! need to add "r31" in the next line if this header file + * is meant to be compiled non-dynamically! + */ + #define REGS_TO_SAVE "r2", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \ + "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r31", \ ++ "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", \ ++ "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", \ ++ "fr30", "fr31", \ ++ "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", \ ++ "v28", "v29", "v30", "v31", \ + "cr2", "cr3", "cr4" + static int + slp_switch(void) diff --git a/python-greenlet.changes b/python-greenlet.changes index 5a736ed..e0c6ba8 100644 --- a/python-greenlet.changes +++ b/python-greenlet.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Dec 10 12:33:07 UTC 2013 - uweigand@de.ibm.com + +- ppc64le-support.patch: Support powerpc64le-linux (ELFv2 ABI). + Save/restore vector and floating-point registers as well on ppc. + ------------------------------------------------------------------- Thu Oct 24 11:06:14 UTC 2013 - speilicke@suse.com diff --git a/python-greenlet.spec b/python-greenlet.spec index 362472b..186ad1d 100644 --- a/python-greenlet.spec +++ b/python-greenlet.spec @@ -25,6 +25,7 @@ Summary: Lightweight in-process concurrent programming License: MIT Group: Development/Libraries/Python Source0: http://pypi.python.org/packages/source/g/greenlet/greenlet-%{version}.zip +Patch1: ppc64le-support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: python-Sphinx @@ -54,6 +55,7 @@ This package contains header files required for C modules development. %prep %setup -q -n greenlet-%{version} +%patch1 -p1 %build CFLAGS="%{optflags}" python setup.py build