Fix build for https://fedoraproject.org/wiki/Changes/PortingToModernC
https://github.com/openucx/ucx/pull/9558
This commit is contained in:
parent
38482f5627
commit
a3b578b2e1
29
9558.patch
Normal file
29
9558.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 99264b7352e9b89bfa8cfb2862a9fabd9eb5d764 Mon Sep 17 00:00:00 2001
|
||||
From: Yaakov Selkowitz <yselkowi@redhat.com>
|
||||
Date: Tue, 19 Dec 2023 13:13:25 -0500
|
||||
Subject: [PATCH] BUILD/CONFIG: Keep CFLAGS and CXXFLAGS separate
|
||||
|
||||
If configured with CFLAGS containing flags which are specific to C and invalid in CXX, this results in errors when compiling src/tools/perf/lib/uc[pt]_tests.cc:
|
||||
|
||||
```
|
||||
cc1plus: error: '-Werror=' argument '-Werror=implicit-function-declaration' is not valid for C++ [-Werror]
|
||||
cc1plus: error: '-Werror=' argument '-Werror=implicit-int' is not valid for C++ [-Werror]
|
||||
```
|
||||
This is currently breaking the build in Fedora 40 (rawhide) and ELN (the future RHEL 10).
|
||||
---
|
||||
config/m4/compiler.m4 | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/config/m4/compiler.m4 b/config/m4/compiler.m4
|
||||
index 6aa3360e76a..2719e98983b 100644
|
||||
--- a/config/m4/compiler.m4
|
||||
+++ b/config/m4/compiler.m4
|
||||
@@ -222,7 +222,7 @@ AC_DEFUN([CHECK_COMPILER_FLAG],
|
||||
[
|
||||
AC_MSG_CHECKING([compiler flag $1])
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
- SAVE_CXXFLAGS="$CFLAGS"
|
||||
+ SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CFLAGS="$BASE_CFLAGS $CFLAGS $2"
|
||||
CXXFLAGS="$BASE_CXXFLAGS $CXXFLAGS $2"
|
||||
AC_LINK_IFELSE([$3],
|
5
ucx.spec
5
ucx.spec
@ -28,6 +28,9 @@ License: BSD-3-Clause AND MIT AND CC-PDDC AND (BSD-3-Clause OR Apache-2.0)
|
||||
|
||||
URL: http://www.openucx.org
|
||||
Source: https://github.com/openucx/%{name}/releases/download/v%{version}/ucx-%{version}.tar.gz
|
||||
# BUILD/CONFIG: Keep CFLAGS and CXXFLAGS separate
|
||||
# Fixes build for https://fedoraproject.org/wiki/Changes/PortingToModernC
|
||||
Patch0: https://github.com/openucx/%{name}/pull/9558.patch
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
Prefix: %{_prefix}
|
||||
@ -94,6 +97,8 @@ Provides header files and examples for developing with UCX.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P0 -p1
|
||||
autoreconf -fiv
|
||||
|
||||
%build
|
||||
# Fix incorrect declaration
|
||||
|
Loading…
Reference in New Issue
Block a user