diff options
author | Christian Persch <chpe@src.gnome.org> | 2019-10-27 12:23:14 +0100 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2019-10-27 12:23:14 +0100 |
commit | ff72577bd7d84c30faca3285d7ed4e7f75194f98 (patch) | |
tree | d260177912baed33cbdc79ae7d940cd48ec03c50 | |
parent | e7f5c4174a760c4270cc4b7962597d0b1ee38e4e (diff) | |
download | vte-ff72577bd7d84c30faca3285d7ed4e7f75194f98.tar.gz |
build: Add no-exceptions sanity check
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
-rw-r--r-- | src/vteinternal.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vteinternal.hh b/src/vteinternal.hh index 9b8caca9..3de98d13 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" |