- added patches
+ netpbm-asan.patch OBS-URL: https://build.opensuse.org/package/show/graphics/netpbm?expand=0&rev=104
This commit is contained in:
parent
6f24851ef2
commit
a18460dbab
83
netpbm-asan.patch
Normal file
83
netpbm-asan.patch
Normal file
@ -0,0 +1,83 @@
|
||||
Index: netpbm-10.86.3/GNUmakefile
|
||||
===================================================================
|
||||
--- netpbm-10.86.3.orig/GNUmakefile 2019-05-14 09:16:35.984991072 +0200
|
||||
+++ netpbm-10.86.3/GNUmakefile 2019-05-16 09:42:17.843531751 +0200
|
||||
@@ -378,7 +378,7 @@ endif
|
||||
netpbm:%:%.o $(OBJECT_DEP) $(NETPBMLIB) $(URTLIBDEP) $(LIBOPT)
|
||||
# Note that LDFLAGS might contain -L options, so order is important.
|
||||
$(LD) -o $@ $< $(OBJECT_LIST) \
|
||||
- $(LDFLAGS) $(shell $(LIBOPT) $(NETPBMLIB) $(MERGELIBS)) \
|
||||
+ $(LDFLAGS) -lasan $(shell $(LIBOPT) $(NETPBMLIB) $(MERGELIBS)) \
|
||||
$(PNGLD) $(XML2LD) $(X11LD) $(MATHLIB) $(NETWORKLD) $(LADD)
|
||||
|
||||
netpbm.o: mergetrylist
|
||||
Index: netpbm-10.86.3/buildtools/Makefile
|
||||
===================================================================
|
||||
--- netpbm-10.86.3.orig/buildtools/Makefile 2019-05-14 09:16:32.160972760 +0200
|
||||
+++ netpbm-10.86.3/buildtools/Makefile 2019-05-16 09:42:13.255509230 +0200
|
||||
@@ -41,10 +41,10 @@ genfontc.o:%.o:%.c importinc
|
||||
$(NETPBM_INCLUDES) \
|
||||
$<
|
||||
genfontc:%:%.o $(NETPBMLIB)
|
||||
- $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< $(NETPBMLIB)
|
||||
+ $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< $(NETPBMLIB) -lasan
|
||||
|
||||
$(BUILDPROGS):%:%.o
|
||||
- $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $<
|
||||
+ $(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $< -lasan
|
||||
|
||||
distclean clean: cleanlocal
|
||||
.PHONY: cleanlocal
|
||||
Index: netpbm-10.86.3/common.mk
|
||||
===================================================================
|
||||
--- netpbm-10.86.3.orig/common.mk 2019-05-14 09:16:32.156972741 +0200
|
||||
+++ netpbm-10.86.3/common.mk 2019-05-16 09:42:26.703575262 +0200
|
||||
@@ -386,7 +386,7 @@ LDFLAGS_ALL = $(WINICON_OBJECT) \
|
||||
|
||||
$(PORTBINARIES) $(MATHBINARIES): %: %.o \
|
||||
$(NETPBMLIB) $(LIBOPT) $(WINICON_OBJECT)
|
||||
- $(LD) -o $@$(EXE) $@.o $(ADDL_OBJECTS) $(LDFLAGS_ALL)
|
||||
+ $(LD) -o $@$(EXE) $@.o $(ADDL_OBJECTS) -lasan $(LDFLAGS_ALL)
|
||||
|
||||
|
||||
# MERGE STUFF
|
||||
Index: netpbm-10.86.3/lib/Makefile
|
||||
===================================================================
|
||||
--- netpbm-10.86.3.orig/lib/Makefile 2019-05-14 09:16:32.832975977 +0200
|
||||
+++ netpbm-10.86.3/lib/Makefile 2019-05-16 09:42:22.159552950 +0200
|
||||
@@ -115,7 +115,7 @@ $(SONAME): \
|
||||
-lc \
|
||||
-soname libnetpbm.$(NETPBMLIBSUFFIX) \
|
||||
-set_version $(shell perl -e '$(PERLPROG)') \
|
||||
- $(LADD)
|
||||
+ -lasan $(LADD)
|
||||
endif
|
||||
|
||||
ifeq ($(NETPBMLIBTYPE),unixshared)
|
||||
@@ -131,7 +131,7 @@ $(SONAME): libnetpbm.$(NETPBMLIBSUFFIX).
|
||||
$(SYMLINK) $< $@
|
||||
libnetpbm.$(NETPBMLIBSUFFIX).$(MAJ).$(MIN): $(LIBOBJECTS) $(LIBOBJECTS_X)
|
||||
$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
|
||||
- $(SHLIB_CLIB) -lm $(LADD)
|
||||
+ $(SHLIB_CLIB) -lm -lasan $(LADD)
|
||||
endif
|
||||
|
||||
ifeq ($(NETPBMLIBTYPE),dll)
|
||||
@@ -144,7 +144,7 @@ endif
|
||||
-Wl,-soname,$(NETPBMSHLIBPREFIX)netpbm$(DLLVER).dll \
|
||||
-Wl,--output-def,$(NETPBMSHLIBPREFIX)netpbm$(DLLVER).def \
|
||||
-Wl,--out-implib,libnetpbm.dll.a -o $@ $(LDFLAGS) \
|
||||
- $(LIBOBJECTS) $(LIBOBJECTS_X) $(LDLIBS) $(LADD)
|
||||
+ $(LIBOBJECTS) $(LIBOBJECTS_X) $(LDLIBS) -lasan $(LADD)
|
||||
endif
|
||||
|
||||
ifeq ($(NETPBMLIBTYPE),dylib)
|
||||
@@ -158,7 +158,7 @@ libnetpbm.$(MAJ).dylib: libnetpbm.$(MAJ)
|
||||
|
||||
libnetpbm.$(MAJ).$(MIN).dylib: $(LIBOBJECTS) $(LIBOBJECTS_X)
|
||||
$(LD) $(LDSHLIB) -o $@ $(LIBOBJECTS) $(LIBOBJECTS_X) \
|
||||
- -lc $(LADD)
|
||||
+ -lc -lasan $(LADD)
|
||||
endif
|
||||
|
||||
#--------------------------------------------------------------------------
|
@ -3,6 +3,8 @@ Wed May 15 05:44:20 UTC 2019 - pgajdos@suse.com
|
||||
|
||||
- asan_build: build ASAN included
|
||||
- debug_build: build more suitable for debugging
|
||||
- added patches
|
||||
+ netpbm-asan.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 09:22:13 UTC 2019 - pgajdos@suse.com
|
||||
|
@ -39,6 +39,7 @@ Patch4: %{name}-security-code.patch
|
||||
Patch5: %{name}-security-scripts.patch
|
||||
Patch6: %{name}-gcc-warnings.patch
|
||||
Patch7: makeman-py3.patch
|
||||
Patch100: %{name}-asan.patch
|
||||
BuildRequires: flex
|
||||
BuildRequires: libjasper-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
@ -110,10 +111,7 @@ 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
|
||||
patch -p1 < %{PATCH100}
|
||||
%endif
|
||||
make %{?_smp_mflags} CFLAGS="$CFLAGS"
|
||||
rm doc/INSTALL
|
||||
|
Loading…
Reference in New Issue
Block a user