diff --git a/libraw.changes b/libraw.changes index febb85b..5de9a9c 100644 --- a/libraw.changes +++ b/libraw.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 8 13:22:31 UTC 2019 - Petr Gajdos + +- asan_build: build ASAN included +- debug_build: build more suitable for debugging + ------------------------------------------------------------------- Mon Dec 31 15:37:08 UTC 2018 - Petr Gajdos diff --git a/libraw.spec b/libraw.spec index 9d20f82..6fae091 100644 --- a/libraw.spec +++ b/libraw.spec @@ -1,7 +1,7 @@ # # spec file for package libraw # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,9 @@ # +%define debug_build 0 +%define asan_build 0 + %define tar_name LibRaw %define lver 19 %define lname libraw%{lver} @@ -102,10 +105,18 @@ against LibRaw. LibRaw does not provide dynamic libraries. %patch1 -p1 %build -export CXXFLAGS="%optflags -fPIC -DUSE_ZLIB" +export CXXFLAGS="%{optflags} -fPIC -DUSE_ZLIB" +%if %{debug_build} +export CXXFLAGS="$CXXFLAGS -O0" +%endif export LIBS="$LIBS -lz" autoreconf -fi %configure +%if %{asan_build} +sed -i -e 's/\(^CXXFLAGS =.*\)/\1 -fsanitize=address/' \ + -e 's/\(^LIBS =.*\)/\1 -lasan/' \ + Makefile +%endif make %{?_smp_mflags} %install