Android build fix proposal.

These are detected at configure time while they are glibc
specifics. the bionic equivalent is not api compatible
and dlopen is restricted in this platform.
This commit is contained in:
David Carlier 2020-04-23 20:23:04 +01:00 committed by David Goldblatt
parent d2d941017b
commit 27ef02ca9a

View File

@ -661,10 +661,11 @@ case "${host}" in
*-*-bitrig*)
abi="elf"
;;
*-*-linux-android)
*-*-linux-android*)
dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)
abi="elf"
glibc="0"
AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS], [ ])
AC_DEFINE([JEMALLOC_HAS_ALLOCA_H])
AC_DEFINE([JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY], [ ])
@ -679,6 +680,7 @@ case "${host}" in
dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)
abi="elf"
glibc="1"
AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS], [ ])
AC_DEFINE([JEMALLOC_HAS_ALLOCA_H])
AC_DEFINE([JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY], [ ])
@ -2258,6 +2260,7 @@ fi
dnl ============================================================================
dnl Check for glibc malloc hooks
if test "x$glibc" = "x1" ; then
JE_COMPILABLE([glibc malloc hook], [
#include <stddef.h>
@ -2291,6 +2294,7 @@ if test "x${je_cv_glibc_memalign_hook}" = "xyes" ; then
wrap_syms="${wrap_syms} __memalign_hook"
fi
fi
fi
JE_COMPILABLE([pthreads adaptive mutexes], [
#include <pthread.h>