Disable _FORTIFY_SOURCE when building with -O0

_FORTIFY_SOURCE requires at least -O2 optimization level.
This may result in compilation warnings. Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
Andrei Otcheretianski 2023-12-25 12:21:04 +02:00 committed by Jouni Malinen
parent 1e08a8990d
commit 9569315dea
4 changed files with 4 additions and 4 deletions

View file

@ -167,7 +167,7 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.o
ifdef CONFIG_CODE_COVERAGE ifdef CONFIG_CODE_COVERAGE
CFLAGS += -O0 -fprofile-arcs -ftest-coverage CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
LIBS += -lgcov LIBS += -lgcov
LIBS_c += -lgcov LIBS_c += -lgcov
LIBS_h += -lgcov LIBS_h += -lgcov

View file

@ -77,7 +77,7 @@ CONFIG_SUITEB=y
CONFIG_MBO=y CONFIG_MBO=y
CONFIG_CODE_COVERAGE=y CONFIG_CODE_COVERAGE=y
CFLAGS += -O0 -Wsign-compare CFLAGS += -O0 -Wsign-compare -U_FORTIFY_SOURCE
CONFIG_TAXONOMY=y CONFIG_TAXONOMY=y
#CONFIG_FILS=y #CONFIG_FILS=y

View file

@ -117,7 +117,7 @@ CONFIG_SUITEB=y
CONFIG_MBO=y CONFIG_MBO=y
#CONFIG_CODE_COVERAGE=y #CONFIG_CODE_COVERAGE=y
CFLAGS += -O0 -Wsign-compare CFLAGS += -O0 -Wsign-compare -U_FORTIFY_SOURCE
#CONFIG_FILS=y #CONFIG_FILS=y
#CONFIG_FILS_SK_PFS=y #CONFIG_FILS_SK_PFS=y
CONFIG_PMKSA_CACHE_EXTERNAL=y CONFIG_PMKSA_CACHE_EXTERNAL=y

View file

@ -188,7 +188,7 @@ CFLAGS += -Werror -DEAPOL_TEST
endif endif
ifdef CONFIG_CODE_COVERAGE ifdef CONFIG_CODE_COVERAGE
CFLAGS += -O0 -fprofile-arcs -ftest-coverage CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
LIBS += -lgcov LIBS += -lgcov
LIBS_c += -lgcov LIBS_c += -lgcov
LIBS_p += -lgcov LIBS_p += -lgcov