Accepting request 452963 from openSUSE:Factory:zSystems
enable build on s390x OBS-URL: https://build.opensuse.org/request/show/452963 OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=7
This commit is contained in:
parent
92f19253c5
commit
5d8a0ba942
16
benchmark-s390.patch
Normal file
16
benchmark-s390.patch
Normal file
@ -0,0 +1,16 @@
|
||||
Index: benchmark-1.0.0/src/cycleclock.h
|
||||
===================================================================
|
||||
--- benchmark-1.0.0.orig/src/cycleclock.h
|
||||
+++ benchmark-1.0.0/src/cycleclock.h
|
||||
@@ -124,6 +124,11 @@ inline BENCHMARK_ALWAYS_INLINE int64_t N
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, nullptr);
|
||||
return static_cast<int64_t>(tv.tv_sec) * 1000000 + tv.tv_usec;
|
||||
+#elif defined(__s390__)
|
||||
+ // found this for papi package
|
||||
+ unsigned long long ret;
|
||||
+ __asm__("stck 0(%0)" : : "a" (&(ret)) : "memory", "cc");
|
||||
+ return (long long)ret;
|
||||
#else
|
||||
// The soft failover to a generic implementation is automatic only for ARM.
|
||||
// For other platforms the developer is expected to make an attempt to create
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 27 14:28:26 UTC 2017 - bg@suse.com
|
||||
|
||||
- add support for s390x
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 12 13:43:21 CET 2016 - ro@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package benchmark
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -26,11 +26,12 @@ License: Apache-2.0
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: https://github.com/google/benchmark
|
||||
Source: https://github.com/google/benchmark/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch: benchmark-s390.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: git-core
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
ExclusiveArch: %ix86 x86_64 s390x
|
||||
|
||||
%description
|
||||
A library to support the benchmarking of functions, similar to unit-tests.
|
||||
@ -52,6 +53,7 @@ Development files for google benchmark library
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p1
|
||||
|
||||
%build
|
||||
%if %{__isa_bits} == 64
|
||||
|
Loading…
x
Reference in New Issue
Block a user