From 51f6816422da612c18570d2b46a42d265ae5f2b1 Mon Sep 17 00:00:00 2001 From: JinWang An Date: Wed, 27 Sep 2023 17:38:09 +0900 Subject: Add script to modify bootstrap file for ASAN build Change-Id: I2c06d07f8f57ef41ad74c865ce85ad42094feb29 Signed-off-by: JinWang An --- packaging/cmake.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/cmake.spec b/packaging/cmake.spec index e23670603..07d7a9cee 100644 --- a/packaging/cmake.spec +++ b/packaging/cmake.spec @@ -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} \ -- cgit v1.2.3