!10 解决软件包cppcheck在mainline的编译失败问题

From: @tushenmei
Reviewed-by: @yanglijin
Signed-off-by: @yanglijin
This commit is contained in:
openeuler-ci-bot 2021-08-10 11:34:00 +00:00 committed by Gitee
commit 3479131696
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,16 @@
diff -Nur cppcheck-1.83/cli/cppcheckexecutor.cpp cppcheck-1.83-new/cli/cppcheckexecutor.cpp
--- cppcheck-1.83/cli/cppcheckexecutor.cpp 2018-04-02 15:02:50.000000000 +0800
+++ cppcheck-1.83-new/cli/cppcheckexecutor.cpp 2021-08-10 15:29:21.000000000 +0800
@@ -295,7 +295,12 @@
#endif
}
+
+#ifdef __USE_DYNAMIC_STACK_SIZE
+static const size_t MYSTACKSIZE = 16*1024+32768; // wild guess about a reasonable buffer
+#else
static const size_t MYSTACKSIZE = 16*1024+SIGSTKSZ; // wild guess about a reasonable buffer
+#endif
static char mytstack[MYSTACKSIZE]= {0}; // alternative stack for signal handler
static bool bStackBelowHeap=false; // lame attempt to locate heap vs. stack address space. See CppCheckExecutor::check_wrapper()

View File

@ -1,6 +1,6 @@
Name: cppcheck
Version: 1.83
Release: 7
Release: 8
Summary: Tool for static C/C++ code analysis
License: GPLv3+
URL: http://cppcheck.wiki.sourceforge.net/
@ -10,6 +10,7 @@ Patch0000: cppcheck-1.83-tinyxml.patch
Patch0001: cppcheck-1.81-translations.patch
Patch0002: cppcheck-1.78-cfgdir.patch
Patch0003: cppcheck-1.83-cmake.patch
Patch0004: bugfix-SIGSTKSZ-not-constant.patch
BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt cmake desktop-file-utils tinyxml2-devel >= 2.1.0
@ -62,6 +63,9 @@ cd objdir-%{_target_platform}/bin
%{_mandir}/man1/cppcheck.1*
%changelog
* Tue Aug 10 2021 Shenmei Tu <tushenmei@huawei.com> - 1.83-8
- bugfix-SIGSTKSZ-not-constant.patch
* Thu Mar 04 2021 maminjie <maminjie1@huawei.com> - 1.83-7
- Add requires python3-unversioned-command to resolve compatibility