- Make sure that CFLAGS in pfmlib/lib/ is used.

- Separate build and install processes.
- Clean up the descriptions.
This commit is contained in:
William Eden Cohen 2006-06-27 13:53:41 +00:00
parent 5ffe57140d
commit 9acc57cbda
3 changed files with 61 additions and 9 deletions

20
libpfm-3.2-rpm_opt.patch Normal file
View File

@ -0,0 +1,20 @@
--- libpfm-3.2-060621/rules.mk.orig 2006-04-05 08:55:12.000000000 -0400
+++ libpfm-3.2-060621/rules.mk 2006-06-27 00:19:08.000000000 -0400
@@ -25,12 +25,12 @@
.SUFFIXES: .c .S .o .lo .cpp
.S.o:
- $(CC) $(INCDIR) $(CFLAGS) -c $*.S
+ $(CC) $(INCDIR) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.S
.c.o:
- $(CC) $(INCDIR) $(CFLAGS) -c $*.c
+ $(CC) $(INCDIR) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.c
.cpp.o:
- $(CXX) $(INCDIR) $(CFLAGS) -c $*.cpp
+ $(CXX) $(INCDIR) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.cpp
.c.lo:
- $(CC) -fPIC -DPIC $(INCDIR) $(CFLAGS) -c $*.c -o $*.lo
+ $(CC) -fPIC -DPIC $(INCDIR) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.c -o $*.lo
.S.lo:
- $(CC) -fPIC -DPIC $(INCDIR) $(CFLAGS) -c $*.S -o $*.lo
+ $(CC) -fPIC -DPIC $(INCDIR) $(CFLAGS) $(RPM_OPT_FLAGS) -c $*.S -o $*.lo

View File

@ -0,0 +1,20 @@
--- libpfm-3.2-060621/examples/showreginfo.c.fread 2006-06-26 23:21:03.000000000 -0400
+++ libpfm-3.2-060621/examples/showreginfo.c 2006-06-26 23:21:35.000000000 -0400
@@ -65,7 +65,7 @@
unsigned int num_pmds;
char *lname, *p, *s, *buffer, *ptr;
unsigned long long def, reset;
- size_t pgsz;
+ size_t pgsz, elements;
num_pmcs = num_pmds = 0;
@@ -81,7 +81,7 @@
/*
* sysfs file cannot exceed the size of a page.
*/
- fread(buffer, pgsz, 1, fp);
+ elements=fread(buffer, pgsz, 1, fp);
fclose(fp);

View File

@ -1,5 +1,5 @@
%define DATE 060621
%define libpfm_release 1
%define libpfm_release 6
Summary: a performance monitoring library for Linux/ia64
Name: libpfm
Version: 3.2
@ -11,33 +11,40 @@ ExclusiveOS: linux
AutoReqProv: no
Source: http://prdownloads.sourceforge.net/perfmon2/%{name}-%{version}-%{DATE}.tar.gz
Patch1: libpfm-compat.patch
Patch2: libpfm-3.2-showreginfo.patch
Patch3: libpfm-3.2-rpm_opt.patch
Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
This package contains a library to develop performance monitoring
applications using the IA-64 Performance Monitor Unit (PMU).
This version supports both the Itanium and Itanium 2 processors.
applications using the Performance Monitor Unit (PMU) available on
various processors.
%package devel
Summary: the Linux/ia64 performance library (libpfm) development files.
Summary: the Linux performance library (libpfm) development files.
Group: Development/Libraries
%description devel
The performance monitoring library (libpfm) is used to develop
performance monitoring applications using the IA-64 Performance Monitoring
Unit (PMU). This package provides the files necessary for development of
applications. This version supports both the Itanium and Itanium 2 processors.
performance monitoring applications using the Performance Monitoring
Unit (PMU) available on various processors. This package provides the
files necessary for development of applications.
It requires a kernel perfmon-2.x subsystem.
%prep
%setup -q -n %{name}-%{version}-%{DATE}
%patch1 -p1 -b .compat
%patch2 -p1 -b .showreginfo
%patch3 -p1 -b .rpm_opt
%build
make DESTDIR=%{buildroot}/%{_prefix}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_prefix}
make install CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
DESTDIR=%{buildroot}/%{_prefix}
make install DESTDIR=%{buildroot}/%{_prefix}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -59,6 +66,11 @@ rm -rf %{buildroot}
%{_mandir}/man3/*
%changelog
* Mon Jun 26 2006 Will Cohen <wcohen@redhat.com>
- Make sure that CFLAGS in pfmlib/lib/ is used.
- Separate build and install processes.
- Clean up the descriptions.
* Mon Jun 26 2006 Will Cohen <wcohen@redhat.com>
- Update to libpfm-3.2-060621.