diff --git a/fftw-3.3.8-sw.patch b/fftw-3.3.8-sw.patch new file mode 100644 index 0000000000000000000000000000000000000000..0c4b155ebb4298207966a6efd4a8ed6b10b8669c --- /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 cd85c3c56d2d2f022bbf2cb475f7e616b850de5e..5a9d07f3fc3fd76fffa09f340b948c38032ae0c8 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