From e159d2f16ce7e75bb127ab0f57a508167baf5510 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Tue, 9 May 2023 17:19:39 -0400 Subject: Remove -Wno-... from pkg-config files Lintian dislikes -W flags in pkg-config files, even if those flags disable warnings. --- debian/patches/pkg-config-directives.diff | 21 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 22 insertions(+) create mode 100644 debian/patches/pkg-config-directives.diff diff --git a/debian/patches/pkg-config-directives.diff b/debian/patches/pkg-config-directives.diff new file mode 100644 index 00000000..726d6aec --- /dev/null +++ b/debian/patches/pkg-config-directives.diff @@ -0,0 +1,21 @@ +From: Benjamin Barenblat +Subject: Do not propagate -Wno-... flags into pkg-config files +Forwarded: not-needed + +Lintian doesn't like any -W flags in pkg-config files, even if those flags +disable warnings. + +--- a/CMake/AbseilHelpers.cmake ++++ b/CMake/AbseilHelpers.cmake +@@ -187,10 +187,7 @@ + endif() + endforeach() + foreach(cflag ${ABSL_CC_LIB_COPTS}) +- if(${cflag} MATCHES "^(-Wno|/wd)") +- # These flags are needed to suppress warnings that might fire in our headers. +- set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") +- elseif(${cflag} MATCHES "^(-W|/w[1234eo])") ++ if(${cflag} MATCHES "^(-W|/w[1234eo])") + # Don't impose our warnings on others. + elseif(${cflag} MATCHES "^-m") + # Don't impose CPU instruction requirements on others, as diff --git a/debian/patches/series b/debian/patches/series index 4bc01f60..29630f3c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ cpu-features.diff latomic.diff empty-flags-library.diff cordz-info-statistics-test.diff +pkg-config-directives.diff -- cgit v1.2.3