build: add the missing leading underscore to FORTIFY_SOURCE

Type: fix

Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: I36f2d08681f90a3f8ea7598952d1e14c53f0187b
This commit is contained in:
Neale Ranns
2021-01-20 09:03:30 +00:00
committed by Damjan Marion
parent df849f8ea8
commit 2a81d9a4cc
5 changed files with 19 additions and 19 deletions
build-data/platforms
build-root
docs/gettingstarted/developers/buildsystem
src

@ -34,12 +34,12 @@ arm32_dpdk_make_extra_args = "CPU_CFLAGS='-mfloat-abi=hard' \
CONFIG_RTE_MAX_NUMA_NODES=1"
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
arm32_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
arm32_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector-all -fPIC -Werror
arm32_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
arm32_TAG_CFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror
arm32_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
arm32_TAG_LDFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -DVLIB_MAX_CPUS=4 -march=armv7-a \
-fstack-protector -fPIC -Werror

@ -72,9 +72,9 @@ vpp_configure_args_dpaa += $(VPP_CFG_ARGS)
endif
dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -DFORTIFY_SOURCE=2 -mtls-dialect=trad \
dpaa_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -mtls-dialect=trad \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -I$(OPENSSL_PATH)/include
dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -DFORTIFY_SOURCE=2 \
dpaa_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fstack-protector-all -D_FORTIFY_SOURCE=2 \
-march=$(MARCH) -Werror -DCLIB_LOG2_CACHE_LINE_BYTES=6 -L$(OPENSSL_PATH)/lib

@ -243,11 +243,11 @@ TAG_PREFIX = $(if $(TAG),$(TAG)-)
tag_var_with_added_space_fn = $(if $($(TAG)_TAG_$(1)),$($(TAG)_TAG_$(1)) )
# TAG=debug for debugging
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -march=$(MARCH) \
-fstack-protector-all -fPIC
BUILD_PREFIX_package = build-$(TAG_PREFIX)

@ -179,19 +179,19 @@ 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 -DFORTIFY_SOURCE=2 \
vpp_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
vpp_debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 \
vpp_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 \
-fstack-protector-all -fPIC -Werror
vpp_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_CXXFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -pie -Wl,-z,now
vpp_TAG_CFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_CXXFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_TAG_LDFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror -pie -Wl,-z,now
vpp_clang_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_CFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_clang_TAG_LDFLAGS = -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -fPIC -Werror
vpp_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -Werror -fprofile-arcs -ftest-coverage
vpp_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -fPIC -Werror -coverage

@ -70,7 +70,7 @@ list(APPEND BUILD_TYPES "release")
string(CONCAT CMAKE_C_FLAGS_RELEASE
"-O2 "
"-fstack-protector "
"-DFORTIFY_SOURCE=2 "
"-D_FORTIFY_SOURCE=2 "
"-fno-common "
)
@ -82,7 +82,7 @@ string(CONCAT CMAKE_C_FLAGS_DEBUG
"-O0 "
"-DCLIB_DEBUG "
"-fstack-protector "
"-DFORTIFY_SOURCE=2 "
"-D_FORTIFY_SOURCE=2 "
"-fno-common "
)