Accepting request 500541 from home:cgiboudeaux
Fix build with GCC 7 OBS-URL: https://build.opensuse.org/request/show/500541 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/rapidjson?expand=0&rev=3
This commit is contained in:
parent
1027e892c0
commit
6d89ed0a4e
39
fix_compilation_gcc7.patch
Normal file
39
fix_compilation_gcc7.patch
Normal file
@ -0,0 +1,39 @@
|
||||
commit fe19b7b6016d446722621fb407738209d1a911e8
|
||||
Author: Harry Wong <harrywong@live.com>
|
||||
Date: Thu May 4 10:08:48 2017 +0800
|
||||
|
||||
Supress implicit fallthrough in GCC
|
||||
|
||||
diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h
|
||||
index 1369ea26..6d110bdb 100644
|
||||
--- a/include/rapidjson/internal/regex.h
|
||||
+++ b/include/rapidjson/internal/regex.h
|
||||
@@ -29,6 +29,7 @@ RAPIDJSON_DIAG_OFF(implicit-fallthrough)
|
||||
#ifdef __GNUC__
|
||||
RAPIDJSON_DIAG_PUSH
|
||||
RAPIDJSON_DIAG_OFF(effc++)
|
||||
+RAPIDJSON_DIAG_OFF(implicit-fallthrough)
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
commit cba45fe9de6923b858edb0780e257b7257aa4f7b
|
||||
Author: Harry Wong <harrywong@live.com>
|
||||
Date: Thu May 4 10:32:45 2017 +0800
|
||||
|
||||
Onley apply to GCC 7
|
||||
|
||||
diff --git a/include/rapidjson/internal/regex.h b/include/rapidjson/internal/regex.h
|
||||
index 6d110bdb..e1a2faae 100644
|
||||
--- a/include/rapidjson/internal/regex.h
|
||||
+++ b/include/rapidjson/internal/regex.h
|
||||
@@ -29,8 +29,10 @@ 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
|
||||
RAPIDJSON_DIAG_PUSH
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 2 08:03:34 UTC 2017 - christophe@krop.fr
|
||||
|
||||
- Add fix_compilation_gcc7.patch. Fixes build with GCC >= 7.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 10 14:11:09 UTC 2016 - adam.majer@suse.de
|
||||
|
||||
|
@ -26,6 +26,7 @@ Url: http://rapidjson.org/
|
||||
Source0: https://github.com/miloyip/rapidjson/archive/v%{version}.tar.gz
|
||||
Patch: remove_arch_specific_flags.patch
|
||||
Patch1: fix_compilation_sle11sp4.patch
|
||||
Patch2: fix_compilation_gcc7.patch
|
||||
Patch10: fix_install_paths.patch
|
||||
%if 0%{?suse_version} < 1200
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -66,6 +67,7 @@ This package contains development headers and examples.
|
||||
%setup -q
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user