summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Schmidt <marv@exherbo.org>2022-09-27 07:03:14 +0200
committerQi Wang <interwq@gmail.com>2023-03-16 12:11:40 -0700
commitaba1645f2d65a3b5c46958d7642b46ab3c142cf3 (patch)
tree937eeade63acdffd791dc3b42844eb043475c567
parentd503d72129eddb2175d5d5119c9b70d507112947 (diff)
downloadjemalloc-aba1645f2d65a3b5c46958d7642b46ab3c142cf3.tar.gz
configure: Handle *-linux-musl* hosts properly
This is the same as the `*-*-linux*` case with the two exceptions that we don't set glibc=1 and don't define JEMALLOC_USE_CXX_THROW
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2bbf7d54..f38b72d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -723,6 +723,19 @@ case "${host}" in
fi
zero_realloc_default_free="1"
;;
+ *-*-linux-musl*)
+ dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
+ JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)
+ abi="elf"
+ AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS], [ ], [ ])
+ AC_DEFINE([JEMALLOC_HAS_ALLOCA_H], [ ], [ ])
+ AC_DEFINE([JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY], [ ], [ ])
+ AC_DEFINE([JEMALLOC_THREADED_INIT], [ ], [ ])
+ if test "${LG_SIZEOF_PTR}" = "3"; then
+ default_retain="1"
+ fi
+ zero_realloc_default_free="1"
+ ;;
*-*-linux*)
dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)