Added the actual patch that uses jemalloc
This commit is contained in:
parent
8111f2cd7e
commit
f2df5c3e47
73
varnish.jemalloc_as_system_library.patch
Normal file
73
varnish.jemalloc_as_system_library.patch
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
Index: configure.ac
|
||||||
|
===================================================================
|
||||||
|
--- configure.ac (revision 5691)
|
||||||
|
+++ configure.ac (working copy)
|
||||||
|
@@ -39,6 +39,13 @@
|
||||||
|
# Checks for libraries.
|
||||||
|
save_LIBS="${LIBS}"
|
||||||
|
LIBS=""
|
||||||
|
+AC_CHECK_LIB(jemalloc, malloc)
|
||||||
|
+RT_LIBS="${LIBS}"
|
||||||
|
+LIBS="${save_LIBS}"
|
||||||
|
+AC_SUBST(RT_LIBS)
|
||||||
|
+
|
||||||
|
+save_LIBS="${LIBS}"
|
||||||
|
+LIBS=""
|
||||||
|
AC_CHECK_LIB(rt, clock_gettime)
|
||||||
|
RT_LIBS="${LIBS}"
|
||||||
|
LIBS="${save_LIBS}"
|
||||||
|
@@ -423,25 +430,21 @@
|
||||||
|
AC_DEFINE_UNQUOTED([VCC_CC],"$VCC_CC",[C compiler command line for VCL code])
|
||||||
|
|
||||||
|
# Use jemalloc on Linux
|
||||||
|
-JEMALLOC_SUBDIR=
|
||||||
|
JEMALLOC_LDADD=
|
||||||
|
AC_ARG_ENABLE(jemalloc,
|
||||||
|
AS_HELP_STRING([--disable-jemalloc],[do not use jemalloc (default is yes on Linux, no everywhere else)]),
|
||||||
|
[if test "x$enableval" = "xyes"; then
|
||||||
|
- JEMALLOC_SUBDIR=libjemalloc
|
||||||
|
- JEMALLOC_LDADD='$(top_builddir)/lib/libjemalloc/libjemalloc_mt.la'
|
||||||
|
+ JEMALLOC_LDADD='-ljemalloc'
|
||||||
|
fi],
|
||||||
|
[case $target in #(
|
||||||
|
*-*-linux*)
|
||||||
|
- JEMALLOC_SUBDIR=libjemalloc
|
||||||
|
- JEMALLOC_LDADD='$(top_builddir)/lib/libjemalloc/libjemalloc_mt.la'
|
||||||
|
+ JEMALLOC_LDADD='-ljemalloc'
|
||||||
|
;; #(
|
||||||
|
*)
|
||||||
|
true
|
||||||
|
;;
|
||||||
|
esac])
|
||||||
|
|
||||||
|
-AC_SUBST(JEMALLOC_SUBDIR)
|
||||||
|
AC_SUBST(JEMALLOC_LDADD)
|
||||||
|
|
||||||
|
# Generate output
|
||||||
|
@@ -467,7 +470,6 @@
|
||||||
|
lib/libvarnishapi/Makefile
|
||||||
|
lib/libvarnishcompat/Makefile
|
||||||
|
lib/libvcl/Makefile
|
||||||
|
- lib/libjemalloc/Makefile
|
||||||
|
man/Makefile
|
||||||
|
redhat/Makefile
|
||||||
|
varnishapi.pc
|
||||||
|
Index: lib/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- lib/Makefile.am (revision 5691)
|
||||||
|
+++ lib/Makefile.am (working copy)
|
||||||
|
@@ -4,12 +4,10 @@
|
||||||
|
libvarnishcompat \
|
||||||
|
libvarnish \
|
||||||
|
libvarnishapi \
|
||||||
|
- libvcl \
|
||||||
|
- @JEMALLOC_SUBDIR@
|
||||||
|
+ libvcl
|
||||||
|
|
||||||
|
DIST_SUBDIRS = \
|
||||||
|
libvarnishcompat \
|
||||||
|
libvarnish \
|
||||||
|
libvarnishapi \
|
||||||
|
- libvcl \
|
||||||
|
- libjemalloc
|
||||||
|
+ libvcl
|
Loading…
Reference in New Issue
Block a user