mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-05 22:05:47 +00:00
build: warn on a large frame by default
My commit e73889b631
split the -Wframe-larger-than warning setting into
two different variables - STRICT_FRAME_LIMIT_CFLAGS
for the library code and RELAXED_FRAME_LIMIT_CFLAGS
which was needed for tests.
Use the strict limit by default and specify the warning
flag twice for the parts that require a larger stack
frame, relying on the fact that the compiler will pick
up the latter value.
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
67010e8749
commit
5657608b5e
@ -171,7 +171,7 @@ 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
|
||||||
gl_WARN_ADD([-Wframe-larger-than=4096], [STRICT_FRAME_LIMIT_CFLAGS])
|
wantwarn="$wantwarn -Wframe-larger-than=4096"
|
||||||
gl_WARN_ADD([-Wframe-larger-than=32768], [RELAXED_FRAME_LIMIT_CFLAGS])
|
gl_WARN_ADD([-Wframe-larger-than=32768], [RELAXED_FRAME_LIMIT_CFLAGS])
|
||||||
|
|
||||||
# Extra special flags
|
# Extra special flags
|
||||||
|
@ -31,8 +31,6 @@ AM_CPPFLAGS = -I../gnulib/lib \
|
|||||||
-Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
|
-Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
|
||||||
|
|
||||||
AM_CFLAGS = $(LIBXML_CFLAGS) \
|
AM_CFLAGS = $(LIBXML_CFLAGS) \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
|
@ -29,8 +29,6 @@ AM_CPPFLAGS = \
|
|||||||
# needed
|
# needed
|
||||||
STANDALONE_CPPFLAGS = -I$(top_srcdir)
|
STANDALONE_CPPFLAGS = -I$(top_srcdir)
|
||||||
|
|
||||||
WARN_CFLAGS += $(STRICT_FRAME_LIMIT_CFLAGS)
|
|
||||||
|
|
||||||
AM_CFLAGS = \
|
AM_CFLAGS = \
|
||||||
$(WARN_CFLAGS) \
|
$(WARN_CFLAGS) \
|
||||||
$(COVERAGE_CFLAGS) \
|
$(COVERAGE_CFLAGS) \
|
||||||
|
Loading…
Reference in New Issue
Block a user