annotate src/mingw-w64-2-pthreads.patch @ 4467:b7d6a53fa46c

gcc: update to 7.1 with tools * src/build-gcc.mk: update version 7.1.0 * src/cloog.mk: update 0.18.4 * src/gmp.mk: update 6.1.2 * src/isl.mk: update 0.16.1, add no-undefined flag * src/mpfr.mk: update 3.1.6 * src/native-gcc.mk: update 7.1.0 * src/isl-1-fixes.patch: removed file * dist-files.mk: remove reference to patch files, add mingw-w64 patch * src/build-gcc-1-mingw-float.patch: removed patch * src/native-gcc-1-mingw-float.patch: removed patch * src/build-gcc-2-intrinsics.patch: removed patch * src/native-gcc-2-intrinsics.patch: removed patch * src/mingw-w64.mk: update to 5.0.2 * src/gcc-1-mingw-float.patch: remove patch * src/gcc-2-darwin-no-pie.patch: remove patch * src/mingw-w64-2-pthreads.patch: new file * src/pthreads.mk: apply mingw patches to mingw sources before running configure
author John D
date Mon, 31 Jul 2017 16:53:21 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4467
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
1 based on https://sourceforge.net/p/mingw-w64/mailman/message/35828127/
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
2
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
3 diff -ur mingw-w64-v5.0.2.orig/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c mingw-w64-v5.0.2/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
4 --- mingw-w64-v5.0.2.orig/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c 2017-07-31 16:10:12.189758140 -0400
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
5 +++ mingw-w64-v5.0.2/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c 2017-07-31 16:16:42.332643290 -0400
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
6 @@ -120,6 +120,7 @@
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
7 u_quad_t __udivdi3(u_quad_t a, u_quad_t b);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
8 u_quad_t __umoddi3(u_quad_t a, u_quad_t b);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
9 int __ucmpdi2(u_quad_t a, u_quad_t b);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
10 +quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
11
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
12 #endif /* !_LIBKERN_QUAD_H_ */
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
13
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
14 @@ -546,6 +547,31 @@
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
15 (void)__qdivrem(a, b, &r);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
16 return (r);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
17 }
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
18 +
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
19 +/*
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
20 + * Divide two signed quads.
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
21 + * This function is new in GCC 7.
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
22 + */
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
23 +quad_t
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
24 +__divmoddi4(a, b, rem)
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
25 + quad_t a, b, *rem;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
26 +{
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
27 + u_quad_t ua, ub, uq, ur;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
28 + int negq, negr;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
29 +
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
30 + if (a < 0)
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
31 + ua = -(u_quad_t)a, negq = 1, negr = 1;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
32 + else
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
33 + ua = a, negq = 0, negr = 0;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
34 + if (b < 0)
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
35 + ub = -(u_quad_t)b, negq ^= 1;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
36 + else
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
37 + ub = b;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
38 + uq = __qdivrem(ua, ub, &ur);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
39 + if (rem)
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
40 + *rem = (negr ? -ur : ur);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
41 + return (negq ? -uq : uq);
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
42 +}
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
43 #else
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
44 static int __attribute__((unused)) dummy;
b7d6a53fa46c gcc: update to 7.1 with tools
John D
parents:
diff changeset
45 #endif /*deined (_X86_) && !defined (__x86_64__)*/