1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2025-07-30 04:03:05 +03:00
Commit Graph

320 Commits

Author SHA1 Message Date
34d9b65a2a [DO NOT MERGE] xxd.exe with no import table
Just for showing off.
2025-03-09 13:03:10 -04:00
b217f139b8 Upgrade to busybox-w32 version FRP-5579
https://frippery.org/busybox/release-notes/FRP-5579.html
2025-02-28 07:59:02 -05:00
36ac343fc3 gcc: Patch misaligned AVX spills (GCC bug 54412)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
2025-02-17 18:45:27 -05:00
05d3306ca2 Replace Vim xxd with new "rexxd" implementation
An order of magnitude faster, and far less buggy.

Ref: https://nullprogram.com/blog/2025/02/17/
2025-02-16 19:30:19 -05:00
cbb4c3f0df Fix libmemory and libchkstk archival on x86
The build used the host ar instead of the cross ar. With -mbig-obj as
the default (c9c9c073), the host ar cannot understand the PE32 object
files and so doesn't produce a symbol index. Not the first time this
problem has come up.
2025-02-13 20:33:25 -05:00
d2a9c1c8b2 Update Expat to 2.6.4
Change to SourceForge becasue it's slightly more reliable than
fossies.org, which is down as of the time of this commit.
2025-02-08 11:00:53 -05:00
6675cda8c3 Upgrade to GDB 16.2
Closes #194.
2025-02-08 11:00:40 -05:00
e0bea3b7b7 Upgrade binutils to 2.44 2025-02-08 04:57:08 +00:00
5f00137d37 llama.mak: Update for latest changes 2025-02-07 21:14:29 -05:00
1170f6e78a Bump to 2.1.0
No major changes, just minor changes accumulated from the past few
months.
v2.1.0
2025-02-07 19:52:52 -05:00
710e851add Upgrade to u-config 0.33.2
Primarily for changes to backslash processing in $PKG_CONFIG_PATH.
2025-02-07 19:52:52 -05:00
6a3c12737b Update Vim download URL
The ftp.vim.org subdomain is gone, but the server is still up under its
real hostname. No release artifacts prior to 9.0 are hosted at vim.org,
leaving only nluug.nl and its mirrors.
2025-01-24 17:58:53 -05:00
9969888b05 Bintuils patch to exclude more symbols from export
In bfd is a list of known libraries whose symbols are excluded when
exporting all symbols, the default behavior when no exports are chosen,
or with --export-all-symbols. The list is incomplete for w64dk and is
missing 15 additional "standard" libraries.

The result is that Windows-unaware builds using any of these libraries,
including any C++ program due to libpthread, tends to be broken. Instead
of adding each library to the list, blanket-exclude all libraries that
come from the sysroot. Since libpthread is so important, also add it to
the known list. Its absence is essentially a Binutils bug.
2025-01-24 17:33:06 -05:00
e1d3826d6f vim: Backport "xxd -n" patch
The -n option is both useful and obvious. Surprising it took 20 years to
arrive, just after the release of Vim 9.0.
2025-01-19 20:22:38 -05:00
aad4fce7b0 llama.mak: Update for latest refactoring 2025-01-19 20:15:08 -05:00
c9c9c07351 binutils (as): Enable -mbig-obj by default
This format was introduced in VS 2005, and Binutils began supporting it
for x86-64 in 2013 and i386 in 2020. The format is now 20 years old and
well-established. An increasing amount of software is hitting the old,
meager COFF limitations. Rather than enable bigobj case-by-case, simply
switch to the new format by default.

This reduces compatibility with old linkers, but compatibility between
COFF toolchains has always been iffy. Even ignoring bigobj, Binutils and
MSVC link.exe already have limited object file compatibility for various
reasons.

A significant potential problem with changing the default is that the
Binutils developers didn't have the foresight to also add -mno-big-obj
at the same time, and so any change to the default at the very least
results in a flag day. This change does not introduce -mno-big-obj, so
it is not possible to produce objects in the old format.
2024-12-31 14:37:50 -05:00
ae1c0b677d llama.mak: Update and add -mbig-obj
An increasing set of llama.cpp build configurations, particularly at
lower optimization levels, go just beyond COFF limitations and require
the "newer" bigobj COFF format in order to build.
2024-12-31 14:37:13 -05:00
35f275416e llama.mak: Update and add missing generated files
It didn't quite work out-of-the-box because it needed server assets and
build-info.cpp. On my system, the generated files were left behind from
an old build, so I didn't notice.

The official llama.cpp CMake build has a bug where build-info.cpp is
generated in the original source tree, not the build directory, and so
concurrent out-of-tree builds race to produce incorrect binaries. This
makefile avoids a conflict by using a unique name.
2024-12-10 17:00:44 -05:00
dc78a2a89c Add contrib/llama.mak for simple llama.cpp builds 2024-12-05 21:59:23 -05:00
8ea0fee87c Fix ordinal patch for Binutils 2.43 (#180)
The original patch, which functioned properly between Bintuils 2.28
(March 2017) and 2.42 (January 2024), was broken by Binutils commit
057a2b4c (June 2024), made just 3 weeks later. Either rotten luck, or
someone's reading over my shoulder!
2024-11-03 15:28:41 -05:00
0c2b1b37ff Update Expat to 2.6.3 2024-10-30 19:43:12 -04:00
a21558c6b4 Update to binutils 2.43 2024-10-25 14:25:56 -04:00
b1a0339332 Update GDB to 15.2 2024-10-22 04:28:32 +01:00
f0314ce4c5 cppcheck.mak: Add install and uninstall targets
If someone has their heart set on Cppcheck, this makes it even easier to
install just as it used to be distributed.
2024-09-28 11:39:59 -04:00
6a54545b4f Align stack for GCC on incoming stdcall (x86 only)
This GCC bug has had a wide impact since 2008. It affects nearly every
x86 program with a foreign-facing stdcall function, except WinMain and
wWinMain (covered by a CRT special case). That includes callbacks like
WNDPROC and APCs, thread procedures for CreateThread and _beginthreadex,
and entry points like mainCRTStartup and WinMainCRTStartup.

Programs included in w64dk have workarounds as needed, though between
Binutils 2.42 (6bf81ffd) and this patch, they're redundant. But still
needed, of course, when compiled with other Mingw-w64 toolchains.

Some cases are still affected, most commonly _beginthread, whose thread
procedure is _not_ stdcall, but is still called with a stack unsuitably
aligned for GCC. This case is less arguably a GCC bug, though neither
MSVC nor Clang are affected by this issue (due to not assuming 16-byte
stack alignment).
2024-09-22 19:37:39 -04:00
6bf81ffdc8 Disable stdcall fixup warnings (x86 only)
This warning is new in Binutils 2.42, and it regards fixing a long-time,
x86 bfd bug. Previously the fixup did not occur and bfd would fail to
locate decorated symbols. In the case of an entry point, bfd silently
linked the wrong address! It remains silent if the entry point is not
found, but the fixup makes it more likely to find the symbol.

The old, buggy behavior was an accident. It differs from MSVC and nobody
wants it. Theoretically some program might depend on the old behavior,
hence the warning, but it's incredibly unlikely, so silence the warning.
2024-09-22 19:36:28 -04:00
11c8495d0f Upgrade to busybox-w32 FRP-5398-g89ae34445
Two patches have been effectively upstreamed.

https://frippery.org/busybox/release-notes/FRP-5467.html
2024-09-20 16:19:41 -04:00
62e236cf95 Add operating system support section to README.md 2024-09-19 11:26:50 -04:00
7b78b3e72b Update documentation in w64devkit.ini
As of 3cacd962, the "known bugs" comment is no longer true for typical
use cases (x64 Windows 10 and later).

The UTF-8 comment came out of abusing GetPrivateProfileStringA. It was
replaced in 568efdcd with a custom parser.
2024-09-19 11:05:45 -04:00
3cacd96206 busybox-w32: Enable UTF-8 in 64-bit builds
The x86 build supports Windows XP, but the x64 build supports no earlier
than Windows 7 (my personal favorite). Windows XP outright rejects EXEs
with a UTF-8 manifest, but Windows 7 simply ignores it. That permits GCC
to continue operating on Windows 7 with a UTF-8 manifest (as of GCC 13),
which must be disabled entirely in x86 builds for Windows XP. The same
can be done with busybox-w32 by disabling the UTF-8 check and gracefully
degrading to original "ANSI-only" behavior when the manifest is ignored.
2024-09-10 16:16:02 -04:00
f60a892e13 Add details about MSVCRT and AVX in README.md
UCRT is gradually growing in popularity, and it wasn't obvious from
README.md that w64devkit is a traditional MSVCRT toolchain.

The AVX issue comes up from time to time, just infrequently enough that
I need to rediscover the solution each time. Documentation in README.md
will be easier to find next time, warns those who haven't been bitten
yet, and documents the mitigation offline. Since it is unlikely to be
fixed any time soon, medium term I should figure out a small patch that
makes GCC only emit unaligned AVX moves. The penalty for unaligned moves
is 0% on newer processors and up to 10% on older ones. That's certainly
better than crashing due to a compilier bug.

https://lemire.me/blog/2012/05/31/data-alignment-for-speed-myth-or-reality/
2024-09-06 22:18:30 -04:00
4176ece791 Disable GCC UTF-8 manifest via configure switch
The UTF-8 manifest was added in GCC 13 but the configure switch was not
added until GCC 14 (https://gcc.gnu.org/PR111170). Better to use the
swtich rather than the original hack. Thanks to Peter0x44 for pointing
this out (#58).
2024-08-08 15:49:44 -04:00
21177fbd38 Disable timestamps in 7-zip archives
Bad for reproducibility. Closes #153.
2024-08-05 08:22:50 -04:00
481c6ab590 Bump to 2.0.0
Increment the major release for significant, "breaking" distribution
changes: new format and removed tools.
v2.0.0
2024-08-01 10:17:26 -04:00
d5e0d0e081 Update to GCC 14.2.0
This rolls in 7d6330af (#138), so the patch is no longer needed.
2024-08-01 08:37:14 -04:00
2475dc0230 Fix missing quotes in libregex.c
This library can be installed to a path with spaces, so all instances of
the prefix must be quoted. Though Autoconf does not support paths with
spaces and will not be able to use such installations.
2024-07-29 21:29:34 -04:00
ecc5c65615 Replace .zip with a self-extracting 7-zip (#87)
Cuts the distribution size by around 60%, and unpacks around 100x faster
than Windows built-in .zip support. However, 7-zip is the worst packaged
project included so far. The source release is a tarbomb with a URL that
contains two variations of the release version. It is not designed for
cross-compilation, and so requires minor source corrections and a custom
build script. Still, considering the circumstances, it's surprising how
easily it compiles.
2024-07-29 17:15:26 -04:00
f0042509c8 Upgrade to GDB 15.1
The only relevant changes for w64dk are in the Debugger Adapter
Protocol: process event, cancel request, attach request, and
dap-log-level configuration.
2024-07-29 17:12:31 -04:00
85a52aac4e Enable Fortran compiler in all builds
When I first put w64devkit together, there were incompatibilities with
Binutils and supporting gfortran was difficult. It's been stable for
years, and I want to simplify the download options.
2024-07-29 17:12:31 -04:00
6b6b6449d7 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.
2024-07-29 17:12:31 -04:00
ec561dae94 Remove NASM from the distribution
It's proven less useful than I originally hoped, and it's nearly always
better to use the GNU assembler instead. NASM doesn't support DWARF with
COFF, so it cannot be debugged with GDB. It's also ~100x slower than as,
which makes a huge different for generated assembly. With the autotools
fixes, it's now easy to natively build NASM from source using w64dk.
2024-07-29 17:12:31 -04:00
7785eb9c7d Workarounds for GNU Autotools (#50)
Introduce a "system-wide" profile loaded before ~/.profile, and populate
it with variables to guide GNU Autoconf. In general, "configure" scripts
should now work out-of-the-box.

Libtool assumes the host environment is MSYS2 and will be confused by
Windows-style command switches. The "/c" in "cmd /c" looks like a path,
which MSYS2 incorrectly decodes to "c:/". Anticipating this, libtool
encodes these calls as "cmd //c" which does not work outside MSYS2. A
busybox-w32 patch makes it behave like MSYS2 in just this one case. This
patch has been upstreamed and will be removed on the next upgrade.
2024-07-29 17:12:04 -04:00
9ca8a283e2 Upgrade to busybox-w32 FRP-5398-g89ae34445
https://frippery.org/busybox/release-notes/FRP-5398.html

* Changes to HISTFILESIZE, HISTFILE
* New "title" shell built-in
* Various other minor changes and fixes
2024-06-30 21:56:40 -04:00
b772569def Ignore CTRL-C in alias after CreateProcess (#140)
If CTRL-C terminates the alias but the child ignores CTRL-C, the parent
of the alias (shell, make, etc.) will be led to beleive the real command
terminated despite continuing to run. Because a null CTRL-C handler is
inherited, the alias sets a real handler that ignores all CTRL events,
relying on the child to make a decision. To minimize the window between
starting to ignore CTRL-C and spawning the child, SetConsoleCtrlHandler
is called as late as possible.
2024-06-26 14:58:02 -04:00
7d6330afae GCC 14 seh_cfa_offset regression fix (#138) 2024-06-10 17:56:20 -04:00
28912083d7 Add note to README about ordinal hints
Reflects changes in 6a19f821. Regarding the compression comment, this
little change shrank the distribution .zip by 0.5%.
2024-06-07 12:10:44 -04:00
77f0afe4fb Add peports to the README, expanding a new section
The new order reflects general usefulness. I'm probably the only user of
debugbreak, even if frequent, so move it to the end of the list.
2024-06-07 11:21:17 -04:00
6a19f82184 dlltool: Stop inventing unique ordinal hints 2024-06-06 19:30:57 -04:00
044ce3f835 New command: peports (like dumpbin)
Often I want to examine the export and import tables of a module. The
best tool for the job (until now!) was MSVC dumpbin, but obviously it
cannot be distributed with w64devkit. Binutils objdump is inconvenient,
and it cannot reliably parse PE files that were not linked by ld (e.g.
Go binaries).

This new tool parses anytyhing, is more standalone, and more concise
than dumpbin, and much faster than both dumpbin and objdump. Exactly the
tool I've wanted for years.
2024-06-06 19:30:27 -04:00
eda689d567 Upgrade to Mingw-w64 12.0.0
This is the first Mingw-w64 release to default to UCRT. Since that was
anticipated in c17f5ca2, no changes are required. Though I worry about
the future for MSCVRT support. No longer default, fewer people will be
using it going forward.

Benefits for w64devkit:

* Updated gdtoa
* More Win32 API declarations
* Some new MSVC-related C++ overloads

https://www.mingw-w64.org/changelog/#v1200-2024-05-29
2024-05-29 11:14:00 -04:00