Split out -Wframe-larger-than warning from WARN_CLFAGS

Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for
production code and RELAXED_FRAME_LIMIT_CFLAGS for tests.

Raising the limit for tests allows building them with clang
with optimizations disabled.

(cherry picked from commit e73889b631)
This commit is contained in:
Ján Tomko 2016-06-29 15:19:18 +02:00 committed by Cole Robinson
parent f59163c46d
commit b79808000d
5 changed files with 10 additions and 2 deletions

View File

@ -31,6 +31,8 @@ INCLUDES = \
CLEANFILES = CLEANFILES =
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
DAEMON_GENERATED = \ DAEMON_GENERATED = \
remote_dispatch.h \ remote_dispatch.h \
lxc_dispatch.h \ lxc_dispatch.h \

View File

@ -169,8 +169,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
# This should be < 256 really. Currently we're down to 4096, # This should be < 256 really. Currently we're down to 4096,
# but using 1024 bytes sized buffers (mostly for virStrerror) # but using 1024 bytes sized buffers (mostly for virStrerror)
# stops us from going down further # stops us from going down further
wantwarn="$wantwarn -Wframe-larger-than=4096" gl_WARN_ADD(["-Wframe-larger-than=4096"], [STRICT_FRAME_LIMIT_CFLAGS])
dnl wantwarn="$wantwarn -Wframe-larger-than=256" gl_WARN_ADD(["-Wframe-larger-than=25600"], [RELAXED_FRAME_LIMIT_CFLAGS])
# Extra special flags # Extra special flags
dnl -fstack-protector stuff passes gl_WARN_ADD with gcc dnl -fstack-protector stuff passes gl_WARN_ADD with gcc

View File

@ -37,6 +37,8 @@ INCLUDES = -I../gnulib/lib \
-Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
$(GETTEXT_CPPFLAGS) $(GETTEXT_CPPFLAGS)
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
AM_CFLAGS = $(LIBXML_CFLAGS) \ AM_CFLAGS = $(LIBXML_CFLAGS) \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
$(LOCK_CHECKING_CFLAGS) \ $(LOCK_CHECKING_CFLAGS) \

View File

@ -33,6 +33,8 @@ INCLUDES = \
-I$(top_srcdir)/src/conf \ -I$(top_srcdir)/src/conf \
$(GETTEXT_CPPFLAGS) $(GETTEXT_CPPFLAGS)
WARN_CFLAGS += $(RELAXED_FRAME_LIMIT_CFLAGS)
AM_CFLAGS = \ AM_CFLAGS = \
-Dabs_builddir="\"$(abs_builddir)\"" \ -Dabs_builddir="\"$(abs_builddir)\"" \
-Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \

View File

@ -23,6 +23,8 @@ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
$(GETTEXT_CPPFLAGS) $(GETTEXT_CPPFLAGS)
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
AM_LDFLAGS = \ AM_LDFLAGS = \
$(RELRO_LDFLAGS) \ $(RELRO_LDFLAGS) \
$(NO_INDIRECT_LDFLAGS) \ $(NO_INDIRECT_LDFLAGS) \