forked from qbit/rust-cross-openbsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-jemalloc
52 lines (49 loc) · 1.25 KB
/
patch-jemalloc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
diff --git a/configure b/configure
index b584c44..e55815a 100755
--- a/configure
+++ b/configure
@@ -4876,16 +4876,21 @@ case "${host}" in
force_lazy_lock="1"
;;
*-*-dragonfly*)
CFLAGS="$CFLAGS"
abi="elf"
$as_echo "#define JEMALLOC_PURGE_MADVISE_FREE " >>confdefs.h
;;
+ *-*-openbsd*)
+ CFLAGS="$CFLAGS"
+ abi="elf"
+ $as_echo "#define JEMALLOC_PURGE_MADVISE_FREE " >>confdefs.h
+ ;;
*-*-linux*)
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
diff --git a/configure.ac b/configure.ac
index e4afe88..302f359 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,16 +283,21 @@ case "${host}" in
AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
force_lazy_lock="1"
;;
*-*-dragonfly*)
CFLAGS="$CFLAGS"
abi="elf"
AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
;;
+ *-*-openbsd*)
+ CFLAGS="$CFLAGS"
+ abi="elf"
+ AC_DEFINE([JEMALLOC_PURGE_MADVISE_FREE], [ ])
+ ;;
*-*-linux*)
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"