summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-13 14:53:20 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-13 14:53:20 -0400
commitfae7f96e7bac60b6e6f23bfcef239a3686093cb8 (patch)
tree31d0c3b984a96bc6db5cc69e8f71669445ca1949 /configure.ac
parenteaf7d16826a7d019ffc9990dcd88add48c195328 (diff)
downloadtor-fae7f96e7bac60b6e6f23bfcef239a3686093cb8.tar.gz
tor-fae7f96e7bac60b6e6f23bfcef239a3686093cb8.zip
Explain PIE/PIC rationale for 23846.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index bd300ba1b1..f0673cf4c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1164,8 +1164,12 @@ m4_ifdef([AS_VAR_IF],[
TOR_CHECK_CFLAGS(--param ssp-buffer-size=1)
if test "$bwin32" = "false" && test "$enable_libfuzzer" != "yes" && test "$enable_oss_fuzz" != "yes"; then
if test "$enable_pic" != "yes"; then
+ # If we have already enabled -fPIC, then we don't also need to
+ # compile with -fPIE...
TOR_CHECK_CFLAGS(-fPIE)
fi
+ # ... but we want to link our executables with -pie in any case, since
+ # they're executables, not a library.
TOR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
fi
TOR_TRY_COMPILE_WITH_CFLAGS(-fwrapv, also_link, CFLAGS_FWRAPV="-fwrapv", true)