Compare commits

...

5 Commits

Author SHA1 Message Date
David Abdurachmanov 4c7ab54e63
Do not ignore tests failures on riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-21 12:16:43 +02:00
David Abdurachmanov fe762d8d53
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-02-21 12:16:12 +02:00
Fedora Release Engineering fc141358f5 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 10:15:47 +00:00
Yaakov Selkowitz 30c0ab2617 Fix build with GCC 14
https://sourceware.org/git/?p=elfutils.git;h=ae580d48278b9924da7503886b37be34378e1b04
2024-01-19 14:25:33 -05:00
Fedora Release Engineering ea7ed5a10d Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 17:59:24 +00:00
2 changed files with 42 additions and 8 deletions

View File

@ -0,0 +1,33 @@
From: Sergei Trofimovich <slyich@gmail.com>
Date: Thu, 21 Dec 2023 09:23:30 +0000 (+0000)
Subject: tests: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)
X-Git-Url: https://sourceware.org/git/?p=elfutils.git;a=commitdiff_plain;h=ae580d48278b9924da7503886b37be34378e1b04;hp=a2194f6b305bf0d0b9dd49dccd0a5c21994c8eea
tests: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)
`gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
detected minor infelicity in `calloc()` API usage in `elfutils`:
elfstrmerge.c: In function 'main':
elfstrmerge.c:450:32: error:
'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
450 | newscnbufs = calloc (sizeof (void *), newshnums);
| ^~~~
elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element
Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
---
diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
index 56350bb91..4eb58bbb5 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -447,7 +447,7 @@ main (int argc, char **argv)
}
newshnums = shdrnum - 1;
- newscnbufs = calloc (sizeof (void *), newshnums);
+ newscnbufs = calloc (newshnums, sizeof (void *));
if (newscnbufs == NULL)
fail_errno ("Couldn't allocate memory for new section buffers", NULL);

View File

@ -1,6 +1,6 @@
Name: elfutils
Version: 0.190
%global baserelease 4
%global baserelease 6
Release: %{baserelease}.0.riscv64%{?dist}
URL: http://elfutils.org/
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/
@ -79,6 +79,8 @@ Patch1: elfutils-0.186-fdo-swap.patch
Patch2: elfutils-0.190-fix-core-noncontig.patch
# Remove obscure tests that can fail on i386.
Patch3: elfutils-0.190-remove-ET_REL-unstrip-test.patch
# tests: fix build against gcc-14 (-Werror=calloc-transposed-args)
Patch4: elfutils-0.190-gcc-14.patch
%description
@ -314,11 +316,7 @@ install -Dm0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/elfutils-debuginfod.conf
# Record some build root versions in build.log
uname -r; rpm -q binutils gcc glibc || true
%ifnarch riscv64
%make_build check || (cat tests/test-suite.log; false)
%else
%make_build check || (cat tests/test-suite.log; true)
%endif
# Only the latest Fedora and EPEL have these scriptlets,
# older Fedora and plain RHEL don't.
@ -454,12 +452,15 @@ exit 0
%systemd_postun_with_restart debuginfod.service
%changelog
* Thu Dec 07 2023 David Abdurachmanov <davidlt@rivosinc.com> - 0.190-4.1.riscv64
* Wed Feb 21 2024 David Abdurachmanov <davidlt@rivosinc.com> - 0.190-6.0.riscv64
- Backport f2c522567ad63ac293535fba9704895e685ab5bc
- See: https://sourceware.org/bugzilla/show_bug.cgi?id=30047
* Sat Nov 25 2023 David Abdurachmanov <davidlt@rivosinc.com> - 0.190-3.0.riscv64
- Ignore testsuite failures on riscv64
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.190-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.190-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Nov 28 2023 Aaron Merey <amerey@fedoraproject.org> - 0.190-4
- Add elfutils-0.190-remove-ET_REL-unstrip-test.patch