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.
This commit is contained in:
Alex Miller 2017-12-11 17:09:32 -08:00
parent 4495a19299
commit 34b626d120
2 changed files with 2 additions and 10 deletions

View File

@ -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 :=

View File

@ -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" )