|
|
aac10c |
%{?scl:%{?scl_package:%scl_package binutils}}
|
|
|
aac10c |
|
|
|
aac10c |
%global githash 38573e7d
|
|
|
aac10c |
Name: %{?scl_prefix}memstomp
|
|
|
aac10c |
Version: 0.1.5
|
|
|
aac10c |
Release: 6%{?dist}
|
|
|
aac10c |
Summary: Warns of memory argument overlaps to various functions
|
|
|
aac10c |
Group: Development/Debuggers
|
|
|
aac10c |
# The entire source code is LGPLV3+ with the exception of backtrace-symbols.c which
|
|
|
aac10c |
# is GPLv2+ by way of being a hacked up old version of binutils's addr2line.
|
|
|
aac10c |
# backtrace-symbols.c is built into an independent .so to avoid license contamination
|
|
|
aac10c |
License: LGPLv3+ and GPLv2+
|
|
|
aac10c |
URL: git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
|
|
|
aac10c |
# The source for this package was pulled from upstream's vcs. Use the
|
|
|
aac10c |
# following commands to generate the tarball:
|
|
|
aac10c |
# git clone git://fedorapeople.org/home/fedora/wcohen/public_git/memstomp
|
|
|
aac10c |
# cd memstomp
|
|
|
aac10c |
# git archive --prefix memstomp-0.1.5-38573e7d/ master | gzip > memstomp-0.1.5-38573e7d.tar.gz
|
|
|
aac10c |
Source0: memstomp-%{version}-%{githash}.tar.gz
|
|
|
aac10c |
Requires: util-linux
|
|
|
aac10c |
BuildRequires: binutils-devel autoconf automake dejagnu
|
|
|
aac10c |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
aac10c |
|
|
|
aac10c |
Patch0: memstomp-testsuite.patch
|
|
|
aac10c |
Patch1: memstomp-man.patch
|
|
|
aac10c |
Patch2: memstomp-rh961495.patch
|
|
|
aac10c |
Patch3: memstomp-rh962763.patch
|
|
|
aac10c |
Patch4: memstomp-quietmode.patch
|
|
|
aac10c |
Patch5: memstomp-rh1093173.patch
|
|
|
aac10c |
Patch6: memstomp-rh1133815.patch
|
|
|
aac10c |
Patch7: memstomp-implicit-int.patch
|
|
|
aac10c |
|
|
|
aac10c |
|
|
|
aac10c |
%define alternatives_cmd %{!?scl:%{_sbindir}}%{?scl:%{_root_sbindir}}/alternatives
|
|
|
aac10c |
%define alternatives_cmdline %{alternatives_cmd}%{?scl: --altdir %{_sysconfdir}/alternatives --admindir %{_scl_root}/var/lib/alternatives}
|
|
|
aac10c |
|
|
|
aac10c |
%{?scl:Requires:%scl_runtime}
|
|
|
aac10c |
|
|
|
aac10c |
|
|
|
aac10c |
%description
|
|
|
aac10c |
memstomp is a simple program that can be used to identify
|
|
|
aac10c |
places in code which trigger undefined behavior due to
|
|
|
aac10c |
overlapping memory arguments to certain library calls.
|
|
|
aac10c |
|
|
|
aac10c |
%post -p /sbin/ldconfig
|
|
|
aac10c |
%postun -p /sbin/ldconfig
|
|
|
aac10c |
|
|
|
aac10c |
%prep
|
|
|
aac10c |
%setup -q -n memstomp-%{version}-%{githash}
|
|
|
aac10c |
%patch0 -p1
|
|
|
aac10c |
%patch1 -p1
|
|
|
aac10c |
%patch2 -p1
|
|
|
aac10c |
%patch3 -p1
|
|
|
aac10c |
%patch4 -p1
|
|
|
aac10c |
%patch5 -p1
|
|
|
aac10c |
%patch6 -p1
|
|
|
aac10c |
%patch7 -p1
|
|
|
aac10c |
|
|
|
aac10c |
|
|
|
aac10c |
%build
|
|
|
aac10c |
autoreconf
|
|
|
aac10c |
%configure
|
|
|
aac10c |
# We force -O0 here because memstomp essentially relies on GCC
|
|
|
aac10c |
# not removing any of its checks. GCC continues to get better
|
|
|
aac10c |
# and twarting its optimizer isn't something I have any interest
|
|
|
aac10c |
# in maintaining over time. So just force -O0 for stupid code
|
|
|
aac10c |
# generation.
|
|
|
aac10c |
make %{?_smp_mflags} CFLAGS+="-O0 -fno-strict-aliasing"
|
|
|
aac10c |
make -k check
|
|
|
aac10c |
|
|
|
aac10c |
%install
|
|
|
aac10c |
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
aac10c |
|
|
|
aac10c |
%files
|
|
|
aac10c |
%doc README LGPL3 GPL2 GPL3
|
|
|
aac10c |
%{_bindir}/memstomp
|
|
|
aac10c |
%{_libdir}/libmemstomp.so
|
|
|
aac10c |
%{_libdir}/libmemstomp-backtrace-symbols.so
|
|
|
aac10c |
%{_mandir}/man1/memstomp.1.gz
|
|
|
aac10c |
|
|
|
aac10c |
%changelog
|
|
|
aac10c |
* Tue May 11 2021 Marek Polacek <polacek@redhat.com> 0.1.5-6
|
|
|
aac10c |
- Rebuild for DTS 11
|