diff --git a/elfutils-0.166-elfcmp-comp-gcc6.patch b/elfutils-0.166-elfcmp-comp-gcc6.patch new file mode 100644 index 0000000..2183b35 --- /dev/null +++ b/elfutils-0.166-elfcmp-comp-gcc6.patch @@ -0,0 +1,50 @@ +From 836a16fe5b5bab4a3afe2c991c104652775ce3a3 Mon Sep 17 00:00:00 2001 +From: David Abdurachmanov +Date: Mon, 11 Apr 2016 16:00:57 +0200 +Subject: [PATCH] elfcmp: fix self-comparison error with GCC 6 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406 +(Red Hat 6.0.0-0.20). + +elfcmp.c: In function ‘main’: +elfcmp.c:364:199: error: self-comparison always evaluates +to false [-Werror=tautological-compare] + if (unlikely (name1 == NULL || name2 == NULL + +Signed-off-by: David Abdurachmanov +--- + src/ChangeLog | 4 ++++ + src/elfcmp.c | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/ChangeLog b/src/ChangeLog +index f74b5dc..bdc9d13 100644 +--- a/src/ChangeLog ++++ b/src/ChangeLog +@@ -1,3 +1,7 @@ ++2016-04-11 David Abdurachmanov ++ ++ * elfcmp.c (main): Fix self-comparison error with GCC 6. ++ + 2016-03-21 Mark Wielaard + + * nm.c (show_symbols): Check for malloc size argument overflow. +diff --git a/src/elfcmp.c b/src/elfcmp.c +index 852b92f..7b5d39c 100644 +--- a/src/elfcmp.c ++++ b/src/elfcmp.c +@@ -368,7 +368,7 @@ main (int argc, char *argv[]) + && sym1->st_shndx != SHN_UNDEF) + || sym1->st_info != sym2->st_info + || sym1->st_other != sym2->st_other +- || sym1->st_shndx != sym1->st_shndx)) ++ || sym1->st_shndx != sym2->st_shndx)) + { + // XXX Do we want to allow reordered symbol tables? + symtab_mismatch: +-- +1.8.3.1 + diff --git a/elfutils.spec b/elfutils.spec index 33e5f85..220dc38 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,7 +1,7 @@ Name: elfutils Summary: A collection of utilities and DSOs to handle compiled objects Version: 0.166 -%global baserelease 1 +%global baserelease 2 URL: https://fedorahosted.org/elfutils/ %global source_url http://fedorahosted.org/releases/e/l/elfutils/%{version}/ License: GPLv3+ and (GPLv2+ or LGPLv3+) @@ -20,6 +20,7 @@ Release: %{baserelease}%{?dist} Source: %{?source_url}%{name}-%{version}.tar.bz2 # Patches +Patch1: elfutils-0.166-elfcmp-comp-gcc6.patch Requires: elfutils-libelf%{depsuffix} = %{version}-%{release} Requires: elfutils-libs%{depsuffix} = %{version}-%{release} @@ -163,6 +164,7 @@ profiling) of processes. %setup -q # Apply patches +%patch1 -p1 -b .elfcmp_gcc6 find . -name \*.sh ! -perm -0100 -print | xargs chmod +x @@ -299,6 +301,9 @@ rm -rf ${RPM_BUILD_ROOT} %endif %changelog +* Thu Apr 14 2016 Mark Wielaard - 0.166-2 +- Add elfutils-0.166-elfcmp-comp-gcc6.patch + * Thu Mar 31 2016 Mark Wielaard - 0.166-1 - Upgrade to elfutils-0.166 Drop upstreamed patches: