diff --git a/344.patch b/344.patch new file mode 100644 index 0000000..209d7e7 --- /dev/null +++ b/344.patch @@ -0,0 +1,24 @@ +From a98771f469cc02145fd315b9d801847a43b9348f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= + <30413512+eclipseo@users.noreply.github.com> +Date: Wed, 18 Aug 2021 20:51:04 +0200 +Subject: [PATCH] Cast __ppc_get_timebase_freq to double + +Fix #343 +--- + hwy/nanobenchmark.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hwy/nanobenchmark.cc b/hwy/nanobenchmark.cc +index a932e10..9a2e54c 100644 +--- a/hwy/nanobenchmark.cc ++++ b/hwy/nanobenchmark.cc +@@ -400,7 +400,7 @@ double NominalClockRate() { + + double InvariantTicksPerSecond() { + #if HWY_ARCH_PPC +- return __ppc_get_timebase_freq(); ++ return double(__ppc_get_timebase_freq()); + #elif HWY_ARCH_X86 + // We assume the TSC is invariant; it is on all recent Intel/AMD CPUs. + return NominalClockRate(); diff --git a/highway.spec b/highway.spec index 06817d5..db6b05e 100644 --- a/highway.spec +++ b/highway.spec @@ -13,6 +13,8 @@ Summary: Efficient and performance-portable SIMD License: ASL 2.0 URL: https://github.com/google/highway Source0: %url/archive/%{version}/%{name}-%{version}.tar.gz +# https://github.com/google/highway/issues/343 +Patch0: https://github.com/google/highway/pull/344.patch BuildRequires: cmake BuildRequires: gcc-c++