1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-23 06:08:56 +03:00

590 Commits

Author SHA1 Message Date
Christopher Wellons
73e6a3d5cb Upgrade to dcmake 1.8.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:31:39 -04:00
Christopher Wellons
c13118e28d Make flock exclude other locks on Windows
busybox-w32 locked the file's bytes from 0 to its current size, so on
an empty lock file, the usual case, flock locked nothing, and on a
non-empty file Windows' mandatory locks kept even the locked command
from reading or writing it. Lock one byte far past the end of the file
instead, which behaves like flock(2). Also let flock -n fail silently
and flock -u succeed, as on Unix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:08:02 -04:00
Christopher Wellons
081983e3ad Reject stty rows, cols, and columns on Windows
busybox-w32 recognized these settings but cannot set the window size.
The first pass checked the following number without consuming it, so
every use failed, and with nothing after them stty crashed on a null
pointer. Now they are rejected as invalid arguments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:08:02 -04:00
Christopher Wellons
0ca4aa683c Add launchers for cdrop, drop, pdrop, flock, sha384sum, and stty
These applets arrived with busybox-w32 upgrades that never touched the
launcher list, so they were reachable only through busybox or the
shell. Add manual pages for drop (with cdrop and pdrop), flock, and
stty, list sha384sum with md5sum, and drop the notes about missing
launchers. Only [ is left without one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:48:38 -04:00
Christopher Wellons
2845baff59 Let MANROFFOPT choose ragged-right manual pages
nroff now accepts groff's -d option to define a string, and man appends
$MANROFFOPT to the nroff command line, as man-db does. Since nroff
already honors the man(7) AD string, MANROFFOPT=-dAD=l sets pages
ragged-right instead of adjusting them to both margins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:48:38 -04:00
Christopher Wellons
4fbc4d1f72 Revise the sh, busybox, and test manual pages (#428)
Address the review in #428: plainer wording throughout, w64devkit's
changes marked where they apply and listed one per item, job names,
word-deletion keys, exec, cd -L/-P, CDPATH, PATH separators, and the
native Windows environment explained, HOME, TERM_PROGRAM and the other
variables clarified, and a pointer to the POSIX shell language. The
busybox page gains context about the kit and its launchers. Drop [[
from all three pages, since the shell no longer has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:27:24 -04:00
Christopher Wellons
48eb238156 Remove [[ from the shell
busybox-w32 builds bash's [[ into ash for compatibility. It isn't
wanted in the kit, whose shell aims at POSIX sh, and the [[ applet was
already disabled. test, [, and == are unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:27:24 -04:00
Christopher Wellons
7f8bfe444f List OpenGroup download in offline docs section (#422) 2026-10-20 18:35:29 -04:00
MarcroSoft
c91d60b481 Shrink NSIS stubs and plugins with --gc-sections
Stubs drop from ~117 KB to ~52 KB on x86 and from ~133 KB to ~51 KB on
x64, mostly by discarding unreferenced libuuid.a constants, and every
installer shrinks by as much. See the patch header for details.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:07:42 -04:00
Christopher Wellons
f915d8e464 Fix NSISdl downloads
NSISdl compared WSAGetLastError() against EINPROGRESS and EWOULDBLOCK,
which mingw-w64's errno.h defines as the CRT's POSIX codes, so its
Winsock fallbacks never applied and no comparison could match. Every
NSISdl::download failed at once with "connecting to host", and fixing
only connect() leaves recv() closing the connection early. Patch all
five comparisons to use WSAEWOULDBLOCK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 12:06:27 -04:00
Christopher Wellons
9ad03683db Strip makensis
NSIS links makensis with -s only if a test program so linked runs,
which a cross build cannot do, so makensis.exe shipped with its
symbol table and DWARF from its libraries. Strip it after install,
as with vimrun.exe. Nothing else NSIS installs carried symbols, and
the stubs and plugins are unchanged. makensis.exe shrinks from
1,536,466 to 835,072 bytes in the x64 kit, and from 1,414,912 to
889,856 bytes in the x86 kit. Its loaded sections are unchanged, and
it produces byte-identical installers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:39:56 -04:00
Christopher Wellons
1e7471f7d0 Add manual pages for ninja, makensis, widl, gendef and cmcldeps
None of them installs a page of its own, so each was written from its
source and checked by running the kit's build. With these, every program
in bin/ has a page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 07:42:26 -04:00
Christopher Wellons
880be39a58 Add manual pages for the BusyBox applets
A page for each applet in the kit, plus .so stubs for aliases such as
egrep and unxz. Each was written from the pinned busybox-w32 source with
the kit's patches and configuration, then checked against the source
and by experiment. The NOTES sections cover Windows behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:28 -04:00
Christopher Wellons
1185617ee0 Treat a bare drive operand as that drive's current directory
In busybox-w32, recursing into a bare drive such as C: walked the root
of the drive, while stat() treated C: as its current directory, so
"rm -rf C:" run in C:\some\dir deleted from the root of C:. cp, mv, ln,
install, find, grep -r, tar, chmod -R, du, diff -r, ls, wget -P,
mktemp -p and globs like C:* were affected too. Now C: is the drive's
current directory everywhere, as in Windows, and rm refuses it as it
refuses "." itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:28 -04:00
Christopher Wellons
5939e14665 Add manual pages for w64devkit's own tools
Pages for xxd, make2compdb, peports, recycle, uuidgen, vc++filt,
debugbreak, nroff and w64devkit, written from their sources.
man/README.md describes the style for hand-written pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:28 -04:00
Christopher Wellons
dde20aa10a Ship manual pages
Keep the pages that GCC, Binutils and others install, add GDB's, Make's
and zstd's from their sources, and generate ctags, CMake and Ccache
pages from their documentation in a new stage with docutils, Sphinx and
asciidoctor. Aliases such as cc, g++ and vi get one-line .so stubs
instead of copies. The build fails if any installed page is not roff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:27 -04:00
Christopher Wellons
9bf19c91d0 Enable BusyBox man, and colors in less -R
man now looks in MANPATH and then the kit's share/man, formats pages
with the kit's nroff, finds target-prefixed names such as
x86_64-w64-mingw32-gcc under their base name, and pages through less -R.
less -R previously stripped SGR escapes. It now passes them through with
correct line widths and searching, so pages show bold and underline, and
so does colored output such as ls --color=always.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:27 -04:00
Christopher Wellons
25891bd5ce Add nroff, a formatter for manual pages
A small, self-contained roff formatter for BusyBox man to run in place
of groff. It covers what manual pages use: man(7), mdoc(7) and tbl, laid
out like groff and mandoc respectively. Over 98% of the lines in a
295,000-line corpus of real pages render identically to those tools. -w
lints a page, and it also formats pages that are not installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:27 -04:00
Christopher Wellons
0f7921c495 Upgrade to aas-sign 1.1.1
Also install its new manual page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:27 -04:00
Christopher Wellons
607c4099a4 Upgrade to dcmake 1.7.2
Also install its new manual page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:26 -04:00
Christopher Wellons
c63edeff8f Upgrade to u-config 0.35.0
Download the release instead of vendoring the amalgamated pkg-config.c,
and generate the amalgamation with its makefile. Also install its
manual page, and point make2compdb.c's credits at u-config itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:26 -04:00
Christopher Wellons
b5d325d774 Upgrade to Quilt.cpp 0.69.4
Also install its new manual page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:26 -04:00
Christopher Wellons
23e000b656 Upgrade to tugz 1.3.0
Build from the release's source tarball rather than its amalgams, which
are generated with tugz's own CMake script, since only the tarball has
the new gzip, unzip and zip manual pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:33:26 -04:00
Christopher Wellons
d571aa041f Publish the tag message as release notes
The release previously had an empty body, so GitHub showed the raw tag
message as plain text. Take the annotated tag's body (excluding subject
and signature) and pass it to gh release create so it renders as
Markdown. Fail before the slow signed builds if the tag has no body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:43:10 -04:00
Christopher Wellons
0de8f0763a Keep long long locals 8-byte aligned on i686
GCC 16 lowered the 32-bit cygming preferred stack boundary to 4 bytes,
and the i386 back end then places long long locals at 4-byte alignment
even though -malign-double, the default on these targets, makes
_Alignof(long long) 8. Such locals trap under -fsanitize=alignment.
Treat them as the back end already treats doubles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:24:39 -04:00
Christopher Wellons
3eff223c6d Default to 64-bit time_t on x86
With msvcrt, mingw-w64 defaults x86 to a 32-bit time_t, so ordinary
programs built today fail in January 2038. A new header patch makes
64-bit time_t the default, as with UCRT and MSVC, and everything in the
kit is built that way, including the kit's own tools. The 64-bit time
functions are emulated in libmsvcrt-os.a on top of XP-era imports, so
programs still run on Windows XP. Use _TIME_BITS=32 or
_USE_32BIT_TIME_T to opt out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:09:55 -04:00
Christopher Wellons
cfd8597704 Fix system_clock overflowing in 2038
libstdc++ implemented system_clock::now() with gettimeofday, whose
timeval has a long tv_sec, and long is 32 bits on Windows. Both
system_clock and steady_clock (derived from it on this target) would
overflow in January 2038 on x64 as well as x86, no matter how time_t is
configured. A new patch reads the system time directly, preferring
GetSystemTimePreciseAsFileTime as mingw-w64's gettimeofday does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:09:55 -04:00
Christopher Wellons
58dca7f70d Support both time_t ABIs in C11 threads on x86
thrd_sleep, mtx_timedlock, and cnd_timedwait take a struct timespec,
whose layout follows time_t. libmingwex.a was compiled for 32-bit
time_t only, so x86 programs built with 64-bit time_t read garbage
timeouts. The plain names keep the 32-bit ABI so existing objects still
link correctly, and threads.h redirects 64-bit time_t callers to new
*64 variants. x64 is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:09:55 -04:00
Christopher Wellons
be339a9847 Make select x86 programs large address aware
On 64-bit Windows a 32-bit process flagged large address aware gets 4GiB
of address space instead of 2GiB. Apply the flag in the x86 kit to the
memory-hungry programs that are safe above 2GiB: binutils, the shipped
GCC, gdb, zstd, and tugz's gzip, unzip, and zip. The flag goes on GCC's
host LDFLAGS, so programs built with the kit are unaffected. It is empty
in the x64 kit, where PE32+ images are already large address aware and
the linker rejects the option.

Tested with all free address space below 2GiB reserved before startup,
forcing allocations high, and smoke tested on Windows XP, which ignores
the flag without /3GB.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:29:36 -04:00
Christopher Wellons
a3a24b2509 Raise zstd's default decompression window to 2GiB on x64
Without -M or --long, the zstd CLI refuses frames with windows over
128MiB, and some files in the wild now require --long=30. A new patch
adds a ZSTDCLI_DECOMPRESS_WINDOWLOG build option for the decompression
default, set to 31 in the x64 kit only. Compression defaults, and so
compatibility of produced files with other zstd builds, are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 09:45:10 -04:00
Christopher Wellons
457bd8071d Upgrade to tugz 1.1.0 and add zipinfo
tugz 1.1.0 adds Info-ZIP's ZipInfo mode to unzip, selected by program
name, so zipinfo is an alias.c alias of unzip, as gunzip and zcat are
of gzip. The release also speeds up deflate and inflate, including
x86-64 SIMD paths chosen at run time; it still runs on Windows XP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:48:33 -04:00
Christopher Wellons
d38e1f384e Bump to 2.10.1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2.10.1
2026-10-13 14:25:26 -04:00
Christopher Wellons
db5cdb3d37 Upgrade to NSIS 3.13
Fixes an nsExec::ExecToLog crash. makensis's default target now comes
from the build's TARGET_ARCH rather than its own pointer size, which
gives the same defaults here: amd64 in the x64 kit, x86 in the x86 kit.
Patches refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:34:25 -04:00
Christopher Wellons
c4d8914b04 Upgrade to CMake 4.4.4
Patch refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:34:25 -04:00
Christopher Wellons
20c48a573a Upgrade to Ccache 4.14.1
Bug fixes, including cleanup of temporary response files on Windows,
storage helper lock compatibility with versions before 4.14, and GCC
profile data lookup for objects in subdirectories. Patches refreshed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:34:24 -04:00
Christopher Wellons
933357f232 Upgrade to Expat 2.9.0
Fixes two vulnerabilities: CVE-2026-102633, an integer overflow in
expat_realloc on 32-bit platforms, and CVE-2026-77214, a missing check
of XML_ParseBuffer's len against the available buffer. Also adds new
property and 64-bit location APIs, and drops the attribute info and
minimum size features, which were disabled by default and unused here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 12:34:24 -04:00
Christopher Wellons
b573126546 Upgrade to Quilt.cpp 0.69.3 and drop the NSIS CRLF workaround
Quilt.cpp now honors --strip-trailing-cr in QUILT_DIFF_OPTS, set in
src/quiltrc, so a refresh against a CRLF file produces an LF-only
patch, and push still applies it with the file's CRLF line endings.
NSIS's Source/build.cpp no longer needs its carriage returns stripped
before patching. The NSIS patches are refreshed accordingly.

This release also makes push --refresh honor QUILT_REFRESH_ARGS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 11:19:27 -04:00
Christopher Wellons
ce5576c416 Build Quilt.cpp from its release instead of vendoring the amalgamation
Quilt.cpp is now an ordinary external dependency, fetched as a release
tarball. A POSIX build replaces Debian's quilt for applying every patch
queue in the image, and the same build generates the amalgamation that
is compiled into quilt.exe and shipped as src/quilt.cpp, as before.

Before switching, every queue was pushed with both Debian's quilt and
Quilt.cpp against its pinned source, producing identical trees and
output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:20:43 -04:00
Christopher Wellons
623d0d8a88 Add shared quilt settings and patch queue documentation
src/quiltrc fixes refresh output (no Index: lines or timestamps, a/ b/
prefixes, diffstat) so that every contributor produces identical
patches. src/README.md describes driving the queues with it, the policy
of refreshing a component's whole queue when its version changes, and
how gcc-final stacks on gcc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:28:38 -04:00
Christopher Wellons
13688517ff Fold the gendef patch queue into mingw
gendef's one patch was a second queue pushed onto the mingw tree in the
gendef build stage. It now sits at the end of the mingw queue, so the
tree is patched once like every other component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:28:38 -04:00
Christopher Wellons
22e4d0c6c2 Replace BusyBox gzip, gunzip, zcat, and unzip with tugz 1.0.0
tugz provides gzip, unzip, and a new Info-ZIP compatible zip. Built from
the release amalgamations; gunzip and zcat are alias.c aliases of gzip,
which selects its mode by program name. It runs on Windows XP, looking
up Vista-era functions at run time.

With those applets disabled, BusyBox tar runs the external gzip/gunzip
for .gz, as it already does for zstd. A new patch swaps the internal
inflater, now unused, for a stub that execs gunzip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:54:12 -04:00
Christopher Wellons
0b35156d4f Bump to Quilt 0.69.2
Bug fixes and more closely matching the original Quilt.
2026-10-01 17:28:51 -04:00
Christopher Wellons
e81384a89a gdb: Report OutputDebugStringW strings as Unicode
GDB waited with WaitForDebugEvent, so Windows converted
OutputDebugStringW strings to the inferior's ANSI code page first,
losing any character outside it. On Windows 10 and later, wait with
WaitForDebugEventEx instead, which opts in to Unicode strings, and
convert them from UTF-16 to the host charset.

WaitForDebugEventEx is looked up at runtime, so gdb.exe does not import
it and still runs on older Windows with the old behavior. gdbserver
shares the wait wrapper but does not opt in. Details in the patch
header.

Tested on Windows 10 and Windows XP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:17:00 -04:00
Christopher Wellons
8aa7cfcb96 Build PDCurses with PDC_FORCE_UTF8
Without it, PDCurses decodes narrow strings with the CRT's mbtowc(),
which follows LC_CTYPE. When GDB 18.1 selects a UTF-8 host charset it
calls setlocale(LC_CTYPE, "C"), so in the TUI each byte of a UTF-8
sequence became its own character: π (CF 80) displayed as Ï.

PDC_FORCE_UTF8 makes PDCurses decode UTF-8 itself, independent of the
locale. Its decoder covers only the BMP. ccmake links the same library
and gets the same behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 20:38:11 -04:00
Christopher Wellons
fa8f34ae76 Upgrade to GDB 18.1
Windows-relevant changes: the native target gains scheduler-locking,
non-stop mode (Windows 10+), and native TLS variable support; Windows
Terminal consoles get UTF-8 output handling; and backslashes in paths
are now normalized to forward slashes.

Support for stabs, mdebug, dbx, and CTF was removed. None affect this
toolchain, which emits DWARF. All three local patches still apply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 18:56:26 -04:00
Christopher Wellons
cc2b5c8b0b Upgrade to xxHash 0.8.4
Maintenance release with no API changes; it is only a ccache
dependency here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 07:31:05 -04:00
Christopher Wellons
4f12cb0d25 Upgrade to Expat 2.8.5
Security release fixing CVE-2026-93990.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 07:30:53 -04:00
Christopher Wellons
956d28aa0e busybox: Replace config sed edits with an overrides file
The sed chain grew with each tweak and fails silently: a pattern that
misses leaves the default in place, a wildcard like CONFIG_FTP\w* may
catch symbols added by a future upstream, and kconfig quietly discards
values it rejects. List the overrides in src/busybox.config instead.

Kconfig keeps the first assignment of each symbol and ignores later
ones, so prepending the overrides to the stock defconfig makes them
win. After configuring, every override must appear verbatim in .config,
or the build fails and prints the ones that did not take (unknown
symbol, out-of-range value, unmet dependency).

The resulting .config is identical to the sed chain's for both x64 and
x86.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 16:08:01 -04:00
Christopher Wellons
4bcc7c0d6d busybox: Raise shell history limit to 16k, default to 1k
The busybox-w32 defconfig caps HISTSIZE at 1023 and defaults to 384,
which is cramped for desktop use. Nothing in the history code is worse
than linear. The one cost that scales with history is fork emulation:
each forkshell child of an interactive shell (command substitution,
subshell, pipeline stage) receives a copy of the in-memory history. At
10k entries that adds roughly 0.3 ms to a ~5 ms spawn. The cap itself
only sizes a fixed pointer array, so raising it is nearly free, and
the 1024 default stays well under 1% per fork.

Upstream Kconfig limits FEATURE_EDITING_HISTORY to 2000, and kconfig
treats out-of-range values as unset, so patch the range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-22 16:08:01 -04:00
Londo
360636d5fb Fix typos in README 2026-09-20 18:02:00 -07:00