Added a debug switch

This commit is contained in:
Michal Schorm 2019-07-16 14:07:33 +02:00
parent db2966c1ba
commit b3eef80bec

View File

@ -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 <mschorm@redhat.com> - 3.0.10-2
- Fix overlinking issues