about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-08-19 20:21:58 -0700
committerbors <bors@rust-lang.org>2013-08-19 20:21:58 -0700
commit5034792c88a33e4bc7597d9103faf1eaaec7f0ee (patch)
tree2a3010b2507ee9ae2af95ab7ac83851b8753be0b /src
parent2ec9b8ce2f08dd9b931bd084f83fd3a4d0c3e8c7 (diff)
parentef436637ea02591c41b4898708f63bdf6e3f993c (diff)
downloadrust-5034792c88a33e4bc7597d9103faf1eaaec7f0ee.tar.gz
rust-5034792c88a33e4bc7597d9103faf1eaaec7f0ee.zip
auto merge of #8584 : thestinger/rust/jemalloc, r=graydon
This reverts commit 371a316ec93a977f9dcd305b5f532cd394fa6885.

Closes #7217
Diffstat (limited to 'src')
-rwxr-xr-xsrc/rt/jemalloc/configure12
-rw-r--r--src/rt/jemalloc/configure.ac11
2 files changed, 22 insertions, 1 deletions
diff --git a/src/rt/jemalloc/configure b/src/rt/jemalloc/configure
index 428ac770a22..47af18916a6 100755
--- a/src/rt/jemalloc/configure
+++ b/src/rt/jemalloc/configure
@@ -4479,6 +4479,18 @@ case "${host}" in
 
 	force_lazy_lock="1"
 	;;
+  *-*-linux-android*)
+	CFLAGS="$CFLAGS"
+	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	abi="elf"
+	$as_echo "#define JEMALLOC_HAS_ALLOCA_H 1" >>confdefs.h
+
+	$as_echo "#define JEMALLOC_PURGE_MADVISE_DONTNEED  " >>confdefs.h
+
+	$as_echo "#define JEMALLOC_THREADED_INIT  " >>confdefs.h
+
+	default_munmap="0"
+	;;
   *-*-linux*)
 	CFLAGS="$CFLAGS"
 	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
diff --git a/src/rt/jemalloc/configure.ac b/src/rt/jemalloc/configure.ac
index 882d3b3f3b0..2a53c14fda1 100644
--- a/src/rt/jemalloc/configure.ac
+++ b/src/rt/jemalloc/configure.ac
@@ -226,7 +226,7 @@ PIC_CFLAGS='-fPIC -DPIC'
 CTARGET='-o $@'
 LDTARGET='-o $@'
 EXTRA_LDFLAGS=
-MKLIB='ar crus $@'
+MKLIB='$(AR) crus $@'
 CC_MM=1
 
 dnl Platform-specific settings.  abi and RPATH can probably be determined
@@ -257,6 +257,15 @@ case "${host}" in
 	AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
 	force_lazy_lock="1"
 	;;
+  *-*-linux-android*)
+	CFLAGS="$CFLAGS"
+	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+	abi="elf"
+	AC_DEFINE([JEMALLOC_HAS_ALLOCA_H])
+	AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED], [ ])
+	AC_DEFINE([JEMALLOC_THREADED_INIT], [ ])
+	default_munmap="0"
+	;;
   *-*-linux*)
 	CFLAGS="$CFLAGS"
 	CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"