Skip to content

Commit 41aff0c

Browse files
committed
Add notes to README.md about vc++filt and libmemory
These new additions had not yet been documented, and are unlikely to be discovered by chance. I dropped __USE_MINGW_ANSI_STDIO because now that I've learned more I realized it has no practical use. If one cares about this issue, one wouldn't use stdio in the first place, especially not the particularly poor Microsoft stdio.
1 parent a5bc6c8 commit 41aff0c

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,11 @@ Then to start an interactive unix shell:
6767

6868
## Optimized for size
6969

70-
The language runtimes in w64devkit are optimized for size, so it produces
71-
particularly small binaries when programs are also optimized for size
72-
(`-Os`) during compilation. If your program only uses the `printf` family
73-
of functions with MSVC-compatible directives (i.e. limited to C89), and
74-
you want even smaller binaries, you can avoid embedding the Mingw-w64's
75-
improved implementation by setting `__USE_MINGW_ANSI_STDIO` to 0 before
76-
including any headers.
77-
78-
$ cc -Os -D__USE_MINGW_ANSI_STDIO=0 ...
70+
Runtime components are optimized for size, leading to smaller application
71+
executables. Unique to w64devkit, `libmemory.a` is a library of `memset`,
72+
`memcpy`, `memmove`, `memcmp`, and `strlen` implemented as x86 string
73+
instructions. When [not linking a CRT][crt], linking `-lmemory` provides
74+
tiny definitions, particularly when GCC requires them.
7975

8076
## Fortran support
8177

@@ -184,6 +180,11 @@ The kit includes a unique [`debugbreak` command][debugbreak]. It causes
184180
all debugee processes to break in the debugger, like using Windows' F12
185181
debugger hotkey. This is especially useful for console subsystem programs.
186182

183+
The `vc++filt` command, unique to w64devkit, works just like `c++filt` but
184+
processes [Visual C++ name decorations][names] instead. It's useful when
185+
examining GCC-incompatible libraries, potentially to make some use of them
186+
anyway.
187+
187188
Since the build environment is so stable and predicable, it would be
188189
great for the .zip to be reproducible, i.e. builds by different people
189190
are bit-for-bit identical. There are multiple reasons why this is not
@@ -208,6 +209,7 @@ binaries.
208209
[break]: https://nullprogram.com/blog/2022/06/26/
209210
[bs]: https://www.rdegges.com/2016/i-dont-give-a-shit-about-licensing/
210211
[cppcheck]: https://cppcheck.sourceforge.io/
212+
[crt]: https://nullprogram.com/blog/2023/02/15/
211213
[ctags]: https://github.com/universal-ctags/ctags
212214
[debugbreak]: https://nullprogram.com/blog/2022/07/31/
213215
[doc-bb]: https://busybox.net/downloads/BusyBox.txt
@@ -227,6 +229,7 @@ binaries.
227229
[lic1]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt
228230
[lic2]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/COPYING
229231
[make]: https://www.gnu.org/software/make/
232+
[names]: https://learn.microsoft.com/en-us/cpp/build/reference/decorated-names
230233
[nasm]: https://www.nasm.us/
231234
[quilt]: http://savannah.nongnu.org/projects/quilt
232235
[san]: http://mingw-w64.org/doku.php/contribute#sanitizers_asan_tsan_usan

0 commit comments

Comments
 (0)