From c170afc43886cb9dbd6387af3ed28da6d37a76dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Fri, 26 Mar 2021 16:13:15 +0100 Subject: [PATCH] Revert "Revert "Build libmariaclient with debug"" --- deps/Makefile | 4 +++- deps/mariadb-client-library/CMakeLists.txt.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 deps/mariadb-client-library/CMakeLists.txt.patch diff --git a/deps/Makefile b/deps/Makefile index 6d1ad5a7de..e149c009b6 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -166,7 +166,9 @@ mariadb-client-library/mariadb_client/libmariadb/libmariadbclient.a: libssl/open cd mariadb-client-library && rm -rf mariadb-connector-c-3.1.4-src cd mariadb-client-library && tar -zxf mariadb-connector-c-3.1.4-src.tar.gz cd mariadb-client-library/mariadb_client && patch ./plugins/auth/CMakeLists.txt < ../plugin_auth_CMakeLists.txt.patch - cd mariadb-client-library/mariadb_client && cmake . -DOPENSSL_ROOT_DIR=$(shell pwd)/libssl/openssl/ -DOPENSSL_LIBRARIES=$(shell pwd)/libssl/openssl/ . + cd mariadb-client-library/mariadb_client && patch ./CMakeLists.txt < ../CMakeLists.txt.patch +# cd mariadb-client-library/mariadb_client && cmake . -DOPENSSL_ROOT_DIR=$(shell pwd)/libssl/openssl/ -DOPENSSL_LIBRARIES=$(shell pwd)/libssl/openssl/ . + cd mariadb-client-library/mariadb_client && cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENSSL_ROOT_DIR=$(shell pwd)/libssl/openssl/ -DOPENSSL_LIBRARIES=$(shell pwd)/libssl/openssl/ . # cd mariadb-client-library/mariadb_client && cmake . -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl # this is needed on MacOSX cd mariadb-client-library/mariadb_client && patch libmariadb/mariadb_stmt.c < ../mariadb_stmt.c.patch cd mariadb-client-library/mariadb_client && patch libmariadb/mariadb_lib.c < ../mariadb_lib.c.patch diff --git a/deps/mariadb-client-library/CMakeLists.txt.patch b/deps/mariadb-client-library/CMakeLists.txt.patch new file mode 100644 index 0000000000..36c27528b9 --- /dev/null +++ b/deps/mariadb-client-library/CMakeLists.txt.patch @@ -0,0 +1,13 @@ +--- CMakeLists.txt 2020-02-27 15:01:10.993225716 +0100 ++++ ../CMakeLists.txt 2020-02-27 15:00:57.705257256 +0100 +@@ -132,8 +132,8 @@ + # Disable dbug information for release builds + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF") + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDBUG_OFF") +-SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") +-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") ++SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF -ggdb -O0") ++SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF -ggdb -O0") + + IF(CMAKE_COMPILER_IS_GNUCC) + INCLUDE(CheckCCompilerFlag)