From ea42b8a4e9daadfa52aa07f70cf95d70ea607920 Mon Sep 17 00:00:00 2001 From: Marcos Paulo de Souza Date: Fri, 16 Aug 2024 10:48:34 -0300 Subject: [PATCH] libcextract: ArgvParser: Disable Wduplicate-decl-specifier error This happens on recent kernel tree due to issues with LLVM. As we don't need any backends and only need to parse the source code we can disable the warning and move on. For more information about the issue take a look into https://github.com/ClangBuiltLinux/linux/issues/2013 and https://github.com/llvm/llvm-project/issues/93449. Signed-off-by: Marcos Paulo de Souza --- libcextract/ArgvParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libcextract/ArgvParser.cpp b/libcextract/ArgvParser.cpp index 5c910c4..d22d500 100644 --- a/libcextract/ArgvParser.cpp +++ b/libcextract/ArgvParser.cpp @@ -115,6 +115,9 @@ void ArgvParser::Insert_Required_Parameters(void) "-Wno-unused-function", // May happen when trying to extract a static function. "-Wno-unused-variable", // Passes may instroduce unused variables later removed. "-fno-builtin", // clang interposes some glibc functions and then it fails to find the declaration of them. + "-Wno-duplicate-decl-specifier", // Disabled due to kernel issues. See more + // at https://github.com/ClangBuiltLinux/linux/issues/2013 + // and https://github.com/llvm/llvm-project/issues/93449 }; for (const char *arg : priv_args) {