build: do not _FORTIFY_SOURCE in debug mode

When compiling in -O0, the glibc feature.h ignores _FORTIFY_SOURCE and,
in some distributions, throws a #warning, which fails the build. This
patch removes -D_FORTIFY_SOURCE in all debug configurations.

Change-Id: Ic30229c038353e49ff9419779e082a7083c1ea5f
Type: fix
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
This commit is contained in:
Mohammed Hawari
2021-01-22 14:30:56 +01:00
committed by Neale Ranns
parent 27df797978
commit b78607b1db
5 changed files with 10 additions and 11 deletions

View File

@ -179,11 +179,11 @@ Here are the contents of .../build-data/platforms/vpp.mk:
vpp_configure_args_vpp += --disable-lb-plugin
endif
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror