SHA256
1
0
forked from pool/benchmark
Dominique Leuenberger 2021-02-15 22:10:05 +00:00 committed by Git OBS Bridge
commit 963ca0adc3
3 changed files with 43 additions and 2 deletions

View File

@ -0,0 +1,33 @@
From d333609dccb5fcc6d002da6884712148f1beaf81 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@inbox.ru>
Date: Thu, 15 Oct 2020 09:12:40 +0100
Subject: [PATCH] src/benchmark_register.h: add missing <limits> inclusion
(#1060)
Noticed missing header when was building llvm with gcc-11:
```
llvm-project/llvm/utils/benchmark/src/benchmark_register.h:17:30:
error: 'numeric_limits' is not a member of 'std'
17 | static const T kmax = std::numeric_limits<T>::max();
| ^~~~~~~~~~~~~~
```
---
src/benchmark_register.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/benchmark_register.h b/src/benchmark_register.h
index 61377d7..204bf1d 100644
--- a/src/benchmark_register.h
+++ b/src/benchmark_register.h
@@ -1,6 +1,7 @@
#ifndef BENCHMARK_REGISTER_H
#define BENCHMARK_REGISTER_H
+#include <limits>
#include <vector>
#include "check.h"
--
2.30.0

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 8 21:56:31 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
- Add upstream patch to fix build with GCC 11 (boo#1181865):
* 0001-src-benchmark_register.h-add-missing-limits-inclusio.patch
-------------------------------------------------------------------
Tue Dec 29 15:45:59 UTC 2020 - Martin Pluskal <mpluskal@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package benchmark
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,6 +25,8 @@ Summary: A microbenchmark support library
License: Apache-2.0
URL: https://github.com/google/benchmark
Source: https://github.com/google/benchmark/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM
Patch0: 0001-src-benchmark_register.h-add-missing-limits-inclusio.patch
BuildRequires: cmake >= 3.5.1
BuildRequires: gcc-c++
BuildRequires: git-core
@ -49,7 +51,7 @@ Requires: %{soname}%{sover} = %{version}
Development files for google benchmark library
%prep
%autosetup
%autosetup -p1
%build
sed -e 's|lib_install_dir "lib/"|lib_install_dir "%{_libdir}/"|g' \