Switch off UBSan for update_db 82/134982/1
authorDenis Khalikov <d.khalikov@partner.samsung.com>
Tue, 20 Jun 2017 11:19:18 +0000 (14:19 +0300)
committerDenis Khalikov <d.khalikov@partner.samsung.com>
Tue, 20 Jun 2017 11:24:46 +0000 (14:24 +0300)
Change-Id: I6ffd4ce833bd72c1ee66cdc77f8139b63ce618a0
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
packaging/capi-system-info.spec

index 54127d6ef4e05b6e4ee01a3ce3532bfb0ee1ae70..ac1aaeee05facbc185c30fe6c0e2d5ca38c46be3 100644 (file)
@@ -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