From 5d8a0ba9420a329c4124530e4702cadf36390bfc8dcafd4529ee5a5ccb42860e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 27 Jan 2017 14:43:29 +0000 Subject: [PATCH 1/4] 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 --- benchmark-s390.patch | 16 ++++++++++++++++ benchmark.changes | 5 +++++ benchmark.spec | 6 ++++-- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 benchmark-s390.patch diff --git a/benchmark-s390.patch b/benchmark-s390.patch new file mode 100644 index 0000000..3334330 --- /dev/null +++ b/benchmark-s390.patch @@ -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(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 diff --git a/benchmark.changes b/benchmark.changes index 5ca5f92..ecc5147 100644 --- a/benchmark.changes +++ b/benchmark.changes @@ -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 diff --git a/benchmark.spec b/benchmark.spec index a7dacfc..7962504 100644 --- a/benchmark.spec +++ b/benchmark.spec @@ -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 From f9261c4bbc23e0a54346b1a18d65ac6e74b81dce3af23f43f7d018916bbcb588 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 27 Jan 2017 14:50:46 +0000 Subject: [PATCH 2/4] - Update to version 1.1.0: * ArgNames support * Fixes for OSX and Cygwin and MSVC builds * PauseTiming and ResumeTiming are per thread (#286) * Better Range and Arg specifications * Complexity reporting OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=8 --- benchmark-1.0.0.tar.gz | 3 --- benchmark-1.1.0.tar.gz | 3 +++ benchmark-s390.patch | 8 ++++---- benchmark.changes | 10 ++++++++++ benchmark.spec | 11 +++++------ 5 files changed, 22 insertions(+), 13 deletions(-) delete mode 100644 benchmark-1.0.0.tar.gz create mode 100644 benchmark-1.1.0.tar.gz diff --git a/benchmark-1.0.0.tar.gz b/benchmark-1.0.0.tar.gz deleted file mode 100644 index cbd03d8..0000000 --- a/benchmark-1.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2206c263fc1a7803d4b10e164e0c225f6bcf0d5e5f20b87929f137dee247b54 -size 58944 diff --git a/benchmark-1.1.0.tar.gz b/benchmark-1.1.0.tar.gz new file mode 100644 index 0000000..f531579 --- /dev/null +++ b/benchmark-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7334dd254434c6668e33a54c8f839194c7c61840d52f4b6258eee28e9f3b20e +size 87199 diff --git a/benchmark-s390.patch b/benchmark-s390.patch index 3334330..c0cbda2 100644 --- a/benchmark-s390.patch +++ b/benchmark-s390.patch @@ -1,8 +1,8 @@ -Index: benchmark-1.0.0/src/cycleclock.h +Index: 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 +--- src/cycleclock.h.orig ++++ src/cycleclock.h +@@ -132,6 +132,11 @@ inline BENCHMARK_ALWAYS_INLINE int64_t N struct timeval tv; gettimeofday(&tv, nullptr); return static_cast(tv.tv_sec) * 1000000 + tv.tv_usec; diff --git a/benchmark.changes b/benchmark.changes index ecc5147..1ed88ec 100644 --- a/benchmark.changes +++ b/benchmark.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jan 27 14:46:11 UTC 2017 - mpluskal@suse.com + +- Update to version 1.1.0: + * ArgNames support + * Fixes for OSX and Cygwin and MSVC builds + * PauseTiming and ResumeTiming are per thread (#286) + * Better Range and Arg specifications + * Complexity reporting + ------------------------------------------------------------------- Fri Jan 27 14:28:26 UTC 2017 - bg@suse.com diff --git a/benchmark.spec b/benchmark.spec index 7962504..1a6f90c 100644 --- a/benchmark.spec +++ b/benchmark.spec @@ -19,18 +19,18 @@ %define soname lib%{name} %define sover 0 Name: benchmark -Version: 1.0.0 +Version: 1.1.0 Release: 0 Summary: A microbenchmark support library 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-FEATURE-UPSTREAM benchmark-s390.patch Patch: benchmark-s390.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: git-core -BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %ix86 x86_64 s390x %description @@ -53,7 +53,7 @@ Development files for google benchmark library %prep %setup -q -%patch -p1 +%patch %build %if %{__isa_bits} == 64 @@ -61,9 +61,8 @@ sed -i "s|LIBRARY DESTINATION lib|LIBRARY DESTINATION lib64|g" src/CMakeLists.tx %endif %cmake \ -DBENCHMARK_ENABLE_LTO=off \ - -DBENCHMARK_ENABLE_TESTING=true \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo -make %{?_smp_mflags} + -DBENCHMARK_ENABLE_TESTING=true +%make_jobs %install %cmake_install From 336e0dc7c5905c3c5390628deea92c28af47b0823932ca07743292fc6a8be23b Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 27 Jan 2017 15:17:49 +0000 Subject: [PATCH 3/4] - add support for s390x benchmark-s390.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=9 --- benchmark.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark.changes b/benchmark.changes index 1ed88ec..7446b04 100644 --- a/benchmark.changes +++ b/benchmark.changes @@ -11,7 +11,7 @@ Fri Jan 27 14:46:11 UTC 2017 - mpluskal@suse.com ------------------------------------------------------------------- Fri Jan 27 14:28:26 UTC 2017 - bg@suse.com -- add support for s390x +- add support for s390x benchmark-s390.patch ------------------------------------------------------------------- Sat Nov 12 13:43:21 CET 2016 - ro@suse.de From a1eb8fab4593b5316eb1771f304c00fc7217d1b70f7692a1c63b96dce17c7889 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 27 Jan 2017 15:19:02 +0000 Subject: [PATCH 4/4] - add support for s390x: * benchmark-s390.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools/benchmark?expand=0&rev=10 --- benchmark.changes | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/benchmark.changes b/benchmark.changes index 7446b04..5df1a6e 100644 --- a/benchmark.changes +++ b/benchmark.changes @@ -11,7 +11,8 @@ Fri Jan 27 14:46:11 UTC 2017 - mpluskal@suse.com ------------------------------------------------------------------- Fri Jan 27 14:28:26 UTC 2017 - bg@suse.com -- add support for s390x benchmark-s390.patch +- add support for s390x: + * benchmark-s390.patch ------------------------------------------------------------------- Sat Nov 12 13:43:21 CET 2016 - ro@suse.de