Fix building on ARM platform

This commit is contained in:
Peter Robinson 2012-03-05 22:47:05 +00:00
parent 81c97a1660
commit ee0ad34737
2 changed files with 35 additions and 14 deletions

View File

@ -0,0 +1,12 @@
diff -r -u valgrind-3.7.0.old/configure valgrind-3.7.0/configure
--- valgrind-3.7.0.old/configure 2012-03-05 15:16:23.000000000 -0500
+++ valgrind-3.7.0/configure 2012-03-05 13:49:04.000000000 -0500
@@ -5279,7 +5279,7 @@
ARCH_MAX="s390x"
;;
- armv7*)
+ armv[57]*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok (${host_cpu})" >&5
$as_echo "ok (${host_cpu})" >&6; }
ARCH_MAX="arm"

View File

@ -1,8 +1,12 @@
Summary: Tool for finding memory management bugs in programs
Name: valgrind
Version: 3.7.0
Release: 1%{?dist}
Release: 2%{?dist}
Epoch: 1
License: GPLv2
URL: http://www.valgrind.org/
Group: Development/Debuggers
Source0: http://www.valgrind.org/downloads/valgrind-%{version}.tar.bz2
Patch1: valgrind-3.7.0-cachegrind-improvements.patch
Patch2: valgrind-3.7.0-openat.patch
@ -15,10 +19,8 @@ Patch8: valgrind-3.7.0-pie.patch
Patch9: valgrind-3.7.0-tests.patch
Patch10: valgrind-3.7.0-f-sgetown-ex.patch
Patch11: valgrind-3.7.0-scsi-ioctls.patch
License: GPLv2
URL: http://www.valgrind.org/
Group: Development/Debuggers
BuildRoot: %{_tmppath}/%{name}-root
Patch12: valgrind-3.7.0-enable-armv5.patch
Obsoletes: valgrind-callgrind
%ifarch x86_64 ppc64
# Ensure glibc{,-devel} is installed for both multilib arches
@ -29,10 +31,10 @@ BuildRequires: glibc-devel >= 2.14
%else
BuildRequires: glibc-devel >= 2.12
%endif
%ifnarch s390x
%ifarch %{ix86} x86_64 ppc ppc64
BuildRequires: openmpi-devel >= 1.3.3
%endif
ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390x
ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390x %{arm}
%ifarch %{ix86}
%define valarch x86
%define valsecarch %{nil}
@ -53,6 +55,14 @@ ExclusiveArch: %{ix86} x86_64 ppc ppc64 s390x
%define valarch s390x
%define valsecarch %{nil}
%endif
%ifarch armv7hl
%define valarch armv7hl
%define valsecarch %{nil}
%endif
%ifarch armv5tel
%define valarch armv5tel
%define valsecarch %{nil}
%endif
# Disable build root strip policy
%define __spec_install_post /usr/lib/rpm/brp-compress || :
@ -100,6 +110,7 @@ for details.
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1 -b .arm
%build
CC=gcc
@ -113,7 +124,7 @@ CC="gcc -B `pwd`/libgcc/"
%configure CC="$CC" \
CFLAGS="`echo " %{optflags} " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/^ //;s/ $//'`" \
CXXFLAGS="`echo " %{optflags} " | sed 's/ -m\(64\|3[21]\) / /g;s/ -fexceptions / /g;s/^ //;s/ $//'`" \
%ifnarch s390x
%ifarch %{ix86} x86_64 ppc ppc64
--with-mpicc=%{_libdir}/openmpi/bin/mpicc
%endif
GDB=%{_bindir}/gdb \
@ -142,8 +153,6 @@ gcc $RPM_OPT_FLAGS -o close_fds close_fds.c
echo 'int main (void) { return 0; }' > none/tests/pth_cancel2.c
%install
rm -rf $RPM_BUILD_ROOT
%makeinstall
mkdir docs.installed
mv $RPM_BUILD_ROOT%{_datadir}/doc/valgrind/* docs.installed/
@ -171,9 +180,6 @@ echo ===============TESTING===================
./close_fds make regtest || :
echo ===============END TESTING===============
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING NEWS README_*
@ -191,7 +197,7 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/valgrind/*.a
%{_libdir}/pkgconfig/*
%ifnarch s390x
%ifarch %{ix86} x86_64 ppc ppc64
%files openmpi
%defattr(-,root,root)
%dir %{_libdir}/valgrind
@ -199,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Sun Mar 4 2012 Peter Robinson <pbrobinson@fedoraproject.org> - 3.7.0-2
- Fix building on ARM platform
* Fri Jan 27 2012 Jakub Jelinek <jakub@redhat.com> 3.7.0-1
- update to 3.7.0 (#769213, #782910, #772343)
- handle some further SCSI ioctls (#783936)