summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2019-11-19 18:32:48 +0100
committerChristian Persch <chpe@src.gnome.org>2019-11-19 18:32:48 +0100
commit6874135c0ea27e49ee909abb6c750e27f1eb0896 (patch)
tree28dc88c4910ec0b43a0ad9c9a4af9a77d9fbd876
parentbb43a57370b741fc280fa3e2606492531c28e64c (diff)
downloadvte-0-54.tar.gz
build: Add no-exceptions sanity checkvte-0-54
Some distributions pass -fexceptions in a way that overrides vte's own -fno-exceptions. This is a hard error; fail the build. See https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/207 (cherry picked from commit ff72577bd7d84c30faca3285d7ed4e7f75194f98)
-rw-r--r--src/vteinternal.hh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vteinternal.hh b/src/vteinternal.hh
index 1652ca5f..63cca431 100644
--- a/src/vteinternal.hh
+++ b/src/vteinternal.hh
@@ -18,6 +18,23 @@
#pragma once
+/* BEGIN sanity checks */
+
+/* Some distributions pass -fexceptions in a way that overrides vte's
+ * own -fno-exceptions. This is a hard error; fail the build.
+ * See https://gitlab.gnome.org/GNOME/gnome-build-meta/issues/207
+ */
+#ifdef __EXCEPTIONS
+#error You MUST NOT use -fexceptions to build vte! Fix your build; and DO NOT file a bug upstream!
+#endif
+
+/* While we're at it, check -fno-rtti too */
+#ifdef __GXX_RTTI
+#error You MUST NOT use -frtti to build vte! Fix your build system; and DO NOT file a bug upstream!
+#endif
+
+/* END sanity checks */
+
#include <glib.h>
#include "vtedefines.hh"