From 0a9adfc498d2e3cfcb3c8e67e53463beefdb10ff Mon Sep 17 00:00:00 2001 From: Guido Aulisi Date: Sun, 15 Mar 2020 01:26:32 +0100 Subject: [PATCH] Rebuilt for possible GCC 10 bug on power64 and arm On ppc64le this piece of code in sord.c does not correctly evaluate the exit condition when O2 optimization is used. It seems that the end of the iterator is never evaluated. // Free quads ZixBTreeIter* t = zix_btree_begin(model->indices[DEFAULT_ORDER]); for (; !zix_btree_iter_is_end(t); zix_btree_iter_increment(t)) { free(zix_btree_get(t)); } zix_btree_iter_free(t); See sord.c line 748 --- sord.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sord.spec b/sord.spec index e1fa54b..a121b35 100644 --- a/sord.spec +++ b/sord.spec @@ -3,7 +3,7 @@ Name: sord Version: 0.16.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A lightweight Resource Description Framework (RDF) C library License: ISC @@ -44,6 +44,12 @@ sed -i -e "s|bld.add_post_fun(autowaf.run_ldconfig)||" \ %build %set_build_flags +# Work around a possible GCC 10 bug +# GCC 10 crashes on these arches in for loop with ZixBTreeIter +%ifarch %{power64} %{arm} aarch64 +CFLAGS+=" -O1" +CXXFLAGS+=" -O1" +%endif export LINKFLAGS="%{__global_ldflags}" python3 waf configure \ --prefix=%{_prefix} \ @@ -78,6 +84,9 @@ install -pm 644 AUTHORS NEWS README.md COPYING %{buildroot}%{_pkgdocdir} %{_mandir}/man3/%{name}*.3* %changelog +* Sun Mar 15 2020 Guido Aulisi - 0.16.4-3 +- Rebuilt for possible GCC 10 bug on power64 and arm + * Thu Jan 30 2020 Fedora Release Engineering - 0.16.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild