diff --git a/ucx-gcc11.patch b/ucx-gcc11.patch new file mode 100644 index 0000000..7d887ed --- /dev/null +++ b/ucx-gcc11.patch @@ -0,0 +1,13 @@ +diff --git a/src/ucs/datastruct/mpool.inl b/src/ucs/datastruct/mpool.inl +index d06e2f9..6b32406 100644 +--- a/src/ucs/datastruct/mpool.inl ++++ b/src/ucs/datastruct/mpool.inl +@@ -71,7 +71,7 @@ static inline ucs_mpool_t *ucs_mpool_obj_owner(void *obj) + + static inline void ucs_mpool_put_inline(void *obj) + { +- ucs_mpool_elem_t *elem; ++ ucs_mpool_elem_t * volatile elem; + ucs_mpool_t *mp; + + elem = ucs_mpool_obj_to_elem(obj); diff --git a/ucx.spec b/ucx.spec index 9bcee2d..b01298f 100644 --- a/ucx.spec +++ b/ucx.spec @@ -16,13 +16,16 @@ Name: ucx Version: 1.8.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: UCX is a communication library implementing high-performance messaging License: BSD URL: http://www.openucx.org Source: https://github.com/openucx/%{name}/releases/download/v1.8.1/ucx-1.8.1.tar.gz Patch: ucx-config.patch +# This avoids a false positive from gcc-11 by making the problematic +# pointer volatile rather than disabling the warning completely +Patch1: %{name}-gcc11.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -89,11 +92,9 @@ Provides header files and examples for developing with UCX. %prep %setup -q %patch -p1 +%patch1 -p1 %build -# gcc-11 emits a diagnostic for some fishy casting. The code is probably OK. -# Disable the diagnostic for now -export CFLAGS="$RPM_OPT_FLAGS -Wno-array-bounds" %define _with_arg() %{expand:%%{?with_%{1}:--with-%{2}}%%{!?with_%{1}:--without-%{2}}} %define _enable_arg() %{expand:%%{?with_%{1}:--enable-%{2}}%%{!?with_%{1}:--disable-%{2}}} %configure --disable-optimizations \ @@ -292,6 +293,9 @@ process to map the memory of another process into its virtual address space. %changelog +* Fri Oct 30 2020 Jeff Law 1.8.1-5 +- Adjust workaround for gcc-11 diagnostic to narrow its scope + * Thu Oct 29 2020 Jeff Law 1.8.1-4 - Disable -Warray-bounds diagnostics for gcc-11