mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
parent
c6cbe4cbcd
commit
f15b006deb
2 changed files with 71 additions and 1 deletions
70
srcpkgs/fftw/patches/clock-gettime.patch
Normal file
70
srcpkgs/fftw/patches/clock-gettime.patch
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
From 8fdc7b71354fbbbbc68fa8b2b810610ee41e052f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frank Hartmann <frank.hartmann@dreamchip.de>
|
||||||
|
Date: Fri, 5 Jan 2018 21:27:23 +0100
|
||||||
|
Subject: [PATCH 1/2] linux: avoid using CLOCK_SGI_CYCLE
|
||||||
|
|
||||||
|
The call clock_gettime(CLOCK_SGI_CYCLE, &t) from function getticks() fails with EINVAL.
|
||||||
|
See : http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/time.h#L62 - "The driver implementing this got removed. The clock ID is kept as a place holder. Do not reuse!"
|
||||||
|
---
|
||||||
|
kernel/cycle.h | 14 ++++++++++++--
|
||||||
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/kernel/cycle.h b/kernel/cycle.h
|
||||||
|
index fe3dd50d6..21d206e35 100644
|
||||||
|
--- a/kernel/cycle.h
|
||||||
|
+++ b/kernel/cycle.h
|
||||||
|
@@ -437,8 +437,18 @@ INLINE_ELAPSED(__inline)
|
||||||
|
#define HAVE_TICK_COUNTER
|
||||||
|
#endif
|
||||||
|
/*----------------------------------------------------------------*/
|
||||||
|
-/* SGI/Irix */
|
||||||
|
-#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_SGI_CYCLE) && !defined(HAVE_TICK_COUNTER) && !defined(__ANDROID__)
|
||||||
|
+/* SGI/Irix/Linux but not android */
|
||||||
|
+#if !defined(__ANDROID__)
|
||||||
|
+#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
|
||||||
|
+#if defined(CLOCK_MONOTONIC)
|
||||||
|
+#define METHOD CLOCK_MONOTONIC
|
||||||
|
+#elif defined(CLOCK_REALTIME)
|
||||||
|
+#define METHOD CLOCK_REALTIME
|
||||||
|
+#elif defined(CLOCK_SGI_CYCLE)
|
||||||
|
+#define METHOD CLOCK_SGI_CYCLE
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
typedef struct timespec ticks;
|
||||||
|
|
||||||
|
static inline ticks getticks(void)
|
||||||
|
|
||||||
|
From c68b27dedad182b0b222502d98cc9795787c2607 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frank Hartmann <frank.hartmann@dreamchip.de>
|
||||||
|
Date: Sun, 14 Jan 2018 16:52:30 +0100
|
||||||
|
Subject: [PATCH 2/2] linux: avoid using CLOCK_SGI_CYCLE, use METHOD
|
||||||
|
|
||||||
|
---
|
||||||
|
kernel/cycle.h | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/kernel/cycle.h b/kernel/cycle.h
|
||||||
|
index 21d206e35..777d1cda5 100644
|
||||||
|
--- a/kernel/cycle.h
|
||||||
|
+++ b/kernel/cycle.h
|
||||||
|
@@ -438,8 +438,8 @@ INLINE_ELAPSED(__inline)
|
||||||
|
#endif
|
||||||
|
/*----------------------------------------------------------------*/
|
||||||
|
/* SGI/Irix/Linux but not android */
|
||||||
|
-#if !defined(__ANDROID__)
|
||||||
|
-#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
|
||||||
|
+#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER)
|
||||||
|
+#if defined(HAVE_CLOCK_GETTIME)
|
||||||
|
#if defined(CLOCK_MONOTONIC)
|
||||||
|
#define METHOD CLOCK_MONOTONIC
|
||||||
|
#elif defined(CLOCK_REALTIME)
|
||||||
|
@@ -454,7 +454,7 @@ typedef struct timespec ticks;
|
||||||
|
static inline ticks getticks(void)
|
||||||
|
{
|
||||||
|
struct timespec t;
|
||||||
|
- clock_gettime(CLOCK_SGI_CYCLE, &t);
|
||||||
|
+ clock_gettime(METHOD, &t);
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'fftw'
|
# Template file for 'fftw'
|
||||||
pkgname=fftw
|
pkgname=fftw
|
||||||
version=3.3.10
|
version=3.3.10
|
||||||
revision=2
|
revision=3
|
||||||
hostmakedepends="libtool automake cmake-bootstrap"
|
hostmakedepends="libtool automake cmake-bootstrap"
|
||||||
makedepends="libgomp-devel"
|
makedepends="libgomp-devel"
|
||||||
short_desc="Library for computing the discrete Fourier transform (DFT)"
|
short_desc="Library for computing the discrete Fourier transform (DFT)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue