Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for
the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code
and the test code.
---
daemon/Makefile.am | 3 +++
m4/virt-compile-warnings.m4 | 4 ++--
src/Makefile.am | 1 +
tests/Makefile.am | 2 ++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 927d16f..7d45320 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -123,6 +123,7 @@ libvirtd_conf_la_CFLAGS = \
$(LIBXML_CFLAGS) \
$(XDR_CFLAGS) \
$(WARN_CFLAGS) $(PIE_CFLAGS) \
+ $(RELAXED_FRAME_LIMIT_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
libvirtd_conf_la_LDFLAGS = \
@@ -142,6 +143,7 @@ libvirtd_admin_la_CFLAGS = \
$(XDR_CFLAGS) \
$(PIE_CFLAGS) \
$(WARN_CFLAGS) \
+ $(RELAXED_FRAME_LIMIT_CFLAGS) \
$(LIBXML_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
@@ -176,6 +178,7 @@ libvirtd_CFLAGS = \
$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
$(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \
$(WARN_CFLAGS) $(PIE_CFLAGS) \
+ $(RELAXED_FRAME_LIMIT_CFLAGS) \
$(COVERAGE_CFLAGS) \
-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\""
diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index b72dfb3..3e64e1d 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -171,8 +171,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# This should be < 256 really. Currently we're down to 4096,
# but using 1024 bytes sized buffers (mostly for virStrerror)
# stops us from going down further
- wantwarn="$wantwarn -Wframe-larger-than=25600"
- dnl wantwarn="$wantwarn -Wframe-larger-than=256"
+ gl_WARN_ADD(["-Wframe-larger-than=4096"], [STRICT_FRAME_LIMIT_CFLAGS])
+ gl_WARN_ADD(["-Wframe-larger-than=25600"], [RELAXED_FRAME_LIMIT_CFLAGS])
# Extra special flags
dnl -fstack-protector stuff passes gl_WARN_ADD with gcc
diff --git a/src/Makefile.am b/src/Makefile.am
index 275bfc7..cb75553 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -39,6 +39,7 @@ INCLUDES = -I../gnulib/lib \
AM_CFLAGS = $(LIBXML_CFLAGS) \
$(WARN_CFLAGS) \
+ $(STRICT_FRAME_LIMIT_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) \
$(WIN32_EXTRA_CFLAGS) \
$(COVERAGE_CFLAGS)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b3ee6e6..ba08ca5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -46,6 +46,7 @@ AM_CFLAGS = \
$(APPARMOR_CFLAGS) \
$(YAJL_CFLAGS) \
$(COVERAGE_CFLAGS) \
+ $(RELAXED_FRAME_LIMIT_CFLAGS) \
$(WARN_CFLAGS)
AM_LDFLAGS = \
@@ -889,6 +890,7 @@ commandhelper_SOURCES = \
commandhelper.c
commandhelper_LDADD = \
$(WARN_CFLAGS) \
+ $(RELAXED_FRAME_LIMIT_CFLAGS) \
$(NO_INDIRECT_LDFLAGS) \
$(PROBES_O) \
../src/libvirt_util.la \
--
2.7.3