From 41ddc5bf64a4ccbef3d25be956d2772bdd6a0e69 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 29 Oct 2020 10:58:06 -0600 Subject: [PATCH] Work around false positive diagnostic in gcc-11 --- libfido2-gcc11.patch | 12 ++++++++++++ libfido2.spec | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 libfido2-gcc11.patch diff --git a/libfido2-gcc11.patch b/libfido2-gcc11.patch new file mode 100644 index 0000000..1765779 --- /dev/null +++ b/libfido2-gcc11.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dbd5fa5..a5cdbbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,6 +133,7 @@ else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wwrite-strings") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wbad-function-cast") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-stringop-overflow") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic-errors") + check_c_compiler_flag("-fstack-protector-all" HAVE_STACK_PROTECTOR_ALL) diff --git a/libfido2.spec b/libfido2.spec index 452bda2..410fcdc 100644 --- a/libfido2.spec +++ b/libfido2.spec @@ -1,7 +1,7 @@ Name: libfido2 Version: 1.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: FIDO2 library License: BSD @@ -13,6 +13,9 @@ Source2: gpgkey-7FBB6186957496D58C751AC20E777DD85755AA4A.gpg # Upstream patch for building on 32-bit platforms # Patch0001: 0001-add-two-casts-to-silence-warnings-on-32-bit.patch +# Work around false positive from gcc-11 until its fixed upstream +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97631 +Patch0002: %{name}-gcc11.patch BuildRequires: cmake BuildRequires: hidapi-devel @@ -88,6 +91,9 @@ find %{buildroot} -type f -name "*.a" -delete -print %changelog +* Tuu Oct 29 2020 Jeff Law 1.5.0-2 +- Work around false positive diagnostic in gcc-11 + * Fri Sep 11 2020 Gary Buhrmaster 1.5.0-1 - 1.5.0 release (#1824326) - include upstream patch to fix 32-bit platform compile, reported at