[LTP] [PATCH 1/2] hugemmap15: Compile with -O

Petr Vorel
2023-01-25T22:27:21Z

-O0 originally used causes warning on gcc 12:

In file included from /usr/include/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from hugemmap15.c:22:
/usr/include/features.h:412:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
412 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Fixes: 15625f6185 ("Hugetlb: Migrating libhugetlbfs icache-hygiene")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
testcases/kernel/mem/hugetlb/hugemmap/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/hugetlb/hugemmap/Makefile b/testcases/kernel/mem/hugetlb/hugemmap/Makefile
index 6f10807cde..503a35f7f1 100644
--- a/testcases/kernel/mem/hugetlb/hugemmap/Makefile
+++ b/testcases/kernel/mem/hugetlb/hugemmap/Makefile
@@ -8,5 +8,5 @@ include $(top_srcdir)/include/mk/testcases.mk
include $(abs_srcdir)/../Makefile.inc
include $(top_srcdir)/include/mk/generic_leaf_target.mk

-hugemmap15: CFLAGS+=-O0
+hugemmap15: CFLAGS+=-O
hugemmap06: CFLAGS+=-pthread
--
2.39.1