From b3eef80bec4d4bc280115d911cc516c0e9d2b168 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Jul 16 2019 12:07:33 +0000 Subject: Added a debug switch --- diff --git a/mariadb-connector-c.spec b/mariadb-connector-c.spec index ba8cf81..815a124 100644 --- a/mariadb-connector-c.spec +++ b/mariadb-connector-c.spec @@ -1,3 +1,6 @@ +# For deep debugging we need to build binaries with extra debug info +%bcond_with debug + Name: mariadb-connector-c Version: 3.1.2 Release: 1%{?dist} @@ -60,6 +63,10 @@ rm -r win zlib win-iconv examples %build +# Override all optimization flags when making a debug build +%{?with_debug: CFLAGS="$CFLAGS -O0 -g"} +CXXFLAGS="$CFLAGS" +export CFLAGS CXXFLAGS # https://jira.mariadb.org/browse/MDEV-13836: # The server has (used to have for ages) some magic around the port number. @@ -71,7 +78,7 @@ rm -r win zlib win-iconv examples # so we can't use %%{_datadir} and so forth here. %cmake . \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_tokudb:RelWithDebInfo}" \ -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \ \ -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \ @@ -179,6 +186,9 @@ popd # https://jira.mariadb.org/browse/CONC-410 # DESCRIPTION: Fix pkgconfig file - overlinking issues # IN_PROGRESS: PR submitted, problem consulted & explained, waiting on upstream response +# https://jira.mariadb.org/browse/CONC-426 +# DESCRIPTION: Debug build issues +# NEW: reported to upstream # Coverity Scan results from 3.0.10 release: # https://jira.mariadb.org/browse/CONC-234 @@ -200,6 +210,7 @@ popd - Rebase to 3.1 version - Disabling the ED25519 plugin - Plugindir patch upstreamed +- Added debug build switch * Tue May 21 2019 Michal Schorm - 3.0.10-2 - Fix overlinking issues