[gtk-vnc] meson: set _FORTIFY_SOURCE in config.h
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] meson: set _FORTIFY_SOURCE in config.h
- Date: Thu, 1 Apr 2021 15:10:06 +0000 (UTC)
commit 5f1dd669437802308579e72c3a49f1e84232f866
Author: Daniel P. Berrangé <dan berrange com>
Date: Wed Mar 31 14:28:55 2021 +0100
meson: set _FORTIFY_SOURCE in config.h
Avoiding setting it in meson.build means we can honour the optimization
level defined by meson.
Signed-off-by: Daniel P. Berrangé <berrange redhat com>
config.h.in | 7 +++++++
meson.build | 2 --
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/config.h.in b/config.h.in
index 3edbbdf..e75db04 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,4 +1,11 @@
+/* Enable compile-time and run-time bounds-checking, and some warnings,
+ * without upsetting newer glibc. */
+
+#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
+# define _FORTIFY_SOURCE 2
+#endif
+
/* Whether GIO UNIX is available */
#mesondefine HAVE_GIOUNIX
diff --git a/meson.build b/meson.build
index 22c95dd..ef8bc66 100644
--- a/meson.build
+++ b/meson.build
@@ -232,8 +232,6 @@ check_cflags = [
'-Wno-cast-function-type',
'-Wjump-misses-init',
'-Wframe-larger-than=40096',
- '-O2',
- '-Wp,-D_FORTIFY_SOURCE=2',
'-fexceptions',
'-fasynchronous-unwind-tables',
'-fdiagnostics-show-option',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]