diff mbox series

[RFC,1/3] bitfield: build kunit tests without structleak plugin

Message ID 20210125124533.101339-2-arnd@kernel.org
State New
Headers show
Series kunit vs structleak | expand

Commit Message

Arnd Bergmann Jan. 25, 2021, 12:45 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>


The structleak plugin causes the stack frame size to grow immensely:

lib/bitfield_kunit.c: In function 'test_bitfields_constants':
lib/bitfield_kunit.c:93:1: error: the frame size of 7440 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

Turn it off in this file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 lib/Makefile | 1 +
 1 file changed, 1 insertion(+)

-- 
2.29.2
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index b5307d3eec1a..6a7300f0f02f 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -348,6 +348,7 @@  obj-$(CONFIG_PLDMFW) += pldmfw/
 
 # KUnit tests
 obj-$(CONFIG_BITFIELD_KUNIT) += bitfield_kunit.o
+CFLAGS_REMOVE_bitfield_kunit.o += -fplugin-arg-structleak_plugin-byref -fplugin-arg-structleak_plugin-byref-all
 obj-$(CONFIG_LIST_KUNIT_TEST) += list-test.o
 obj-$(CONFIG_LINEAR_RANGES_TEST) += test_linear_ranges.o
 obj-$(CONFIG_BITS_TEST) += test_bits.o