Add script to modify bootstrap file for ASAN build 98/299398/1 accepted/tizen_base_asan accepted/tizen/base/asan/20231005.063414 accepted/tizen/base/asan/20231009.220523 accepted/tizen/base/asan/20240306.042625
authorJinWang An <jinwang.an@samsung.com>
Wed, 27 Sep 2023 08:38:09 +0000 (17:38 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 27 Sep 2023 08:38:09 +0000 (17:38 +0900)
Change-Id: I2c06d07f8f57ef41ad74c865ce85ad42094feb29
Signed-off-by: JinWang An <jinwang.an@samsung.com>
packaging/cmake.spec

index e236706..07d7a9c 100644 (file)
@@ -36,7 +36,6 @@ cp %{SOURCE1001} .
 %build
 export CXXFLAGS="$RPM_OPT_FLAGS -fPIC -pie"
 export CFLAGS="$CXXFLAGS"
-
 # Set up default CMake configuration for ranlib, ar and nm, so we can build
 # both CMake and target packages with LTO
 insertconfline() {
@@ -47,6 +46,10 @@ insertconfline "set (CMAKE_RANLIB \"$(which %__ranlib)\" CACHE FILEPATH \"Path t
 insertconfline "set (CMAKE_AR \"$(which %__ar)\" CACHE FILEPATH \"Path to ar tool.\" FORCE)"
 insertconfline "set (CMAKE_NM \"$(which %__nm)\" CACHE FILEPATH \"Path to nm tool.\" FORCE)"
 
+%if 0%{?asan}
+sed -i '1719s/libs=\"${libs} -ldl -lrt\"/libs=\"${libs} -ldl -lrt -lasan\"/' bootstrap
+%endif
+
 ./configure \
     --prefix=%{_prefix} \
     --datadir=/share/%{name} \