Fix gcc-14 -Werror=calloc-transposed-args compatibility
This commit is contained in:
parent
461c2dd0bd
commit
dcb84740cd
21
libpfm-gcc14.patch
Normal file
21
libpfm-gcc14.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
commit cb944829e0940d74009e09b8985b4f2139f5cb3b
|
||||||
|
Author: William Cohen <wcohen@redhat.com>
|
||||||
|
Date: Mon Jan 29 16:23:43 2024 -0500
|
||||||
|
|
||||||
|
Correct s390x code to avoid GCC-14 -Werror=calloc-transposed-args errors
|
||||||
|
|
||||||
|
diff --git a/lib/pfmlib_s390x_cpumf.c b/lib/pfmlib_s390x_cpumf.c
|
||||||
|
index d8ce22d..718f5f8 100644
|
||||||
|
--- a/lib/pfmlib_s390x_cpumf.c
|
||||||
|
+++ b/lib/pfmlib_s390x_cpumf.c
|
||||||
|
@@ -216,8 +216,8 @@ static int pfm_cpumcf_init(void *this)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
- cpumcf_pe = calloc(sizeof(*cpumcf_pe),
|
||||||
|
- cfvn_set_count + csvn_set_count + ext_set_count);
|
||||||
|
+ cpumcf_pe = calloc(cfvn_set_count + csvn_set_count + ext_set_count,
|
||||||
|
+ sizeof(*cpumcf_pe));
|
||||||
|
if (cpumcf_pe == NULL)
|
||||||
|
return PFM_ERR_NOMEM;
|
||||||
|
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Name: libpfm
|
Name: libpfm
|
||||||
Version: 4.13.0
|
Version: 4.13.0
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
|
|
||||||
Summary: Library to encode performance events for use by perf tool
|
Summary: Library to encode performance events for use by perf tool
|
||||||
|
|
||||||
@ -20,6 +20,7 @@ License: MIT
|
|||||||
URL: http://perfmon2.sourceforge.net/
|
URL: http://perfmon2.sourceforge.net/
|
||||||
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
|
Source0: http://sourceforge.net/projects/perfmon2/files/libpfm4/%{name}-%{version}.tar.gz
|
||||||
Patch2: libpfm-python3-setup.patch
|
Patch2: libpfm-python3-setup.patch
|
||||||
|
Patch3: libpfm-gcc14.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -73,7 +74,8 @@ Python bindings for libpfm4 and perf_event_open system call.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch2 -p1 -b .python3
|
%patch -P2 -p1 -b .python3
|
||||||
|
%patch -P3 -p1 -b .gcc14
|
||||||
# to prevent setuptools from installing an .egg, we need to pass --root to setup.py install
|
# to prevent setuptools from installing an .egg, we need to pass --root to setup.py install
|
||||||
# see https://github.com/pypa/setuptools/issues/3143
|
# see https://github.com/pypa/setuptools/issues/3143
|
||||||
# and https://github.com/pypa/pip/issues/11501
|
# and https://github.com/pypa/pip/issues/11501
|
||||||
@ -133,6 +135,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/lib*.a
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 29 2024 William Cohen <wcohen@redhat.com> - 4.13.0-8
|
||||||
|
- Fix gcc-14 -Werror=calloc-transposed-args compatibility
|
||||||
|
|
||||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-7
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.0-7
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user