guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/08: gnu: rapidjson: Fix FTBFS with GCC 7.


From: guix-commits
Subject: 08/08: gnu: rapidjson: Fix FTBFS with GCC 7.
Date: Tue, 9 Jul 2019 18:33:34 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit c1f4073ff53aa6b958441b7457692a1e146ab565
Author: Marius Bakke <address@hidden>
Date:   Wed Jul 10 00:29:32 2019 +0200

    gnu: rapidjson: Fix FTBFS with GCC 7.
    
    * gnu/packages/patches/rapidjson-gcc-compat.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    * gnu/packages/web.scm (rapidjson)[source](patches): New field.
---
 gnu/local.mk                                    |  1 +
 gnu/packages/patches/rapidjson-gcc-compat.patch | 18 ++++++++++++++++++
 gnu/packages/web.scm                            |  1 +
 3 files changed, 20 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index e142122..c8fa44d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1240,6 +1240,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/qtwebkit-pbutils-include.patch          \
   %D%/packages/patches/randomjungle-disable-static-build.patch \
   %D%/packages/patches/rapicorn-isnan.patch                    \
+  %D%/packages/patches/rapidjson-gcc-compat.patch              \
   %D%/packages/patches/raptor2-heap-overflow.patch             \
   %D%/packages/patches/ratpoints-sturm_and_rp_private.patch    \
   %D%/packages/patches/ratpoison-shell.patch                   \
diff --git a/gnu/packages/patches/rapidjson-gcc-compat.patch 
b/gnu/packages/patches/rapidjson-gcc-compat.patch
new file mode 100644
index 0000000..b5ffc0a
--- /dev/null
+++ b/gnu/packages/patches/rapidjson-gcc-compat.patch
@@ -0,0 +1,18 @@
+Disable -Werror=implicit-fallthrough on GCC7 and later.  Taken from upstream:
+https://github.com/Tencent/rapidjson/commit/fe19b7b6016d446722621fb407738209d1a911e8
+https://github.com/Tencent/rapidjson/commit/cba45fe9de6923b858edb0780e257b7257aa4f7b
+
+diff --git a/include/rapidjson/internal/regex.h 
b/include/rapidjson/internal/regex.h
+index 422a5240..d4039716 100644
+--- a/include/rapidjson/internal/regex.h
++++ b/include/rapidjson/internal/regex.h
+@@ -29,6 +29,9 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough)
+ #ifdef __GNUC__
+ RAPIDJSON_DIAG_PUSH
+ RAPIDJSON_DIAG_OFF(effc++)
++#if __GNUC__ >= 7
++RAPIDJSON_DIAG_OFF(implicit-fallthrough)
++#endif
+ #endif
+ 
+ #ifdef _MSC_VER
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 42c00e7..687c92e 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -761,6 +761,7 @@ current version of any major web browser.")
               (sha256
                (base32
                 "1jixgb8w97l9gdh3inihz7avz7i770gy2j2irvvlyrq3wi41f5ab"))
+              (patches (search-patches "rapidjson-gcc-compat.patch"))
               (modules '((guix build utils)))
               (snippet
                '(begin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]