From 4344a207feb3b90d6b96ab8ff5729a927a7d6208 Mon Sep 17 00:00:00 2001 From: Denis Khalikov Date: Tue, 20 Jun 2017 14:19:18 +0300 Subject: [PATCH] Switch off UBSan for update_db Change-Id: I6ffd4ce833bd72c1ee66cdc77f8139b63ce618a0 Signed-off-by: Denis Khalikov --- packaging/capi-system-info.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packaging/capi-system-info.spec b/packaging/capi-system-info.spec index 54127d6..ac1aaee 100644 --- a/packaging/capi-system-info.spec +++ b/packaging/capi-system-info.spec @@ -51,6 +51,9 @@ cp %{SOURCE1001} . %define upgrade_script_path %{TZ_SYS_RO_SHARE}/upgrade/scripts %build +%{?asan: %define sanitizer 1} +%{?ubsan: %define sanitizer 1} + MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` CMAKE_OPTS="-DCONFIG_FILE_PATH=%{config_file_path} \ -DINFO_FILE_PATH=%{info_file_path} \ @@ -60,7 +63,7 @@ CMAKE_OPTS="-DCONFIG_FILE_PATH=%{config_file_path} \ -DTIZEN_ID_PATH=%{tizen_id_path} \ -DDB_PATH=%{db_path} \ -DUPGRADE_SCRIPT_PATH=%{upgrade_script_path} \ - %{?asan:-DBUILD_UPDATE_DB=OFF}" + %{?sanitizer:-DBUILD_UPDATE_DB=OFF}" mkdir build && cd build %cmake .. ${CMAKE_OPTS} @@ -69,7 +72,7 @@ mkdir build && cd build # excluded from ASan build. So the update_db is rebuilt without forced ASan # options after the rest of package is ready %__make %{?_smp_mflags} -%{?asan: +%{?sanitizer: mkdir -p %{_builddir}/update_db && pushd %{_builddir}/update_db /usr/bin/gcc-unforce-options %cmake %{_builddir}/%{name}-%{version} ${CMAKE_OPTS} -DBUILD_UPDATE_DB=ON @@ -81,7 +84,7 @@ popd pushd build %make_install popd -%{?asan:pushd %{_builddir}/update_db/src/update_db && %make_install && popd} +%{?sanitizer:pushd %{_builddir}/update_db/src/update_db && %make_install && popd} mkdir -p %{buildroot}/etc cp -f script/make_info_file.sh %{buildroot}/etc/make_info_file.sh -- 2.7.4