From e3bc6e62f5685fe1038f3b6cb7b9e088292c4a3d Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 13 Jun 2023 15:23:34 +0800 Subject: [PATCH] sw-20230613 --- fftw-3.3.8-sw.patch | 50 +++++++++++++++++++++++++++++++++++++++++++++ fftw.spec | 8 ++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 fftw-3.3.8-sw.patch diff --git a/fftw-3.3.8-sw.patch b/fftw-3.3.8-sw.patch new file mode 100644 index 0000000..0c4b155 --- /dev/null +++ b/fftw-3.3.8-sw.patch @@ -0,0 +1,50 @@ +diff -Naur fftw-3.3.8.org/kernel/cycle.h fftw-3.3.8.sw/kernel/cycle.h +--- fftw-3.3.8.org/kernel/cycle.h 2018-05-24 20:03:22.000000000 +0800 ++++ fftw-3.3.8.sw/kernel/cycle.h 2023-06-13 15:19:12.350440541 +0800 +@@ -385,6 +385,46 @@ + #define HAVE_TICK_COUNTER + #endif + /*----------------------------------------------------------------*/ ++#if defined(__GNUC__) && defined(__sw_64__) && !defined(HAVE_TICK_COUNTER) ++/* ++ * The 32-bit cycle counter on sw_64 overflows pretty quickly, ++ * unfortunately. A 1GHz machine overflows in 4 seconds. ++ */ ++typedef unsigned int ticks; ++ ++static __inline__ ticks getticks(void) ++{ ++ unsigned long cc; ++ __asm__ __volatile__ ("rpcc %0" : "=r"(cc)); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline__) ++ ++#define HAVE_TICK_COUNTER ++#endif ++ ++/*----------------------------------------------------------------*/ ++#if defined(__GNUC__) && defined(__sw_64__) && !defined(HAVE_TICK_COUNTER) ++/* ++ * The 32-bit cycle counter on sw_64 overflows pretty quickly, ++ * unfortunately. A 1GHz machine overflows in 4 seconds. ++ */ ++typedef unsigned int ticks; ++ ++static __inline__ ticks getticks(void) ++{ ++ unsigned long cc; ++ __asm__ __volatile__ ("rpcc %0" : "=r"(cc)); ++ return (cc & 0xFFFFFFFF); ++} ++ ++INLINE_ELAPSED(__inline__) ++ ++#define HAVE_TICK_COUNTER ++#endif ++ ++/*----------------------------------------------------------------*/ + #if defined(__GNUC__) && defined(__alpha__) && !defined(HAVE_TICK_COUNTER) + /* + * The 32-bit cycle counter on alpha overflows pretty quickly, diff --git a/fftw.spec b/fftw.spec index cd85c3c..5a9d07f 100644 --- a/fftw.spec +++ b/fftw.spec @@ -14,7 +14,7 @@ Name: fftw Version: 3.3.8 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A Fast Fourier Transform library License: GPLv2+ URL: http://www.fftw.org @@ -46,7 +46,7 @@ BuildRequires: openmpi-devel BuildRequires: environment-modules %endif BuildRequires: make - +Patch1: fftw-3.3.8-sw.patch %description FFTW is a C subroutine library for computing the Discrete Fourier @@ -269,6 +269,7 @@ library. %prep %setup -q +%autosetup -p1 %build # Explicitly load shell support for the environment-modules package, used @@ -543,6 +544,9 @@ done %endif %changelog +* Tue Jun 13 2023 wuxiat - 3.3.8-13 +- add sw patch + * Mon Aug 09 2021 Mohan Boddu - 3.3.8-12 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 -- Gitee