support sanitizer

i9cf
Mamoru TASAKA 4 years ago
parent 998f019710
commit 96bf4d9e96

@ -13,6 +13,7 @@
%global update_po 0
%global if_pre 0
%global use_gcc_strict_sanitize 1
%global use_release 0
%global use_gitbare 1
@ -22,6 +23,11 @@
%global use_release 1
%endif
%global flagrel %{nil}
%if 0%{?use_gcc_strict_sanitize} >= 1
%global flagrel %{flagrel}.san
%endif
%if 0%{?use_gitbare}
%global gittardate 20210319
%global gittartime 1025
@ -33,7 +39,7 @@
%global if_pre 1
%endif
%global mainrel 0.1
%global mainrel 0.1.100
%if 0%{?use_release} >= 1
%global fedorarel %{?prever:0.}%{mainrel}%{?prever:.%{prerpmver}}
@ -60,7 +66,7 @@ Name: gnome-commander
Version: 1.12
# Downgrade 3 times, sorry...
Epoch: 4
Release: %{fedorarel}%{?dist}
Release: %{fedorarel}%{flagrel}%{?dist}
Summary: A nice and fast file manager for the GNOME desktop
Summary(pl): Menadżer plików dla GNOME oparty o Norton Commander'a (TM)
Summary(sv): GNOME Commander är en snabb och smidig filhanderare för GNOME
@ -80,6 +86,10 @@ Source10: mimeedit-svn%{mimeedit_rev}.sh
Patch1: gnome-commander-1.6.0-path-fedora-specific.patch
BuildRequires: gcc-c++
%if 0%{?use_gcc_strict_sanitize}
BuildRequires: libasan
BuildRequires: libubsan
%endif
BuildRequires: desktop-file-utils
BuildRequires: gettext
@ -211,6 +221,12 @@ popd
export PATH=$(pwd)/TMPBINDIR:$PATH
export BUILD_TOP_DIR=$(pwd)
%set_build_flags
%if 0%{?use_gcc_strict_sanitize}
export CC="${CC} -fsanitize=address -fsanitize=undefined"
export CXX="${CXX} -fsanitize=address -fsanitize=undefined"
%endif
%if 0%{?use_gitbare}
pushd %{name}
%endif

Loading…
Cancel
Save