- Fix broken configure files compromised by LTO

This commit is contained in:
Jeff Law 2020-07-20 18:48:42 -06:00
parent 54470fd6cc
commit ae03cd88e6
2 changed files with 32 additions and 1 deletions

26
ucx-config.patch Normal file
View File

@ -0,0 +1,26 @@
diff --git a/config/m4/sysdep.m4 b/config/m4/sysdep.m4
index b1e5485..0133803 100644
--- a/config/m4/sysdep.m4
+++ b/config/m4/sysdep.m4
@@ -158,7 +158,7 @@ AC_MSG_CHECKING([malloc hooks])
SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $CFLAGS_NO_DEPRECATED"
CHECK_CROSS_COMP([AC_LANG_SOURCE([#include <malloc.h>
- static int rc = 1;
+ static volatile int rc = 1;
void *ptr;
void *myhook(size_t size, const void *caller) {
rc = 0;
diff --git a/configure b/configure
index db54a6a..fa4352d 100755
--- a/configure
+++ b/configure
@@ -22221,7 +22221,7 @@ CFLAGS="$CFLAGS $CFLAGS_NO_DEPRECATED"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <malloc.h>
- static int rc = 1;
+ volatile static int rc = 1;
void *ptr;
void *myhook(size_t size, const void *caller) {
rc = 0;

View File

@ -16,12 +16,13 @@
Name: ucx
Version: 1.8.1
Release: 1%{?dist}
Release: 2%{?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
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@ -87,6 +88,7 @@ Provides header files and examples for developing with UCX.
%prep
%setup -q
%patch -p1
%build
%define _with_arg() %{expand:%%{?with_%{1}:--with-%{2}}%%{!?with_%{1}:--without-%{2}}}
@ -287,6 +289,9 @@ process to map the memory of another process into its virtual address space.
%changelog
* Mon Jul 20 2020 Jeff Law <law@redhat.com> 1.8.1-2
- Fix broken configure files compromised by LTO
* Wed Jul 1 2020 Yossi Itigin <yosefe@mellanox.com> 1.8.1-1
- Bump version to 1.8.1
* Sun Sep 22 2019 Yossi Itigin <yosefe@mellanox.com> 1.8.0-1