From 0f31abe38aa8e86c16ac981002d2933dd3a410c2 Mon Sep 17 00:00:00 2001 From: Leonid Vasiliev Date: Tue, 2 Jun 2020 09:45:38 +0300 Subject: [PATCH 1/2] small: bump new version The main reason of update: When the memcached module is linked with tarantool, it uses some of the "small" functions from tarantool (which were exported by tarantool, for example: mempool_create_with_order()) and some from the "small" with wich it was built (for example: mempool_create(), mempool_free()). This can lead to undefined behavior (segfault for example). To avoid the problem, will use the same (close) version of the "small" as tarantool. Part of #59 --- third_party/small | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/small b/third_party/small index 700e9e4..3df5050 160000 --- a/third_party/small +++ b/third_party/small @@ -1 +1 @@ -Subproject commit 700e9e44fc0c83bad78c828a13d42f48a4424815 +Subproject commit 3df5050171d040bfe5717b4bddf57da3b312ffe4 From 6852c5ad6b8d5a0873f4c11dffc31f8d78c84bf8 Mon Sep 17 00:00:00 2001 From: Leonid Vasiliev Date: Tue, 2 Jun 2020 12:12:30 +0300 Subject: [PATCH 2/2] small: fix small compilation If SMALL_EMBEDDED is used, "small" will try to compile with the default flags, but it can't be compiled with std=c89. Look like a "small" library bug. So, we will use std=c99 globally as workaround. See https://github.com/tarantool/small/issues/25 Part of #59 @Totktonada: added the comment. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69fc55f..12fb5bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,13 @@ find_package(CyrusSASL) # include(cmake/FindTarantool.cmake) include_directories(${TARANTOOL_INCLUDE_DIRS}) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +# We should add -std=c99 before small library inclusion, because +# the library does not enforce a C dialect, but unable to be built +# with -std=gnu90 (which is default on GCC 4.8, which is shipped +# with Ubuntu Trusty). +# +# See https://github.com/tarantool/small/issues/25 +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -std=c99") find_program(GIT git) if (EXISTS "${CMAKE_SOURCE_DIR}/.git" AND GIT)