summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-23 12:20:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-23 12:20:49 +0100
commitf89f9aa6adcc5af5adff7ba1c589734c73ed80ab (patch)
treeee55cc77a61232d75775f05719a0c92f9fbdeaec /external
parent9d2721b1bb1256446a89ae8ab8f31f7f780d500c (diff)
With GCC -std=gnu++17, dynamic exception specifications cause an error
...instead of a warning (as with Clang), so this follow-up to e16644fa1c042b56a1301f0476d7ddb71c8765ea "external/mysqlcppconn: Silence -Wdynamic-exception-spec errors" patches the (few) dynamic exception specifications out of external/mysqlcppconn completely Change-Id: I83a42f1c09e60c15fad1564cf7c42eb3370485da
Diffstat (limited to 'external')
-rw-r--r--external/mysqlcppconn/Library_mysqlcppconn.mk9
-rw-r--r--external/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk1
-rw-r--r--external/mysqlcppconn/patches/dynexcspec.patch.015
3 files changed, 16 insertions, 9 deletions
diff --git a/external/mysqlcppconn/Library_mysqlcppconn.mk b/external/mysqlcppconn/Library_mysqlcppconn.mk
index 70599b05e328..e2894824bc18 100644
--- a/external/mysqlcppconn/Library_mysqlcppconn.mk
+++ b/external/mysqlcppconn/Library_mysqlcppconn.mk
@@ -58,15 +58,6 @@ $(eval $(call gb_Library_add_libs,mysqlcppconn,\
))
endif
-# Avoid -Wdynamic-exception-spec errors in Clang C++17 mode:
-ifeq ($(COM_IS_CLANG),TRUE)
-$(eval $(call gb_Library_add_cxxflags,mysqlcppconn, \
- $(if $(filter -std=gnu++17 -std=gnu++1z -std=c++17 -std=c++1z, \
- $(CXXFLAGS_CXX11)), \
- -Wno-error=dynamic-exception-spec) \
-))
-endif
-
$(eval $(call gb_Library_add_generated_exception_objects,mysqlcppconn,\
UnpackedTarball/mysqlcppconn/driver/mysql_art_resultset \
UnpackedTarball/mysqlcppconn/driver/mysql_art_rset_metadata \
diff --git a/external/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk b/external/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
index 65f0f8300d1e..82a368460747 100644
--- a/external/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
+++ b/external/mysqlcppconn/UnpackedTarball_mysqlcppconn.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,mysqlcppconn,\
external/mysqlcppconn/patches/mysql-connector-c++-1.1.0.patch \
external/mysqlcppconn/patches/warnings.patch.0 \
external/mysqlcppconn/patches/enable-libmysql-proxy.patch \
+ external/mysqlcppconn/patches/dynexcspec.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/mysqlcppconn/patches/dynexcspec.patch.0 b/external/mysqlcppconn/patches/dynexcspec.patch.0
new file mode 100644
index 000000000000..ed7ac3685a4b
--- /dev/null
+++ b/external/mysqlcppconn/patches/dynexcspec.patch.0
@@ -0,0 +1,15 @@
+--- cppconn/exception.h
++++ cppconn/exception.h
+@@ -36,10 +36,10 @@
+ {
+
+ #define MEMORY_ALLOC_OPERATORS(Class) \
+- void* operator new(size_t size) throw (std::bad_alloc) { return ::operator new(size); } \
++ void* operator new(size_t size) { return ::operator new(size); } \
+ void* operator new(size_t, void*) throw(); \
+ void* operator new(size_t, const std::nothrow_t&) throw(); \
+- void* operator new[](size_t) throw (std::bad_alloc); \
++ void* operator new[](size_t); \
+ void* operator new[](size_t, void*) throw(); \
+ void* operator new[](size_t, const std::nothrow_t&) throw(); \
+ void* operator new(size_t N, std::allocator<Class>&);