From 35f3cd70ef9a1c87f993731062998e79af563012 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 13:04:33 +0000 Subject: import python-greenlet-0.4.2-4.el7 --- diff --git a/SOURCES/python-greenlet-support-ppc64le-ABIv2.patch b/SOURCES/python-greenlet-support-ppc64le-ABIv2.patch new file mode 100644 index 0000000..6c3bf91 --- /dev/null +++ b/SOURCES/python-greenlet-support-ppc64le-ABIv2.patch @@ -0,0 +1,84 @@ +From 9ad99fb5b9db916ca81bd3f5717c67e20384f7e0 Mon Sep 17 00:00:00 2001 +From: Ulrich Weigand +Date: Fri, 17 Jul 2015 14:03:17 -0500 +Subject: [PATCH 1/2] Add suuport for ppc64 in LE mode running ABIv2 + +Signed-off-by: Ulrich Weigand +Signed-off-by: Tony Breeds +--- + platform/switch_ppc64_linux.h | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +diff --git a/platform/switch_ppc64_linux.h b/platform/switch_ppc64_linux.h +index ee40f67..0f20756 100644 +--- a/platform/switch_ppc64_linux.h ++++ b/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,14 +42,28 @@ + + #ifdef SLP_EVAL + ++#if _CALL_ELF == 2 ++#define STACK_MAGIC 4 ++#else + #define STACK_MAGIC 6 ++#endif ++ ++#if defined(__ALTIVEC__) ++#define ALTIVEC_REGS \ ++ "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", \ ++ "v28", "v29", "v30", "v31", ++#else ++#define ALTIVEC_REGS ++#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", \ ++ ALTIVEC_REGS \ + "cr2", "cr3", "cr4" ++ + static int + slp_switch(void) + { + +From 4d0c450852a2b0cf6307cf6ca53dcdeea357cd48 Mon Sep 17 00:00:00 2001 +From: Tony Breeds +Date: Fri, 17 Jul 2015 14:05:04 -0500 +Subject: [PATCH 2/2] Force -fno-tree-dominator-opts for ppc64 in LE mode + +Disable the optimisations that are most likely to break the fragile +C/asm logic. + +Signed-off-by: Tony Breeds +--- +diff --git a/setup.py b/setup.py +--- a/setup.py 2017-03-07 12:21:05.968322000 -0500 ++++ a/setup.py 2017-03-07 12:40:58.635330000 -0500 +@@ -49,6 +49,13 @@ + else: + extra_objects = [] + ++ if sys.platform == 'win32' and os.environ.get('GREENLET_STATIC_RUNTIME') in ('1', 'yes'): ++ extra_compile_args = ['/MT'] ++ elif hasattr(os, 'uname') and os.uname()[4] in ['ppc64el', 'ppc64le']: ++ extra_compile_args = ['-fno-tree-dominator-opts'] ++ else: ++ extra_compile_args = [] ++ + ext_modules = [Extension( + name='greenlet', + sources=['greenlet.c'], diff --git a/SPECS/python-greenlet.spec b/SPECS/python-greenlet.spec index a9b0043..a28ae43 100644 --- a/SPECS/python-greenlet.spec +++ b/SPECS/python-greenlet.spec @@ -4,12 +4,13 @@ Name: python-greenlet Version: 0.4.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Lightweight in-process concurrent programming Group: Development/Libraries License: MIT URL: http://pypi.python.org/pypi/greenlet Source0: http://pypi.python.org/packages/source/g/greenlet/greenlet-%{version}.zip +Patch0: python-greenlet-support-ppc64le-ABIv2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -32,6 +33,7 @@ This package contains header files required for C modules development. %prep %setup -q -n greenlet-%{version} +%patch0 -p1 -b .ppc64le %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build @@ -47,7 +49,7 @@ rm -rf %{buildroot} # FIXME!! # The checks segfault on ppc. So this arch # is essentially not supported until this is fixed -%ifnarch ppc s390 s390x +%ifnarch ppc s390 %check # Run the upstream test suite: %{__python} setup.py test @@ -67,6 +69,14 @@ PYTHONPATH=$(pwd) %{__python} benchmarks/chain.py %{_includedir}/python*/greenlet %changelog +* Tue Mar 07 2017 d.marlin +- Add support for ppc64 in LE mode running ABIv2 + Signed-off-by: Ulrich Weigand + Signed-off-by: Tony Breeds + rhbz#1252900 +- Remove s390x from skip check list. +- Bump release and build of all archs. + * Fri Apr 14 2014 Lokesh Mandvekar 0.4.2-3 - gcc-c++ present in default buildroot, not required in BR