aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-03 07:33:45 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-03 07:33:45 -0400
commit7a74d5a87ed04a15b6f19d73b145c9f58931e3f8 (patch)
treeaa84cfd5d1fae7ccf1969bef6564e90d096004c3
parenteab0d9242dd83c7525d0e7f9946fd0e71a01a342 (diff)
parentbe8e56c231755069fae03eb13a4ddd9fba4f6563 (diff)
downloadtor-7a74d5a87ed04a15b6f19d73b145c9f58931e3f8.tar.gz
tor-7a74d5a87ed04a15b6f19d73b145c9f58931e3f8.zip
Merge branch 'maint-0.3.4' into release-0.3.4
-rw-r--r--changes/bug20424_029_minimal4
-rw-r--r--configure.ac4
2 files changed, 8 insertions, 0 deletions
diff --git a/changes/bug20424_029_minimal b/changes/bug20424_029_minimal
new file mode 100644
index 0000000000..eb7886233e
--- /dev/null
+++ b/changes/bug20424_029_minimal
@@ -0,0 +1,4 @@
+ o Minor bugfixes (compilation):
+ - When compiling with --enable-openbsd-malloc or --enable-tcmalloc, tell
+ the compiler not to include the system malloc implementation. Fixes bug
+ 20424; bugfix on 0.2.0.20-rc.
diff --git a/configure.ac b/configure.ac
index c6953a0e31..61ea2e84de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1850,6 +1850,10 @@ fi
if test "$using_custom_malloc" = "no"; then
AC_CHECK_FUNCS(mallinfo)
fi
+if test "$using_custom_malloc" = "yes"; then
+ # Tell the C compiler not to use the system allocator functions.
+ TOR_CHECK_CFLAGS([-fno-builtin-malloc -fno-builtin-realloc -fno-builtin-calloc -fno-builtin-free])
+fi
# By default, we're going to assume we don't have mlockall()
# bionic and other platforms have various broken mlockall subsystems.