Hi Bernhard, Am Dienstag, den 15.01.2019, 21:50 +0100 schrieb Bernhard Walle: > Signed-off-by: Bernhard Walle <bernh...@bwalle.de> > --- > .../0001-Remove-march-native-from-c-xx-flags.patch | 22 ++++++++++++ > ...02-Remove-Wextra-and-Werror-from-cxxflags.patch | 25 +++++++++++++ > .../0003-Add-a-void-case-in-memcpy.patch | 35 ++++++++++++++++++ > patches/rapidjson-1.1.0/series | 6 ++++ > rules/rapidjson.in | 10 ++++++ > rules/rapidjson.make | 41 > ++++++++++++++++++++++ > 6 files changed, 139 insertions(+) > create mode 100644 > patches/rapidjson-1.1.0/0001-Remove-march-native-from-c-xx-flags.patch > create mode 100644 > patches/rapidjson-1.1.0/0002-Remove-Wextra-and-Werror-from-cxxflags.patch > create mode 100644 > patches/rapidjson-1.1.0/0003-Add-a-void-case-in-memcpy.patch > create mode 100644 patches/rapidjson-1.1.0/series > create mode 100644 rules/rapidjson.in > create mode 100644 rules/rapidjson.make > > diff --git > a/patches/rapidjson-1.1.0/0001-Remove-march-native-from-c-xx-flags.patch > b/patches/rapidjson-1.1.0/0001-Remove-march-native-from-c-xx-flags.patch > new file mode 100644 > index 000000000..6b38eaacc > --- /dev/null > +++ b/patches/rapidjson-1.1.0/0001-Remove-march-native-from-c-xx-flags.patch > @@ -0,0 +1,22 @@ > +From: Bernhard Walle <bernh...@bwalle.de> > +Date: Sun, 6 Jan 2019 10:30:55 +0100 > +Subject: [PATCH] Remove -march=native from c(xx)flags > + > +Signed-off-by: Bernhard Walle <bernh...@bwalle.de> > +--- > + CMakeLists.txt | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index ceda71b1b67c..66183d58ab73 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -50,7 +50,7 @@ if(CCACHE_FOUND) > + endif(CCACHE_FOUND) > + > + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") > +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -Wall -Wextra > -Werror") > ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") > + if (RAPIDJSON_BUILD_CXX11) > + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0") > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") > diff --git > a/patches/rapidjson-1.1.0/0002-Remove-Wextra-and-Werror-from-cxxflags.patch > b/patches/rapidjson-1.1.0/0002-Remove-Wextra-and-Werror-from-cxxflags.patch > new file mode 100644 > index 000000000..e06aaa657 > --- /dev/null > +++ > b/patches/rapidjson-1.1.0/0002-Remove-Wextra-and-Werror-from-cxxflags.patch > @@ -0,0 +1,25 @@ > +From: Bernhard Walle <bernh...@bwalle.de> > +Date: Sun, 6 Jan 2019 11:21:23 +0100 > +Subject: [PATCH] Remove -Wextra and -Werror from cxxflags > + > +The code doesn't compile with that warnings, for example because > +-Wimplicit-fallthrough is enabled with -Wextra. > + > +Signed-off-by: Bernhard Walle <bernh...@bwalle.de> > +--- > + CMakeLists.txt | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index 66183d58ab73..5e0e065f8d1b 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -50,7 +50,7 @@ if(CCACHE_FOUND) > + endif(CCACHE_FOUND) > + > + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") > +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") > ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall > -Wno-implicit-fallthrough") > + if (RAPIDJSON_BUILD_CXX11) > + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0") > + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") > diff --git a/patches/rapidjson-1.1.0/0003-Add-a-void-case-in-memcpy.patch > b/patches/rapidjson-1.1.0/0003-Add-a-void-case-in-memcpy.patch > new file mode 100644 > index 000000000..d1610e4df > --- /dev/null > +++ b/patches/rapidjson-1.1.0/0003-Add-a-void-case-in-memcpy.patch > @@ -0,0 +1,35 @@ > +From: Bernhard Walle <bernh...@bwalle.de> > +Date: Sun, 6 Jan 2019 11:23:52 +0100 > +Subject: [PATCH] Add a (void *) case in memcpy > + > +The code seems to be ok since that's the way they fixed it in the git > +repo. However, the patch from master doesn't cleanly apply in the old > +version. > + > +Signed-off-by: Bernhard Walle <bernh...@bwalle.de> > +--- > + include/rapidjson/document.h | 4 ++-- > + 1 file changed, 2 insertions(+), 2 deletions(-) > + > +diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h > +index e3e20dfbdc99..a99960426f34 100644 > +--- a/include/rapidjson/document.h > ++++ b/include/rapidjson/document.h > +@@ -1936,7 +1936,7 @@ private: > + if (count) { > + GenericValue* e = > static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue))); > + SetElementsPointer(e); > +- std::memcpy(e, values, count * sizeof(GenericValue)); > ++ std::memcpy((void *)e, values, count * sizeof(GenericValue)); > + } > + else > + SetElementsPointer(0); > +@@ -1949,7 +1949,7 @@ private: > + if (count) { > + Member* m = static_cast<Member*>(allocator.Malloc(count * > sizeof(Member))); > + SetMembersPointer(m); > +- std::memcpy(m, members, count * sizeof(Member)); > ++ std::memcpy((void *)m, members, count * sizeof(Member)); > + } > + else > + SetMembersPointer(0); > diff --git a/patches/rapidjson-1.1.0/series b/patches/rapidjson-1.1.0/series > new file mode 100644 > index 000000000..70a6817fb > --- /dev/null > +++ b/patches/rapidjson-1.1.0/series > @@ -0,0 +1,6 @@ > +# generated by git-ptx-patches > +#tag:base --start-number 1 > +0001-Remove-march-native-from-c-xx-flags.patch > +0002-Remove-Wextra-and-Werror-from-cxxflags.patch > +0003-Add-a-void-case-in-memcpy.patch > +# be3fde461333ed720039c1861af479cb - git-ptx-patches magic > diff --git a/rules/rapidjson.in b/rules/rapidjson.in > new file mode 100644 > index 000000000..bef9492d5 > --- /dev/null > +++ b/rules/rapidjson.in > @@ -0,0 +1,10 @@ > +## SECTION=system_libraries > + > +config RAPIDJSON > + bool use tristate
> + prompt "rapidjson" > + select HOST_CMAKE > + help > + A fast JSON parser/generator for C++ with both SAX/DOM style API > + > + NOTE: This library is header-only, so there's no target package. > diff --git a/rules/rapidjson.make b/rules/rapidjson.make > new file mode 100644 > index 000000000..6af8e9cf2 > --- /dev/null > +++ b/rules/rapidjson.make > @@ -0,0 +1,41 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2019 by Bernhard Walle <bernh...@bwalle.de> > +# > +# See CREDITS for details about who has contributed to this project. > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +# > +# We provide this package > +# > +PACKAGES-$(PTXCONF_RAPIDJSON) += rapidjson > + > +# > +# Paths and names > +# > +RAPIDJSON_VERSION := 1.1.0 > +RAPIDJSON_MD5 := badd12c511e081fec6c89c43a7027bce > +RAPIDJSON := rapidjson-$(RAPIDJSON_VERSION) > +RAPIDJSON_SUFFIX := tar.gz > +RAPIDJSON_URL := > https://github.com/Tencent/rapidjson/archive/v$(RAPIDJSON_VERSION).$(RAPIDJSON_SUFFIX) > +RAPIDJSON_DIR := $(BUILDDIR)/$(RAPIDJSON) > +RAPIDJSON_SOURCE := $(SRCDIR)/$(RAPIDJSON).$(RAPIDJSON_SUFFIX) > +RAPIDJSON_LICENSE := MIT > + > +# > ---------------------------------------------------------------------------- > +# Prepare > +# > ---------------------------------------------------------------------------- > + > +# > +# cmake > +# > +RAPIDJSON_CONF_TOOL := cmake > +RAPIDJSON_CONF_OPT := $(CROSS_CMAKE_USR) \ > + -DRAPIDJSON_BUILD_DOC=OFF \ > + -DRAPIDJSON_BUILD_EXAMPLES=OFF \ > + -DRAPIDJSON_BUILD_TESTS=OFF > + > +# vim: syntax=make Diehl Connectivity Solutions GmbH Geschäftsführung: Horst Leonberger Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht Nürnberg: HRB 32315 ___________________________________________________________________________________________________ Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited. _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de