mirror of
https://github.com/skeeto/w64devkit.git
synced 2025-08-09 10:02:45 +03:00
Remove Cppcheck from the distribution
I was initially impressed with its output, but over time I've found it less and less useful. I hardly use it anymore, and it would at best be neglected if left in the distribution. The build script is retained in the contrib/ directory, and it's easy to build natively from source.
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -15,7 +15,6 @@ ARG MINGW_VERSION=12.0.0
|
|||||||
ARG MPC_VERSION=1.3.1
|
ARG MPC_VERSION=1.3.1
|
||||||
ARG MPFR_VERSION=4.2.1
|
ARG MPFR_VERSION=4.2.1
|
||||||
ARG PDCURSES_VERSION=3.9
|
ARG PDCURSES_VERSION=3.9
|
||||||
ARG CPPCHECK_VERSION=2.10
|
|
||||||
ARG VIM_VERSION=9.0
|
ARG VIM_VERSION=9.0
|
||||||
|
|
||||||
RUN apt-get update && apt-get install --yes --no-install-recommends \
|
RUN apt-get update && apt-get install --yes --no-install-recommends \
|
||||||
@@ -37,8 +36,7 @@ RUN curl --insecure --location --remote-name-all --remote-header-name \
|
|||||||
http://ftp.vim.org/pub/vim/unix/vim-$VIM_VERSION.tar.bz2 \
|
http://ftp.vim.org/pub/vim/unix/vim-$VIM_VERSION.tar.bz2 \
|
||||||
https://github.com/universal-ctags/ctags/archive/refs/tags/v$CTAGS_VERSION.tar.gz \
|
https://github.com/universal-ctags/ctags/archive/refs/tags/v$CTAGS_VERSION.tar.gz \
|
||||||
https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v$MINGW_VERSION.tar.bz2 \
|
https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v$MINGW_VERSION.tar.bz2 \
|
||||||
https://downloads.sourceforge.net/project/pdcurses/pdcurses/$PDCURSES_VERSION/PDCurses-$PDCURSES_VERSION.tar.gz \
|
https://downloads.sourceforge.net/project/pdcurses/pdcurses/$PDCURSES_VERSION/PDCurses-$PDCURSES_VERSION.tar.gz
|
||||||
https://github.com/danmar/cppcheck/archive/$CPPCHECK_VERSION.tar.gz
|
|
||||||
COPY src/SHA256SUMS $PREFIX/src/
|
COPY src/SHA256SUMS $PREFIX/src/
|
||||||
RUN sha256sum -c $PREFIX/src/SHA256SUMS \
|
RUN sha256sum -c $PREFIX/src/SHA256SUMS \
|
||||||
&& tar xJf binutils-$BINUTILS_VERSION.tar.xz \
|
&& tar xJf binutils-$BINUTILS_VERSION.tar.xz \
|
||||||
@@ -54,8 +52,7 @@ RUN sha256sum -c $PREFIX/src/SHA256SUMS \
|
|||||||
&& tar xzf make-$MAKE_VERSION.tar.gz \
|
&& tar xzf make-$MAKE_VERSION.tar.gz \
|
||||||
&& tar xjf mingw-w64-v$MINGW_VERSION.tar.bz2 \
|
&& tar xjf mingw-w64-v$MINGW_VERSION.tar.bz2 \
|
||||||
&& tar xzf PDCurses-$PDCURSES_VERSION.tar.gz \
|
&& tar xzf PDCurses-$PDCURSES_VERSION.tar.gz \
|
||||||
&& tar xjf vim-$VIM_VERSION.tar.bz2 \
|
&& tar xjf vim-$VIM_VERSION.tar.bz2
|
||||||
&& tar xzf cppcheck-$CPPCHECK_VERSION.tar.gz
|
|
||||||
COPY src/w64devkit.c src/w64devkit.ico src/libmemory.c src/libchkstk.S \
|
COPY src/w64devkit.c src/w64devkit.ico src/libmemory.c src/libchkstk.S \
|
||||||
src/alias.c src/debugbreak.c src/pkg-config.c src/vc++filt.c \
|
src/alias.c src/debugbreak.c src/pkg-config.c src/vc++filt.c \
|
||||||
src/peports.c src/profile $PREFIX/src/
|
src/peports.c src/profile $PREFIX/src/
|
||||||
@@ -449,17 +446,6 @@ RUN sed -i /RT_MANIFEST/d win32/ctags.rc \
|
|||||||
OPT= CFLAGS=-Os LDFLAGS=-s \
|
OPT= CFLAGS=-Os LDFLAGS=-s \
|
||||||
&& cp ctags.exe $PREFIX/bin/
|
&& cp ctags.exe $PREFIX/bin/
|
||||||
|
|
||||||
WORKDIR /cppcheck-$CPPCHECK_VERSION
|
|
||||||
COPY src/cppcheck.mak src/cppcheck-*.patch $PREFIX/src/
|
|
||||||
RUN cat $PREFIX/src/cppcheck-*.patch | patch -p1 \
|
|
||||||
&& make -f $PREFIX/src/cppcheck.mak -j$(nproc) CXX=$ARCH-g++ \
|
|
||||||
&& mkdir $PREFIX/share/cppcheck/ \
|
|
||||||
&& cp -r cppcheck.exe cfg/ $PREFIX/share/cppcheck \
|
|
||||||
&& $ARCH-gcc -DEXE=../share/cppcheck/cppcheck.exe -DCMD=cppcheck \
|
|
||||||
-Os -fno-asynchronous-unwind-tables -Wl,--gc-sections -s -nostdlib \
|
|
||||||
-o $PREFIX/bin/cppcheck.exe \
|
|
||||||
$PREFIX/src/alias.c -lkernel32
|
|
||||||
|
|
||||||
# Pack up a release
|
# Pack up a release
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
20
README.md
20
README.md
@@ -12,7 +12,6 @@ Included tools:
|
|||||||
* [busybox-w32][bb] : standard unix utilities, including sh
|
* [busybox-w32][bb] : standard unix utilities, including sh
|
||||||
* [Vim][vim] : powerful text editor
|
* [Vim][vim] : powerful text editor
|
||||||
* [Universal Ctags][ctags] : source navigation
|
* [Universal Ctags][ctags] : source navigation
|
||||||
* [Cppcheck][cppcheck] : static code analysis
|
|
||||||
|
|
||||||
The toolchain includes pthreads, C++11 threads, and OpenMP. All included
|
The toolchain includes pthreads, C++11 threads, and OpenMP. All included
|
||||||
runtime components are static. **Docker/Podman is not required to use the
|
runtime components are static. **Docker/Podman is not required to use the
|
||||||
@@ -165,24 +164,6 @@ libraries have paths containing spaces.
|
|||||||
debugger, like using Windows' F12 debugger hotkey. Especially useful for
|
debugger, like using Windows' F12 debugger hotkey. Especially useful for
|
||||||
console subsystem programs.
|
console subsystem programs.
|
||||||
|
|
||||||
## Cppcheck tips
|
|
||||||
|
|
||||||
Use `--library=windows` for programs calling the Win32 API directly, which
|
|
||||||
adds additional checks. In general, the following configuration is a good
|
|
||||||
default for programs developed using w64devkit:
|
|
||||||
|
|
||||||
$ cppcheck --quiet -j$(nproc) --library=windows \
|
|
||||||
--suppress=uninitvar --enable=portability,performance .
|
|
||||||
|
|
||||||
A "strict" check that is more thorough, but more false positives:
|
|
||||||
|
|
||||||
$ cppcheck --quiet -j$(nproc) --library=windows \
|
|
||||||
--enable=portability,performance,style \
|
|
||||||
--suppress=uninitvar --suppress=unusedStructMember \
|
|
||||||
--suppress=constVariable --suppress=shadowVariable \
|
|
||||||
--suppress=variableScope --suppress=constParameter \
|
|
||||||
--suppress=shadowArgument --suppress=knownConditionTrueFalse .
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
`$HOME` can be set through the adjacent `w64devkit.ini` configuration, and
|
`$HOME` can be set through the adjacent `w64devkit.ini` configuration, and
|
||||||
@@ -224,7 +205,6 @@ binaries.
|
|||||||
[bb]: https://frippery.org/busybox/
|
[bb]: https://frippery.org/busybox/
|
||||||
[break]: https://nullprogram.com/blog/2022/06/26/
|
[break]: https://nullprogram.com/blog/2022/06/26/
|
||||||
[bs]: https://www.rdegges.com/2016/i-dont-give-a-shit-about-licensing/
|
[bs]: https://www.rdegges.com/2016/i-dont-give-a-shit-about-licensing/
|
||||||
[cppcheck]: https://cppcheck.sourceforge.io/
|
|
||||||
[crt]: https://nullprogram.com/blog/2023/02/15/
|
[crt]: https://nullprogram.com/blog/2023/02/15/
|
||||||
[ctags]: https://github.com/universal-ctags/ctags
|
[ctags]: https://github.com/universal-ctags/ctags
|
||||||
[debugbreak]: https://nullprogram.com/blog/2022/07/31/
|
[debugbreak]: https://nullprogram.com/blog/2022/07/31/
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 binutils-2.42.tar.xz
|
f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 binutils-2.42.tar.xz
|
||||||
e366f887a56bf6f64adff15b7b08ba487fea14c121045078437abe7217cf060d busybox-w32-FRP-5398-g89ae34445.tgz
|
e366f887a56bf6f64adff15b7b08ba487fea14c121045078437abe7217cf060d busybox-w32-FRP-5398-g89ae34445.tgz
|
||||||
785dcbf711048dfe43ae920b6eff2eeebb4a096e88188a40e173ca4c030f57c3 cppcheck-2.10.tar.gz
|
|
||||||
71229a73f25529c9e3dabb2cb7310c55405d31caee8e8a9ab5c71b2406d4005a ctags-6.0.0.tar.gz
|
71229a73f25529c9e3dabb2cb7310c55405d31caee8e8a9ab5c71b2406d4005a ctags-6.0.0.tar.gz
|
||||||
ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364 expat-2.6.2.tar.xz
|
ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364 expat-2.6.2.tar.xz
|
||||||
e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 gcc-14.1.0.tar.xz
|
e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 gcc-14.1.0.tar.xz
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
GCC 13 has stricter allocator checks:
|
|
||||||
https://gcc.gnu.org/gcc-13/porting_to.html
|
|
||||||
|
|
||||||
Also, libstdc++ no longer leaks stdint.h definitions.
|
|
||||||
--- a/lib/mathlib.cpp
|
|
||||||
+++ b/lib/mathlib.cpp
|
|
||||||
@@ -25,2 +25,3 @@
|
|
||||||
#include <cmath>
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <cstdlib>
|
|
||||||
--- a/lib/smallvector.h
|
|
||||||
+++ b/lib/smallvector.h
|
|
||||||
@@ -43,2 +43,5 @@
|
|
||||||
{}
|
|
||||||
+
|
|
||||||
+ template<class U> TaggedAllocator(const TaggedAllocator<U, N>);
|
|
||||||
+ template<class U> struct rebind { using other = TaggedAllocator<U, N>; };
|
|
||||||
};
|
|
@@ -1,7 +0,0 @@
|
|||||||
--- a/cli/cmdlineparser.cpp
|
|
||||||
+++ b/cli/cmdlineparser.cpp
|
|
||||||
@@ -131,3 +131,3 @@
|
|
||||||
#if defined(_WIN64) || defined(_WIN32)
|
|
||||||
-bool CmdLineParser::SHOW_DEF_PLATFORM_MSG = true;
|
|
||||||
+bool CmdLineParser::SHOW_DEF_PLATFORM_MSG = false;
|
|
||||||
#endif
|
|
Reference in New Issue
Block a user