Added SCL macros to support building as part of a Software Collection.
This commit is contained in:
parent
b11792f885
commit
8d4aeadf74
@ -1,5 +1,7 @@
|
|||||||
|
%{?scl:%scl_package valgrind}
|
||||||
|
|
||||||
Summary: Tool for finding memory management bugs in programs
|
Summary: Tool for finding memory management bugs in programs
|
||||||
Name: valgrind
|
Name: %{?scl_prefix}valgrind
|
||||||
Version: 3.8.0
|
Version: 3.8.0
|
||||||
Release: 8%{?dist}
|
Release: 8%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
@ -7,6 +9,9 @@ License: GPLv2
|
|||||||
URL: http://www.valgrind.org/
|
URL: http://www.valgrind.org/
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
|
|
||||||
|
# Only necessary for RHEL, will be ignored on Fedora
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
|
||||||
Patch1: valgrind-3.8.0-cachegrind-improvements.patch
|
Patch1: valgrind-3.8.0-cachegrind-improvements.patch
|
||||||
Patch2: valgrind-3.8.0-openat.patch
|
Patch2: valgrind-3.8.0-openat.patch
|
||||||
@ -63,11 +68,23 @@ BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.
|
|||||||
%if 0%{?fedora} >= 15
|
%if 0%{?fedora} >= 15
|
||||||
BuildRequires: glibc-devel >= 2.14
|
BuildRequires: glibc-devel >= 2.14
|
||||||
%else
|
%else
|
||||||
|
%if 0%{?rhel} >= 6
|
||||||
BuildRequires: glibc-devel >= 2.12
|
BuildRequires: glibc-devel >= 2.12
|
||||||
|
%else
|
||||||
|
BuildRequires: glibc-devel >= 2.5
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%ifarch %{ix86} x86_64 ppc ppc64
|
%ifarch %{ix86} x86_64 ppc ppc64
|
||||||
BuildRequires: openmpi-devel >= 1.3.3
|
BuildRequires: openmpi-devel >= 1.3.3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# For %%build and %%check.
|
||||||
|
# In case of a software collection, pick the matching gdb and binutils.
|
||||||
|
BuildRequires: %{?scl_prefix}gdb
|
||||||
|
BuildRequires: %{?scl_prefix}binutils
|
||||||
|
|
||||||
|
%{?scl:Requires:%scl_runtime}
|
||||||
|
|
||||||
ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390x %{arm}
|
ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390x %{arm}
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
%define valarch x86
|
%define valarch x86
|
||||||
@ -115,7 +132,7 @@ find/diagnose.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for valgrind
|
Summary: Development files for valgrind
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
Requires: valgrind = %{epoch}:%{version}-%{release}
|
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header files and libraries for development of valgrind aware programs
|
Header files and libraries for development of valgrind aware programs
|
||||||
@ -124,15 +141,15 @@ or valgrind plugins.
|
|||||||
%package openmpi
|
%package openmpi
|
||||||
Summary: OpenMPI support for valgrind
|
Summary: OpenMPI support for valgrind
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
Requires: valgrind = %{epoch}:%{version}-%{release}
|
Requires: %{?scl_prefix}valgrind = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
%description openmpi
|
%description openmpi
|
||||||
A wrapper library for debugging OpenMPI parallel programs with valgrind.
|
A wrapper library for debugging OpenMPI parallel programs with valgrind.
|
||||||
See file:///usr/share/doc/valgrind-%{version}/html/mc-manual.html#mc-manual.mpiwrap
|
See file:///usr/share/doc/%{?scl_prefix}valgrind-%{version}/html/mc-manual.html#mc-manual.mpiwrap
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q %{?scl:-n %{pkg_name}-%{version}}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
@ -160,6 +177,11 @@ touch ./none/tests/amd64/bmi.stderr.exp
|
|||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# We need to use the software collection compiler and binutils if available.
|
||||||
|
# The configure checks might otherwise miss support for various newer
|
||||||
|
# assembler instructions.
|
||||||
|
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
%ifarch x86_64 ppc64
|
%ifarch x86_64 ppc64
|
||||||
# Ugly hack - libgcc 32-bit package might not be installed
|
# Ugly hack - libgcc 32-bit package might not be installed
|
||||||
@ -168,6 +190,14 @@ ar r libgcc/32/libgcc_s.a
|
|||||||
ar r libgcc/libgcc_s_32.a
|
ar r libgcc/libgcc_s_32.a
|
||||||
CC="gcc -B `pwd`/libgcc/"
|
CC="gcc -B `pwd`/libgcc/"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Old openmpi-devel has version depended paths for mpicc.
|
||||||
|
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
|
||||||
|
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/bin/mpicc
|
||||||
|
%else
|
||||||
|
%define mpiccpath %{!?scl:%{_libdir}}%{?scl:%{_root_libdir}}/openmpi/*/bin/mpicc
|
||||||
|
%endif
|
||||||
|
|
||||||
# Filter out some flags that cause lots of valgrind test failures.
|
# Filter out some flags that cause lots of valgrind test failures.
|
||||||
# Also filter away -O2, valgrind adds it wherever suitable, but
|
# Also filter away -O2, valgrind adds it wherever suitable, but
|
||||||
# not for tests which should be -O0, as they aren't meant to be
|
# not for tests which should be -O0, as they aren't meant to be
|
||||||
@ -175,7 +205,7 @@ CC="gcc -B `pwd`/libgcc/"
|
|||||||
OPTFLAGS="`echo " %{optflags} " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/ -fstack-protector / / g;s/ -Wp,-D_FORTIFY_SOURCE=2 / /g;s/ -O2 / /g;s/^ //;s/ $//'`"
|
OPTFLAGS="`echo " %{optflags} " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/ -fstack-protector / / g;s/ -Wp,-D_FORTIFY_SOURCE=2 / /g;s/ -O2 / /g;s/^ //;s/ $//'`"
|
||||||
%configure CC="$CC" CFLAGS="$OPTFLAGS" CXXFLAGS="$OPTFLAGS" \
|
%configure CC="$CC" CFLAGS="$OPTFLAGS" CXXFLAGS="$OPTFLAGS" \
|
||||||
%ifarch %{ix86} x86_64 ppc ppc64
|
%ifarch %{ix86} x86_64 ppc ppc64
|
||||||
--with-mpicc=%{_libdir}/openmpi/bin/mpicc \
|
--with-mpicc=%{mpiccpath} \
|
||||||
%endif
|
%endif
|
||||||
GDB=%{_bindir}/gdb
|
GDB=%{_bindir}/gdb
|
||||||
|
|
||||||
@ -203,7 +233,8 @@ gcc $RPM_OPT_FLAGS -o close_fds close_fds.c
|
|||||||
echo 'int main (void) { return 0; }' > none/tests/pth_cancel2.c
|
echo 'int main (void) { return 0; }' > none/tests/pth_cancel2.c
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%makeinstall
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
mkdir docs.installed
|
mkdir docs.installed
|
||||||
mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs.installed/
|
mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs.installed/
|
||||||
rm -f docs.installed/*.ps
|
rm -f docs.installed/*.ps
|
||||||
@ -238,6 +269,8 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
# Build the test files with the software collection compiler if available.
|
||||||
|
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
|
||||||
make %{?_smp_mflags} check || :
|
make %{?_smp_mflags} check || :
|
||||||
echo ===============TESTING===================
|
echo ===============TESTING===================
|
||||||
./close_fds make regtest || :
|
./close_fds make regtest || :
|
||||||
@ -279,6 +312,7 @@ echo ===============END TESTING===============
|
|||||||
Makefile.in from valgrind-3.8.0-avx2-bmi-fma.patch.gz
|
Makefile.in from valgrind-3.8.0-avx2-bmi-fma.patch.gz
|
||||||
- Remove gdbserver_tests Makefile changes from /valgrind-3.8.0-tests.patch
|
- Remove gdbserver_tests Makefile changes from /valgrind-3.8.0-tests.patch
|
||||||
tests no longer hang.
|
tests no longer hang.
|
||||||
|
- Added SCL macros to support building as part of a Software Collection.
|
||||||
|
|
||||||
* Wed Sep 12 2012 Mark Wielaard <mjw@redhat.com> 3.8.0-8
|
* Wed Sep 12 2012 Mark Wielaard <mjw@redhat.com> 3.8.0-8
|
||||||
- Add configure fixup valgrind-3.8.0-bmi-conf-check.patch
|
- Add configure fixup valgrind-3.8.0-bmi-conf-check.patch
|
||||||
|
Loading…
Reference in New Issue
Block a user