From 76be4158d61cb60f821bed1c9cf0182b28366341 Mon Sep 17 00:00:00 2001 From: Patryk Kaminski Date: Tue, 27 Sep 2022 10:12:27 +0200 Subject: [PATCH] Fix make test failing when repo built from tarball Compilation flag -D_FORTIFY_SOURCE causes TieredMemDB tarballs to be generated with faults. Tests `make test` fail because of redis-benchmark not being generated. This change fixes that issue. --- src/Makefile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Makefile b/src/Makefile index 05956ad0855..4dda373a117 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,14 +30,7 @@ WARN=-Wall -W -Wno-missing-field-initializers -Wformat -Wformat-security OPT=$(OPTIMIZATION) SECURITY_PIC=-fPIE -fPIC SECURITY_NO_EXEC=-Wl,-z,relro,-z,now,-z,noexecstack -SECURITY_FORTIFY_SOURCE="" -ifneq ($(OPTIMIZATION),-O0) - # the -D_FORTIFY_SOURCE flag only works with optimization enabled - SECURITY_FORTIFY_SOURCE="-D_FORTIFY_SOURCE=2" -else - $(warning Optimization is required to set _FORTIFY_SOURCE) -endif -SECURITY_FLAGS=$(SECURITY_PIC) $(SECURITY_NO_EXEC) $(SECURITY_FORTIFY_SOURCE) +SECURITY_FLAGS=$(SECURITY_PIC) $(SECURITY_NO_EXEC) PREFIX?=/usr/local INSTALL_BIN=$(PREFIX)/bin