From 34b626d120803c353550c5d1ab070581afdfa6bc Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Mon, 11 Dec 2017 17:09:32 -0800 Subject: [PATCH] Revert adding hardening options to compile. This appears to have caused performance regressions, which will need to be investigated. This reverts commit 0b0284ba21989a0b8377f0a4d1057e3e7cd5fae1. This reverts commit 4bde728b0eb8d277c8f59bfaf24869da67c68c47. --- Makefile | 8 +------- build/link-wrapper.sh | 4 +--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 6d5bedfebd..f90e325995 100644 --- a/Makefile +++ b/Makefile @@ -35,13 +35,6 @@ ifeq ($(PLATFORM),Linux) CXX ?= g++ CXXFLAGS += -std=c++0x - HARDENING_CFLAGS := -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fPIC - CFLAGS += ${HARDENING_CFLAGS} -# TODO(alexmiller): boost 1.52.0 prevents us from using most of these with -Werror. -# Reassess after boost has been upgraded to >1.52.0. -# CFLAGS += -Wall -Wextra -Wformat-security -Wconversion -Wsign-conversion -Werror - HARDENING_LDFLAGS := -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now - LDFLAGS := ${HARDENING_CFLAGS} ${HARDENING_LDFLAGS} BOOSTDIR ?= /opt/boost_1_52_0 DLEXT := so @@ -91,6 +84,7 @@ CFLAGS += -g # valgrind-compatibile builds are enabled by uncommenting lines in valgind.mk CXXFLAGS += -Wno-deprecated +LDFLAGS := LIBS := STATIC_LIBS := diff --git a/build/link-wrapper.sh b/build/link-wrapper.sh index 6f900c0882..c34aac9967 100755 --- a/build/link-wrapper.sh +++ b/build/link-wrapper.sh @@ -15,9 +15,7 @@ case $1 in OPTIONS="$OPTIONS -Wl,-dylib_install_name -Wl,$( basename $3 )" fi else - if [ "$PLATFORM" = "linux" ]; then - OPTIONS="$OPTIONS -pie -fPIE" - fi + OPTIONS= fi OPTIONS=$( eval echo "$OPTIONS $LDFLAGS \$$2_LDFLAGS \$$2_OBJECTS \$$2_LIBS \$$2_STATIC_LIBS_REAL -o $3" )