[packages/osquery] fix gcc flags warning
glen
glen at pld-linux.org
Sat Jul 25 15:27:50 CEST 2015
commit dbc72979819f860d0eb8e634747ae8580e0af1a1
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jul 25 16:24:33 2015 +0300
fix gcc flags warning
gcc-flags.patch | 28 ++++++++++++++++++++++++++++
osquery.spec | 2 ++
2 files changed, 30 insertions(+)
---
diff --git a/osquery.spec b/osquery.spec
index f4a3c17..94f15fa 100644
--- a/osquery.spec
+++ b/osquery.spec
@@ -9,6 +9,7 @@ Source0: https://github.com/facebook/osquery/archive/%{version}/%{name}-%{versio
Source1: https://github.com/osquery/third-party/archive/%{version}/%{name}-third-party-%{version}.tar.gz
# Source1-md5: 940f351cef7965b0f57df70d54885ded
Patch0: platform.patch
+Patch1: gcc-flags.patch
URL: https://osquery.io/
BuildRequires: boost-devel
BuildRequires: bzip2-devel
@@ -45,6 +46,7 @@ network connections, browser plugins, hardware events or file hashes.
%prep
%setup -q -a1
%patch0 -p1
+%patch1 -p1
mv third-party-%{version}/* third-party
diff --git a/gcc-flags.patch b/gcc-flags.patch
new file mode 100644
index 0000000..5b4c5f6
--- /dev/null
+++ b/gcc-flags.patch
@@ -0,0 +1,28 @@
+gcc (4.9.3) complains:
+
+cc1: warning: command line option '-Wnon-virtual-dtor' is valid for C++/ObjC++ but not for C
+cc1: warning: command line option '-Woverloaded-virtual' is valid for C++/ObjC++ but not for C
+
+so set these two flags for CXX only
+--- osquery-1.5.0/CMakeLists.txt~ 2015-07-20 12:37:24.000000000 +0300
++++ osquery-1.5.0/CMakeLists.txt 2015-07-25 15:06:09.473520609 +0300
+@@ -31,10 +31,8 @@
+ -Wno-unused-result
+ -Wno-missing-field-initializers
+ -Wno-sign-compare
+- -Wnon-virtual-dtor
+ -Wchar-subscripts
+ -Wpointer-arith
+- -Woverloaded-virtual
+ -Wformat
+ -Wformat-security
+ -Werror=format-security
+@@ -48,7 +46,7 @@
+
+ # osquery additional compiler flags added by CMake.
+ set(C_COMPILE_FLAGS "")
+-set(CXX_COMPILE_FLAGS "")
++set(CXX_COMPILE_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual")
+
+ # Use osquery language to set platform/os
+ if(DEFINED ENV{OSQUERY_PLATFORM})
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/osquery.git/commitdiff/9b117e9c4788c7e47afc9fb40bf257bf650b854f
More information about the pld-cvs-commit
mailing list