From b78607b1db72173bffabc950253a3894c032cb5c Mon Sep 17 00:00:00 2001 From: Mohammed Hawari Date: Fri, 22 Jan 2021 14:30:56 +0100 Subject: 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 --- build-root/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build-root/Makefile') diff --git a/build-root/Makefile b/build-root/Makefile index 6d1fb327dac..d35b7a10aeb 100644 --- a/build-root/Makefile +++ b/build-root/Makefile @@ -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 -D_FORTIFY_SOURCE=2 -march=$(MARCH) \ +debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \ -fstack-protector-all -fPIC -debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -march=$(MARCH) \ +debug_TAG_CXXFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \ -fstack-protector-all -fPIC -debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -D_FORTIFY_SOURCE=2 -march=$(MARCH) \ +debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \ -fstack-protector-all -fPIC BUILD_PREFIX_package = build-$(TAG_PREFIX) -- cgit 1.2.3-korg