Some Makefile enhancements#1
Conversation
Most binaries in XP are still built for i486 class processors, so much so that people were able to get XP to run on an i486 with just a few modifications
|
@Alex313031 What do you think? |
|
@Fierelier The problem is that MinGW/GCC are compiled with SSE2, so even if you don't specify it, the binary will still not run on non-SSE2 CPUs due to the C stdlib. For MSVC, this is possible in x86 mode by /arch:IA32 which omits SSE/SSE2 instructions in favor of x87 only. But in Visual Studio 2026 this also seems to have been removed. I mostly build this with MinGW anyway (the releases are built with that). I actually use my own MinGW build for this > https://github.com/Alex313031/mingw-linux-build and maybe I can tweak that to get it to build without SSE/SSE2 instructions. Otherwise, these changes look good. |
I've ran into a similar issue as well with Debian's precompiled MinGW toolchain, but I've solved it by using a Gentoo i486 chroot. There, the MinGW C library actually has the appropriate CPU feature level for this. I suspect you'd be able to adjust your MinGW to do the same. Here is how MinGW was compiled, according to This doesn't look very helpful though, if working on an x64 Linux env I think. I suspect another flag is required, if not using an i486 compiler. Maybe you need to compile the CRT specifically with I appreciate that you're putting work into making compilers easier to attain, by the way. That stuff has always been black magic to me. |
Adds HOST for choosing cross-compilation toolchain, removes requirement for SSE and SSE2 (+i486 compatibility - more about this below), optimize for size and strip binary (Release only). Stripping the binary makes it almost half the size.
The reason for i486 feature level is this: The vast majority of binaries in XP actually work on i486 class processors. So much so, that people were able to make a custom version of XP that runs on such processors.
Officially, XP functions on i586 processors. It also still features the FPU emulator of older Windows versions, which to my knowledge is there to mainly mitigate the Pentium FDIV bug, but can also be used to run the OS on niche i586 processors without an FPU.
XP certainly does not require SSE and neither should this tool.