Commit e41bca00 authored by Sergei Golubchik's avatar Sergei Golubchik

support statically linked jemalloc. use that for release builds

parent 33656e04
...@@ -123,7 +123,7 @@ IF(UNIX) ...@@ -123,7 +123,7 @@ IF(UNIX)
SET(WITH_EXTRA_CHARSETS all CACHE STRING "") SET(WITH_EXTRA_CHARSETS all CACHE STRING "")
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
SET(WITH_JEMALLOC "yes" CACHE STRING "") SET(WITH_JEMALLOC "static" CACHE STRING "")
IF(NOT IGNORE_AIO_CHECK) IF(NOT IGNORE_AIO_CHECK)
# Ensure aio is available on Linux (required by InnoDB) # Ensure aio is available on Linux (required by InnoDB)
......
...@@ -12,12 +12,23 @@ MACRO (CHECK_JEMALLOC) ...@@ -12,12 +12,23 @@ MACRO (CHECK_JEMALLOC)
SET(WITH_JEMALLOC "yes") SET(WITH_JEMALLOC "yes")
ENDIF() ENDIF()
IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto") IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto" OR
CHECK_LIBRARY_EXISTS(jemalloc malloc_stats_print "" HAVE_JEMALLOC) WITH_JEMALLOC STREQUAL "static")
IF(WITH_JEMALLOC STREQUAL "static")
SET(libname jemalloc_pic)
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m)
ELSE()
SET(libname jemalloc)
ENDIF()
CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_JEMALLOC)
SET(CMAKE_REQUIRED_LIBRARIES)
IF (HAVE_JEMALLOC) IF (HAVE_JEMALLOC)
SET(LIBJEMALLOC jemalloc) SET(LIBJEMALLOC ${libname})
ELSEIF (WITH_JEMALLOC STREQUAL "yes") ELSEIF (NOT WITH_JEMALLOC STREQUAL "auto")
MESSAGE(FATAL_ERROR "jemalloc is not found") MESSAGE(FATAL_ERROR "${libname} is not found")
ENDIF() ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
...@@ -146,7 +146,7 @@ Description: MariaDB database client binaries ...@@ -146,7 +146,7 @@ Description: MariaDB database client binaries
Package: mariadb-server-core-5.5 Package: mariadb-server-core-5.5
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}), libjemalloc1 (>= 3.0.0) Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version})
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5 Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5
Conflicts: mariadb-server-5.1 (<< 5.1.60), Conflicts: mariadb-server-5.1 (<< 5.1.60),
mariadb-server-5.2 (<< 5.2.10), mariadb-server-5.2 (<< 5.2.10),
...@@ -191,7 +191,7 @@ Architecture: any ...@@ -191,7 +191,7 @@ Architecture: any
Suggests: tinyca, mailx, mariadb-test Suggests: tinyca, mailx, mariadb-test
Recommends: libhtml-template-perl Recommends: libhtml-template-perl
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}), libjemalloc1 (>= 3.0.0) Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version})
Provides: mariadb-server, mysql-server, virtual-mysql-server Provides: mariadb-server, mysql-server, virtual-mysql-server
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
......
...@@ -146,7 +146,7 @@ Description: MariaDB database client binaries ...@@ -146,7 +146,7 @@ Description: MariaDB database client binaries
Package: mariadb-server-core-5.5 Package: mariadb-server-core-5.5
Architecture: any Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version}), libjemalloc1 (>= 3.0.0) Depends: ${shlibs:Depends}, ${misc:Depends}, libmariadbclient18 (>= ${binary:Version})
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5 Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5
Conflicts: mysql-server-5.0, Conflicts: mysql-server-5.0,
mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5, mysql-server-core-5.0, mysql-server-core-5.1, mysql-server-core-5.5,
...@@ -185,7 +185,7 @@ Architecture: any ...@@ -185,7 +185,7 @@ Architecture: any
Suggests: tinyca, mailx, mariadb-test Suggests: tinyca, mailx, mariadb-test
Recommends: libhtml-template-perl Recommends: libhtml-template-perl
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version}), libjemalloc1 (>= 3.0.0) Depends: mariadb-client-5.5 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-5.5 (>= ${binary:Version})
Provides: mariadb-server, mysql-server, virtual-mysql-server Provides: mariadb-server, mysql-server, virtual-mysql-server
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}), Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5, mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment