From: "Jun.Miao" <jun.m...@intel.com> Add a CFLAGS "-Wo-stringop-overflow" to void build error in the fedora:36 by the gcc -O2 optimization, which`s version: gcc (GCC) 12.0.1 20220118 (Red Hat 12.0.1-0).
build error log: common/memlog.c: In function ‘memlog_init’: common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 53 | g_log->uuid = (uuid_t)TBOOT_LOG_UUID; common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] common/memlog.c:53:20: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] common/memlog.c:68:26: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 68 | g_log->zip_count = 0; | ~~~~~~~~~~~~~~~~~^~~ Signed-off-by: Jun.Miao <jun.m...@intel.com> --- Config.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Config.mk b/Config.mk index ed0aef0..b9342bc 100644 --- a/Config.mk +++ b/Config.mk @@ -20,6 +20,7 @@ include $(ROOTDIR)/Config.mk CFLAGS := $(shell echo $(CFLAGS) | sed -e s/-m64/-m32/) CFLAGS += -march=i686 CFLAGS += -nostdinc +CFLAGS += -Wno-stringop-overflow CFLAGS += -fno-builtin -fno-common -fno-strict-aliasing CFLAGS += -fomit-frame-pointer CFLAGS += -pipe -- 2.35.0.rc2 _______________________________________________ tboot-devel mailing list tboot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tboot-devel