OBS-URL: https://build.opensuse.org/package/show/windows:mingw:win32/mingw32-winpthreads?expand=0&rev=23
This commit is contained in:
parent
830a6c7b10
commit
f7852320a5
42
gcc7.patch
Normal file
42
gcc7.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
--- winpthreads/src/libgcc/dll_math.c 2013-04-10 20:11:34.000000000 +0200
|
||||||
|
+++ winpthreads/src/libgcc/dll_math.c 2017-05-31 13:02:25.869883546 +0200
|
||||||
|
@@ -120,6 +120,7 @@
|
||||||
|
u_quad_t __udivdi3(u_quad_t a, u_quad_t b);
|
||||||
|
u_quad_t __umoddi3(u_quad_t a, u_quad_t b);
|
||||||
|
int __ucmpdi2(u_quad_t a, u_quad_t b);
|
||||||
|
+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem);
|
||||||
|
|
||||||
|
#endif /* !_LIBKERN_QUAD_H_ */
|
||||||
|
|
||||||
|
@@ -546,6 +547,31 @@
|
||||||
|
(void)__qdivrem(a, b, &r);
|
||||||
|
return (r);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * Divide two signed quads.
|
||||||
|
+ * This function is new in GCC 7.
|
||||||
|
+ */
|
||||||
|
+quad_t
|
||||||
|
+__divmoddi4(a, b, rem)
|
||||||
|
+ quad_t a, b, *rem;
|
||||||
|
+{
|
||||||
|
+ u_quad_t ua, ub, uq, ur;
|
||||||
|
+ int negq, negr;
|
||||||
|
+
|
||||||
|
+ if (a < 0)
|
||||||
|
+ ua = -(u_quad_t)a, negq = 1, negr = 1;
|
||||||
|
+ else
|
||||||
|
+ ua = a, negq = 0, negr = 0;
|
||||||
|
+ if (b < 0)
|
||||||
|
+ ub = -(u_quad_t)b, negq ^= 1;
|
||||||
|
+ else
|
||||||
|
+ ub = b;
|
||||||
|
+ uq = __qdivrem(ua, ub, &ur);
|
||||||
|
+ if (rem)
|
||||||
|
+ *rem = (negr ? -ur : ur);
|
||||||
|
+ return (negq ? -uq : uq);
|
||||||
|
+}
|
||||||
|
#else
|
||||||
|
static int __attribute__((unused)) dummy;
|
||||||
|
#endif /*deined (_X86_) && !defined (__x86_64__)*/
|
@ -28,6 +28,7 @@ Url: http://mingw-w64.sf.net/
|
|||||||
Source: mingw-w64-winpthreads-%version.tar.xz
|
Source: mingw-w64-winpthreads-%version.tar.xz
|
||||||
Source9: %name-rpmlintrc
|
Source9: %name-rpmlintrc
|
||||||
Patch1: memleak.patch
|
Patch1: memleak.patch
|
||||||
|
Patch2: gcc7.patch
|
||||||
BuildRequires: mingw32-cross-gcc-bootstrap
|
BuildRequires: mingw32-cross-gcc-bootstrap
|
||||||
BuildRequires: mingw32-cross-pkg-config
|
BuildRequires: mingw32-cross-pkg-config
|
||||||
BuildRequires: mingw32-filesystem
|
BuildRequires: mingw32-filesystem
|
||||||
@ -65,6 +66,7 @@ mingw-w64's implementation of POSIX threads for Windows.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n winpthreads
|
%setup -q -n winpthreads
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# The build is trying to link with libpthread.a but it has no need
|
# The build is trying to link with libpthread.a but it has no need
|
||||||
|
Loading…
x
Reference in New Issue
Block a user