1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-24 17:39:18 +03:00
Commit Graph

389 Commits

Author SHA1 Message Date
Christopher Wellons
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
Semphris
21177fbd38 Disable timestamps in 7-zip archives
Bad for reproducibility. Closes #153.
2024-08-05 08:22:50 -04:00
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
7d6330afae GCC 14 seh_cfa_offset regression fix (#138) 2024-06-10 17:56:20 -04:00
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
6a19f82184 dlltool: Stop inventing unique ordinal hints 2024-06-06 19:30:57 -04:00
Christopher Wellons
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
Christopher Wellons
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
Christopher Wellons
15ae179b5a Start a contrib/ with libgc and libregex (#127) 2024-05-09 16:25:09 -04:00
Christopher Wellons
089a75bb4e Bump to 1.23.0 v1.23.0 2024-05-08 10:13:19 -04:00
Christopher Wellons
0e77b58400 Upgrade to u-config 0.33.1 2024-05-07 10:01:09 -04:00
Christopher Wellons
92956fe37b Update to GCC 14.1.0
https://gcc.gnu.org/gcc-14/changes.html
2024-05-07 09:24:29 -04:00
Semphris
c7497e1516 Upgrade to Binutils 2.42 2024-05-01 14:11:15 -04:00
Christopher Wellons
7941580f9c Upgrade to GDB 14.2
__MINGW_USE_VC2005_COMPAT mitigates a bug where bfd and gnulib disagree
about i686 time_t: https://sourceware.org/bugzilla/show_bug.cgi?id=31636

Closes #96.
2024-04-14 15:37:13 -04:00
Christopher Wellons
f02075d158 Bump to 1.22.0 v1.22.0 2024-04-08 09:16:08 -04:00
Alex Duchesne
596a9e30bd Upgrade to expat-2.6.2
The old release is no longer hosted upstream.
2024-03-31 17:15:48 -04:00
Christopher Wellons
ef66c38625 Upgrade to busybox-w32 FRP-5301-gda71f7c57
* NO_COLOR support
* time: new -f option
* httpd: CGI support
* Better version string
* Bug fixes

https://frippery.org/busybox/release-notes/FRP-5301.html
2024-03-20 11:21:33 -04:00
Christopher Wellons
5e2021cc04 Add "title" configuration to w64devkit.ini
While already possible using an ANSI escape sequence, the INI option
affords additional flexibility. It also supports wide titles, which
cannot be done with the busybox-w32 included in w64devkit. See #115.

To support this, I broke up homeconfig() into several functions to be
re-used and composed when handling the new option, such as expanding
environment variables. While doing so, I took the opportunity to remove
several maximum length limitations, like MAX_PATH, and so long paths are
now supported, at least as far as the launcher. I also simplified the
arena to a pair of pointers.

The program now sets $W64DEVKIT before loading the INI so that it is
available during variable expansion of titles.
2024-03-04 09:21:46 -05:00
Christopher Wellons
231b7130c8 Upgrade to Expat 2.6.1
The old release is no longer hosted upstream.
2024-03-04 08:55:43 -05:00
Christopher Wellons
019fe568ca Upgrade to u-config 0.33.0 2024-03-02 17:17:29 -05:00
Christopher Wellons
50b343dbfe libchkstk: Add frame low address overflow checks
If an especially large frame is requested, the low frame address might
overflow and land above the stack pointer, disabling the stack probe. In
practice it would only happen from alloca calls and VLAs using untrusted
sizes, but it would be nice to handle it anyway. This change introduces
an overflow check, nulling the low address and forcing the probe loop to
run until it overflows the stack.

In 64-bit (all) and 32-bit ___chkstk_ms, it costs a two-byte instruction
on the unhappy path, and on the fast path conversion of an unconditional
jump to a predictable conditional jump. On 32-bit __chkstk it costs two,
two-byte instructions, one on the fast path and one on the unhappy path.
Not too bad.

The stack low address "mov" did not need to move. I did it to keep the
stack frame operations together.

Thanks to Stefan Kanthak for pointing out this defect.
2024-02-18 20:19:47 -05:00
Christopher Wellons
6708972bd1 Restore Binutils gprof tool
Binutils 2.36 made PIE mandatory, breaking gprof for all configurations,
so it was removed in c6ae1749. GCC 12 made PIE optional again, which
allows gprof to operate when linked with -no-pie. Closes #109.
2024-02-12 20:23:33 -05:00
Christopher Wellons
c2b61e3322 libchkstk.S: Remove stray sub from x86 ___chkstk_ms
Thanks to Felipe Garcia for catching this. That sub was a leftover from
an earlier version which did not push eax/rax. I missed it when updating
to the current version.
2024-02-05 08:23:41 -05:00
Christopher Wellons
43bf1e56c9 New runtime library: libchkstk
Provides 32-bit and 64-bit ___chkstk_ms and __chkstk. The former can
replace the libgcc implementation. Better license, about half the size,
and substantially faster when used on a hot path. The purpose and role
is similar to libmemory.
2024-02-02 22:01:33 -05:00
Christopher Wellons
103b45db76 Disable LTO in both toolchains
LTO support on Windows is buggy, and occasionally I need to turn it off
(-fno-lto) to avoid problems, so just disable it entirely. Also shaves
about 9MiB off the distribution.
2024-01-31 10:39:27 -05:00
Christopher Wellons
41aff0cf84 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.
2024-01-06 14:43:37 -05:00
Christopher Wellons
a5bc6c8910 New runtime library: libmemory
This static library provides memset, memcpy, memmove, memcmp, and
strlen. The implementations are minimal wrappers around x86 string
instructions, making them both tiny (~26 bytes apiece) and reasonably
performant, though not nearly as fast as CRT implementations. I selected
these particular functions because GCC fabricates calls to each out of
thin air at some optimization levels. The first four are also genuinely
useful as built-ins (__builtin_memset, etc.), keeping in mind arbitrary
limitations with null.

Mingw-w64 does not implement them but instead offers imports from system
DLLs: -lmsvcrt, -lmsvcr120, -lucrt, -lntdllcrt. It creates a dependency
on a system DLL: practical, though unoptimal, and no licensing woes.
With -nostartfiles instead of -nostdlib, this happens implicitly.

MSVC provides static definitions in libvcuntime.lib, useful when cl or
clang-cl fabricates calls. They weigh several KB each, and require the
application or installer to present a EULA ("external end users to agree
to terms"). Not a great trade-off just for some basic memory functions.

In w64devkit, libmemory fills this role. It's a public domain library so
there are no license terms. Just add -lmemory to the build command. It
also allows liberal use of the associated built-ins, especially in debug
builds, which can benefit from fast memory operations despite -O0. MSVC
toolchains can also freely use libmemory.a, though it won't know how to
find it without help of course.

I do not plan to add more functions except for cases of GCC fabricating
calls (e.g. strlen). Certainly no null-terminated string functions.
2024-01-06 14:43:37 -05:00
Christopher Wellons
fbf114d1e7 New command: vc++filt 2023-12-23 14:40:29 -05:00
Christopher Wellons
2a340634c3 Downgrade back to GDB 13.1 (#96)
i686-w64-mingw32 GDB 14.1 does not detect file changes. After rebuilds
it runs with stale debugging information and may put the target in an
invalid state. The user must either manually use the "file" command or
restart GDB in order to load changes. Mostly reverts f46b079.
2023-12-07 22:08:55 -05:00
Christopher Wellons
fa8724ee9a Upgrade to MPC 1.3.1 2023-12-07 12:41:38 -05:00
Christopher Wellons
4c04de4cb6 Upgrade to GNU Make 4.4.1 2023-12-07 12:41:02 -05:00
Christopher Wellons
709f676d35 Upgrade to busybox-w32 FRP-5236-g7dff7f376
* New shell options: nohiddenglob, nohidsysglob
* New applet/alias: lash ("ash -l")
* New sort option: -V
* Various bug fixes
2023-12-07 10:55:42 -05:00
Christopher Wellons
f46b079561 Upgrade to GDB 14.1 (#96)
In this release the --with-package options have broken further, and the
library detection scripts do not work at all. To workaround, toss these
options and manually place the include directory in CFLAGS, just as was
already necessary for LDFLAGS.
2023-12-07 10:01:45 -05:00
Christopher Wellons
8ec9a9abe6 Upgrade to MPFR 4.2.1 2023-12-07 10:01:45 -05:00
Christopher Wellons
d86184a25a Upgrade to GMP 6.3.0 2023-12-07 10:01:45 -05:00
Christopher Wellons
9926896660 Upgrade to Binutils 2.41 2023-12-07 10:01:44 -05:00
Christopher Wellons
0ea5fcf459 Bump to 1.21.0 v1.21.0 2023-12-05 12:16:51 -05:00
Christopher Wellons
46e4afd524 Upgrade from Debian Bullseye to Bookworm
Should have practically no effect beyond "zip" due to the bootstrap.
2023-09-12 14:11:59 -04:00
Christopher Wellons
addc923cb1 Upgrade to Mingw-w64 11.0.1
Cygwin fixes, no effect for w64devkit. The official release date was the
day following 11.0.0, on April 29th. However the project did not roll up
an actual, usable release until August 7th (today).
2023-09-06 19:21:57 -04:00