diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-25 20:50:14 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2011-11-25 20:50:14 +0100 |
commit | 6be24a771a27a077d58d21a4a1f8db3fbd14cac4 (patch) | |
tree | 5a538cb0ef4ecb753cf304c7716cbaca09526a61 /cmake | |
parent | 74da49894f44a46ba086120bade714a5cc29992a (diff) | |
download | mariadb-git-6be24a771a27a077d58d21a4a1f8db3fbd14cac4.tar.gz |
Avoid mysqld dependency on libaio.so by linking xtradb statically to libaio.
A variable XTRADB_PREFER_STATIC_LIBAIO should be set to 1 (or TRUE
or ON) for static linking.
Even if mysqld can avoid dependency on shared libaio, shared libraries
libmysqld.so or ha_innodb.so cannot link without it.
Given that the patch primarily addresses building tar.gz package, and
shared libraries mentioned above deemed less important than mysqld
executable, we accept shared lib dependency on libaio.so
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index ee6d6b85004..53157b4e2c0 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -115,9 +115,9 @@ IF(UNIX) OPTION(WITH_LIBEDIT "" ON) ENDIF() - OPTION(WITH_PIC "" ON) # Why? IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") + IF(NOT IGNORE_AIO_CHECK) # Ensure aio is available on Linux (required by InnoDB) CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) @@ -133,6 +133,14 @@ IF(UNIX) If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake. ") ENDIF() + + # Remove libaio dependency from mysqld + SET(XTRADB_PREFER_STATIC_LIBAIO 1) + + # Unfortunately, linking shared libmysqld with static aio + # does not work, unless we add also dynamic one. This also means + # libmysqld.so will depend on libaio.so + SET(LIBMYSQLD_SO_EXTRA_LIBS aio) ENDIF() # Enable fast mutexes on Linux |