- asan_build: build ASAN included

- debug_build: build more suitable for debugging

OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=102
This commit is contained in:
Petr Gajdos 2019-05-15 05:45:13 +00:00 committed by Git OBS Bridge
parent ca3a168e9c
commit be08dff0ff
2 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed May 15 05:44:20 UTC 2019 - pgajdos@suse.com
- asan_build: build ASAN included
- debug_build: build more suitable for debugging
-------------------------------------------------------------------
Tue May 14 09:22:13 UTC 2019 - pgajdos@suse.com

View File

@ -16,6 +16,8 @@
#
%define debug_build 0
%define asan_build 0
%define libmaj 11
%define libmin 86
%define libver %{libmaj}.%{libmin}
@ -103,7 +105,17 @@ echo 'install.manweb:' >> converter/ppm/hpcdtoppm/Makefile
# dtto for ppmtompeg
echo 'install.manweb:' >> converter/ppm/ppmtompeg/Makefile
export CFLAGS="%{optflags} -flax-vector-conversions"
make %{?_smp_mflags} CFLAGS="$CFLAGS"
%if %{debug_build}
export CFLAGS="$CFLAGS -O0"
%endif
%if %{asan_build}
export CFLAGS="$CFLAGS -fsanitize=address"
sed -i 's/\(LD_FOR_BUILD.*$\)/\1 -lasan/' buildtools/Makefile
sed -i 's/\($(LDFLAGS)\)/\1 -lasan/' GNUmakefile
sed -i 's/\($(LADD)\)/-lasan \1/' lib/Makefile
sed -i 's/\($(LDFLAGS_ALL)\)/-lasan \1/' common.mk
%endif
make -j1 CFLAGS="$CFLAGS"
rm doc/INSTALL
#
# convert html to man pages