all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#37028] [PATCH] gnu: mingw-w64: Update to 6.0.0.
@ 2019-08-14 12:59 David Thompson
  2019-08-27 22:08 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: David Thompson @ 2019-08-14 12:59 UTC (permalink / raw)
  To: 37028

* gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0.
* gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional
  autoconf-like substitutions.
---
 gnu/build/cross-toolchain.scm                 |  6 +-
 gnu/packages/mingw.scm                        |  6 +-
 .../patches/mingw-w64-6.0.0-gcc.patch         | 65 +++++++++++++++++++
 3 files changed, 73 insertions(+), 4 deletions(-)
 create mode 100644 gnu/packages/patches/mingw-w64-6.0.0-gcc.patch

diff --git a/gnu/build/cross-toolchain.scm b/gnu/build/cross-toolchain.scm
index d430b8afc4..d67ff966bd 100644
--- a/gnu/build/cross-toolchain.scm
+++ b/gnu/build/cross-toolchain.scm
@@ -129,7 +129,11 @@ C_*INCLUDE_PATH."
 
             (substitute* (string-append mingw-headers "/crt/_mingw.h")
               (("@MINGW_HAS_SECURE_API@")
-               "#define MINGW_HAS_SECURE_API 1"))
+               "#define MINGW_HAS_SECURE_API 1")
+              (("@DEFAULT_WIN32_WINNT@")
+               "0x502")
+              (("@DEFAULT_MSVCRT_VERSION@")
+               "0x700"))
 
             (let ((cpath (string-append mingw-headers "/include"
                                         ":" mingw-headers "/crt"
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
index 3e96f2c475..f6f95ab170 100644
--- a/gnu/packages/mingw.scm
+++ b/gnu/packages/mingw.scm
@@ -37,15 +37,15 @@
 (define-public mingw-w64
   (package
     (name "mingw-w64")
-    (version "5.0.4")
+    (version "6.0.0")
     (source (origin
               (method url-fetch)
               (uri (string-append
                     "https://sourceforge.net/projects/mingw-w64/files/mingw-w64/"
                     "mingw-w64-release/mingw-w64-v" version ".tar.bz2"))
               (sha256
-               (base32 "00zq3z1hbzd5yzmskskjg79xrzwsqx7ihyprfaxy4hb897vf29sm"))
-              (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch"))))
+               (base32 "1w28mynv500y03h92nh87rgw3fnp82qwnjbxrrzqkmr63q812pl0"))
+              (patches (search-patches "mingw-w64-6.0.0-gcc.patch"))))
     (native-inputs `(("xgcc-core" ,(cross-gcc %mingw-triplet))
                      ("xbinutils" ,(cross-binutils %mingw-triplet))))
     (build-system gnu-build-system)
diff --git a/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch
new file mode 100644
index 0000000000..036cf79f91
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-6.0.0-gcc.patch
@@ -0,0 +1,65 @@
+This patch includes
+
+   * mingw-w64-headers/include/winnt.h: compile fixes for1 gcc-4.9.3
+   * mingw-w64-headers/crt/math.h: Likewise
+   * mingw-w64-headers/crt/float.h (FLT_EPSILON,DBL_EPSILON,LDBL_EPSILON): Add
+   symbols.
+   * mingw-w64-headers/crt/stat.h (S_ISLNK,S_ISSOCK,S_ISUID,S_ISGID,S_ISLINK):
+   Add symbols.
+   (lstat): Add function.
+   * mingw-w64-headers/crt/_mingw_stat64.h: Likewise
+   * mingw-w64-headers/crt/stdlib.h (realpath): Add function.
+
+Needed for building with gcc-4.9.3 and using with cross-libtool-2.4.6.
+
+Upstream status: not yet presented upstream.
+
+diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h
+index 5874f4e..bdf4ead 100644
+--- a/mingw-w64-headers/crt/float.h
++++ b/mingw-w64-headers/crt/float.h
+@@ -22,6 +22,15 @@
+ #if (__GNUC__ < 4)
+ #error Corrupt install of gcc-s internal headers, or search order was changed.
+ #else
++
++        /* From gcc-4.9.3 float.h.  */
++        #undef FLT_EPSILON
++        #undef DBL_EPSILON
++        #undef LDBL_EPSILON
++        #define FLT_EPSILON	__FLT_EPSILON__
++        #define DBL_EPSILON	__DBL_EPSILON__
++        #define LDBL_EPSILON	__LDBL_EPSILON__
++
+ 	/* #include_next <float_ginclude.h> */
+
+    	/* Number of decimal digits, q, such that any floating-point number with q
+diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h
+index 1e970f4..99a332f 100644
+--- a/mingw-w64-headers/crt/math.h
++++ b/mingw-w64-headers/crt/math.h
+@@ -216,6 +216,7 @@ extern "C" {
+ #endif
+   }
+
++#if 0
+   __CRT_INLINE long double __cdecl fabsl (long double x)
+   {
+ #ifdef __arm__
+@@ -226,6 +227,7 @@ extern "C" {
+     return res;
+ #endif
+   }
++#endif
+
+   __CRT_INLINE double __cdecl fabs (double x)
+   {
+@@ -905,7 +907,7 @@ __mingw_choose_expr (                                         \
+ /* 7.12.7.3  */
+   extern double __cdecl hypot (double, double) __MINGW_ATTRIB_DEPRECATED_MSVC2005; /* in libmoldname.a */
+   extern float __cdecl hypotf (float x, float y);
+-#ifndef __CRT__NO_INLINE
++#if 0 //ndef __CRT__NO_INLINE
+   __CRT_INLINE float __cdecl hypotf (float x, float y) { return (float) hypot ((double)x, (double)y);}
+ #endif
+   extern long double __cdecl hypotl (long double, long double);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#37028] [PATCH] gnu: mingw-w64: Update to 6.0.0.
  2019-08-14 12:59 [bug#37028] [PATCH] gnu: mingw-w64: Update to 6.0.0 David Thompson
@ 2019-08-27 22:08 ` Ludovic Courtès
  2019-08-28 12:48   ` bug#37028: " Thompson, David
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2019-08-27 22:08 UTC (permalink / raw)
  To: David Thompson; +Cc: 37028

David Thompson <dthompson2@worcester.edu> skribis:

> * gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0.
> * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional
>   autoconf-like substitutions.
> ---
>  gnu/build/cross-toolchain.scm                 |  6 +-
>  gnu/packages/mingw.scm                        |  6 +-
>  .../patches/mingw-w64-6.0.0-gcc.patch         | 65 +++++++++++++++++++

(Cc’ing Janneke as the MinGW expert for a heads-up.  :-))

Please mention the new patch in the log and add it to gnu/local.mk.

Otherwise LGTM!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#37028: [PATCH] gnu: mingw-w64: Update to 6.0.0.
  2019-08-27 22:08 ` Ludovic Courtès
@ 2019-08-28 12:48   ` Thompson, David
  2019-08-28 16:04     ` [bug#37028] " Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Thompson, David @ 2019-08-28 12:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 37028-done

On Tue, Aug 27, 2019 at 6:08 PM Ludovic Courtès <ludo@gnu.org> wrote:
>
> David Thompson <dthompson2@worcester.edu> skribis:
>
> > * gnu/packages/mingw.scm (mingw-w64): Update to 6.0.0.
> > * gnu/build/cross-toolchain.scm (set-cross-path/mingw): Add additional
> >   autoconf-like substitutions.
> > ---
> >  gnu/build/cross-toolchain.scm                 |  6 +-
> >  gnu/packages/mingw.scm                        |  6 +-
> >  .../patches/mingw-w64-6.0.0-gcc.patch         | 65 +++++++++++++++++++
>
> (Cc’ing Janneke as the MinGW expert for a heads-up.  :-))
>
> Please mention the new patch in the log and add it to gnu/local.mk.

Done and pushed.  Thanks for the review.

- Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#37028] [PATCH] gnu: mingw-w64: Update to 6.0.0.
  2019-08-28 12:48   ` bug#37028: " Thompson, David
@ 2019-08-28 16:04     ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2019-08-28 16:04 UTC (permalink / raw)
  To: Thompson, David; +Cc: 37028-done

Thompson, David writes:

>> (Cc’ing Janneke as the MinGW expert for a heads-up.  :-))
>>
>> Please mention the new patch in the log and add it to gnu/local.mk.
>
> Done and pushed.  Thanks for the review.

Thanks, very nice.
janneke

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-28 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-14 12:59 [bug#37028] [PATCH] gnu: mingw-w64: Update to 6.0.0 David Thompson
2019-08-27 22:08 ` Ludovic Courtès
2019-08-28 12:48   ` bug#37028: " Thompson, David
2019-08-28 16:04     ` [bug#37028] " Jan Nieuwenhuizen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.