- Add 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch as
a workardond against https://bitbucket.org/cffi/cffi/issues/378/ (possible bug in GCC, see https://bugzilla.redhat.com/1552724). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=50
This commit is contained in:
parent
78a65200ea
commit
85c14cfd92
46
3184b0a675fc425b821b528d7fdf744b2f08dadf.patch
Normal file
46
3184b0a675fc425b821b528d7fdf744b2f08dadf.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Armin Rigo <arigo@tunes.org>
|
||||||
|
# Date 1536839482 -7200
|
||||||
|
# Node ID 3184b0a675fc425b821b528d7fdf744b2f08dadf
|
||||||
|
# Parent 97a61f7b0bcd48eb74f136280ffd8733e829f153
|
||||||
|
Issue 378
|
||||||
|
|
||||||
|
Workaround for a GCC bug
|
||||||
|
|
||||||
|
diff --git a/c/_cffi_backend.c b/c/_cffi_backend.c
|
||||||
|
--- a/c/_cffi_backend.c
|
||||||
|
+++ b/c/_cffi_backend.c
|
||||||
|
@@ -892,11 +892,21 @@
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef __GNUC__
|
||||||
|
+/* This is a workaround for what I think is a GCC bug on several
|
||||||
|
+ platforms. See issue #378. */
|
||||||
|
+__attribute__((noinline))
|
||||||
|
+#endif
|
||||||
|
+void _cffi_memcpy(char *target, const void *src, size_t size)
|
||||||
|
+{
|
||||||
|
+ memcpy(target, src, size);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#define _write_raw_data(type) \
|
||||||
|
do { \
|
||||||
|
if (size == sizeof(type)) { \
|
||||||
|
type r = (type)source; \
|
||||||
|
- memcpy(target, &r, sizeof(type)); \
|
||||||
|
+ _cffi_memcpy(target, &r, sizeof(type)); \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} while(0)
|
||||||
|
@@ -970,8 +980,8 @@
|
||||||
|
if (size == 2*sizeof(type)) { \
|
||||||
|
type r = (type)source.real; \
|
||||||
|
type i = (type)source.imag; \
|
||||||
|
- memcpy(target, &r, sizeof(type)); \
|
||||||
|
- memcpy(target+sizeof(type), &i, sizeof(type)); \
|
||||||
|
+ _cffi_memcpy(target, &r, sizeof(type)); \
|
||||||
|
+ _cffi_memcpy(target+sizeof(type), &i, sizeof(type)); \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} while(0)
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 21 07:24:58 CEST 2018 - mcepl@suse.com
|
||||||
|
|
||||||
|
- Add 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch as
|
||||||
|
a workardond against
|
||||||
|
https://bitbucket.org/cffi/cffi/issues/378/ (possible bug in
|
||||||
|
GCC, see https://bugzilla.redhat.com/1552724).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 19 20:43:08 CEST 2018 - mcepl@suse.com
|
Wed Sep 19 20:43:08 CEST 2018 - mcepl@suse.com
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{ver
|
|||||||
Source1: python-cffi-rpmlintrc
|
Source1: python-cffi-rpmlintrc
|
||||||
# https://bitbucket.org/cffi/cffi/issues/384/
|
# https://bitbucket.org/cffi/cffi/issues/384/
|
||||||
Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
|
Patch0: e2e324a2f13e3a646de6f6ff03e90ed7d37e2636.patch
|
||||||
|
# https://bitbucket.org/cffi/cffi/issues/378
|
||||||
|
Patch1: 3184b0a675fc425b821b528d7fdf744b2f08dadf.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module pycparser}
|
BuildRequires: %{python_module pycparser}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user