The -fvisibility=hidden option disables a generation of the rtti information
for some classes with hidden visibility, this information is critically
needed for ubsan VPTR check. Since this library needed to ise-default package,
we should just disable visibility option with ubsan to avoid situation
with undefined reference to typeinfo.
Change-Id: I95ccb0b8bceea6efae1e327f95b885a5f40de609
Signed-off-by: Denis Khalikov <d.khalikov@partner.samsung.com>
export CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden -DTIZEN_DEBUG_ENABLE -Werror"
export FFLAGS+=" -DTIZEN_DEBUG_ENABLE"
+# The -fvisibility=hidden option disables a generation of the rtti information for
+# some classes with hidden visibility, this information is critically needed for
+# ubsan VPTR check. Since this library needed to ise-default package, we should
+# just disable visibility option with ubsan to avoid situation with undefined
+# refernce to typeinfo.
+%{?ubsan:
+export CFLAGS=$(echo $CFLAGS | sed -e "s/-fvisibility=hidden//g")
+export CXXFLAGS=$(echo $CXXFLAGS | sed -e "s/-fvisibility=hidden//g" -e "s/-fvisibility-inlines-hidden//g")
+}
+
rm -rf CMakeFiles
rm -rf CMakeCache.txt