diff --git a/0001-src-benchmark_register.h-add-missing-limits-inclusio.patch b/0001-src-benchmark_register.h-add-missing-limits-inclusio.patch new file mode 100644 index 0000000..82815ca --- /dev/null +++ b/0001-src-benchmark_register.h-add-missing-limits-inclusio.patch @@ -0,0 +1,33 @@ +From d333609dccb5fcc6d002da6884712148f1beaf81 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 15 Oct 2020 09:12:40 +0100 +Subject: [PATCH] src/benchmark_register.h: add missing 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::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 + #include + + #include "check.h" +-- +2.30.0 + diff --git a/benchmark.changes b/benchmark.changes index aa0bbe8..19f8cbc 100644 --- a/benchmark.changes +++ b/benchmark.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 8 21:56:31 UTC 2021 - Christophe Giboudeaux + +- 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 diff --git a/benchmark.spec b/benchmark.spec index 890999a..dacc90b 100644 --- a/benchmark.spec +++ b/benchmark.spec @@ -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' \