From 613bc2470d5d7d8474b48f8cb60200ae9e7e7bb1 Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Feb 01 2022 00:06:00 +0000 Subject: Switched to the upstream patch to fix compilation on the s390x --- diff --git a/uhd-4.1.0.5-s390x-build-fix.patch b/uhd-4.1.0.5-s390x-build-fix.patch index d4b1e45..b843d80 100644 --- a/uhd-4.1.0.5-s390x-build-fix.patch +++ b/uhd-4.1.0.5-s390x-build-fix.patch @@ -1,10 +1,46 @@ -diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt -index 639b3e9..abd4e0f 100644 ---- a/host/lib/utils/CMakeLists.txt -+++ b/host/lib/utils/CMakeLists.txt -@@ -243,3 +243,5 @@ if(ENABLE_C_API) - ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority_c.cpp - ) - endif(ENABLE_C_API) +diff --git a/host/cmake/Modules/UHDAtomics.cmake b/host/cmake/Modules/UHDAtomics.cmake +index 4d53a2d..e206f39 100644 +--- a/host/cmake/Modules/UHDAtomics.cmake ++++ b/host/cmake/Modules/UHDAtomics.cmake +@@ -33,6 +33,16 @@ function(CHECK_WORKING_CXX_ATOMICS64 varname) + " ${varname}) + endfunction(CHECK_WORKING_CXX_ATOMICS64) + ++function(CHECK_WORKING_CXX_BOOST_ATOMICS varname) ++ CHECK_CXX_SOURCE_COMPILES(" ++ #include ++ boost::lockfree::queue queue(1); ++ int main() { ++ return queue.is_lock_free(); ++ } ++ " ${varname}) ++endfunction(CHECK_WORKING_CXX_BOOST_ATOMICS) + -+LIBUHD_APPEND_LIBS(atomic) + macro(CHECK_ATOMICS_LIB_REQUIRED required_var) + set(${required_var} FALSE) + if(MSVC) +@@ -76,5 +86,24 @@ macro(CHECK_ATOMICS_LIB_REQUIRED required_var) + "Host compiler appears to require libatomic for 64-bit operations, but cannot find it.") + endif() + endif() ++ # Check whether boost requires atomic. ++ CHECK_WORKING_CXX_BOOST_ATOMICS(HAVE_CXX_BOOST_ATOMICS_WITHOUT_LIB) ++ # If not, check if the library exists, and atomics work with it. ++ if(NOT HAVE_CXX_BOOST_ATOMICS_WITHOUT_LIB) ++ check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC) ++ if(HAVE_LIBATOMIC) ++ set(${required_var} TRUE) ++ set(CMAKE_REQUIRED_LIBRARIES "atomic") ++ CHECK_WORKING_CXX_BOOST_ATOMICS(HAVE_CXX_BOOST_ATOMICS_WITH_LIB) ++ unset(CMAKE_REQUIRED_LIBRARIES) ++ if (NOT HAVE_CXX_BOOST_ATOMICS_WITH_LIB) ++ message(FATAL_ERROR "Host compiler must support std::atomic!") ++ endif() ++ else() ++ message( ++ FATAL_ERROR ++ "Host compiler appears to require libatomic, but cannot find it.") ++ endif() ++ endif() + endif() + endmacro(CHECK_ATOMICS_LIB_REQUIRED) diff --git a/uhd.spec b/uhd.spec index 97f307f..b68836c 100644 --- a/uhd.spec +++ b/uhd.spec @@ -32,7 +32,7 @@ URL: http://github.com/EttusResearch/uhd Version: 4.1.0.5 #%%global images_ver %%{version} %global images_ver 4.1.0.4 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ BuildRequires: make BuildRequires: gcc-c++ @@ -283,6 +283,9 @@ exit 0 %endif %changelog +* Tue Feb 1 2022 Jaroslav Škarvada - 4.1.0.5-5 +- Switched to the upstream patch to fix compilation on the s390x + * Fri Jan 28 2022 Jaroslav Škarvada - 4.1.0.5-4 - Fixed images path