aboutsummaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-04-12 18:59:40 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-12 11:21:28 -0400
commitce854a8d22d5056cc1a47a0d4d4251f93a0c667c (patch)
tree52579eb2bff509a54933805655a70f4091e7b4c0 /Makefile.am
parentbd34edc18d6e21f5ba7bddf5a7ebe6582e8dc639 (diff)
downloadtor-ce854a8d22d5056cc1a47a0d4d4251f93a0c667c.tar.gz
tor-ce854a8d22d5056cc1a47a0d4d4251f93a0c667c.zip
Add -ftrapv to gcc-hardening ... mostly!
We know there are overflows in curve25519-donna-c32, so we'll have to have that one be fwrapv. Only apply the asan, ubsan, and trapv options to the code that does not need to run in constant time. Those options introduce branches to the code they instrument. (These introduced branches should never actually be taken, so it might _still_ be constant time after all, but branch predictors are complicated enough that I'm not really confident here. Let's aim for safety.) Closes 17983.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 92ba2b868d..e9abfc6b99 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,8 +15,8 @@ noinst_PROGRAMS=
DISTCLEANFILES=
bin_SCRIPTS=
AM_CPPFLAGS=
-AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@
-SHELL = @SHELL@
+AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@
+SHELL=@SHELL@
if COVERAGE_ENABLED
TESTING_TOR_BINARY="$(top_builddir)/src/or/tor-cov"