# HG changeset patch # User Paper # Date 1735337230 18000 # Node ID f638780ffe2f868995984622053663797653dcca # Parent e83a48ef3bf41e2b10842ef88c62419fcc257c6e blog: add github actions post diff -r e83a48ef3bf4 -r f638780ffe2f _posts/2024-12-27-github-actions-and-ancient-toolchains.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/_posts/2024-12-27-github-actions-and-ancient-toolchains.html Fri Dec 27 17:07:10 2024 -0500 @@ -0,0 +1,57 @@ +--- +layout: post +author: Paper +title: 'GitHub Actions and ancient toolchains' +nowplaying: 'Panchiko - Sodium Chloride' +--- + + CI is wonderful. I use it basically everywhere, and it's nice to get almost immediate + feedback for whether a commit I made was bogus or not. + +

+ + That being said, it's fun to be able to make builds for weird esoteric platforms no + one except me (and maybe + Jade) + care about. + +

+

Building for ancient Windows

+ + MinGW-w64 (the new, modern toolchain for Windows) does not support anything below XP + or systems without SSE2, which means we have to use an older toolchain. Fortunately, + the original MinGW is still very much available, so we can just use its toolchain. + +

+ + This poses a problem though, how are we supposed to compile for subsystems that are + unavailable in the older toolchain? Well, by making a "franken-toolchain" of course! :) + +

+ + What I did was add a configure flag to allow custom CFLAGS during the compilation + of files that need these new headers, and added the new MinGW-w64 headers during that + step. Et voila, it works, and now Schism can be run on as low as Windows 95 or NT 4! + +

+

Building for ancient Mac OS X

+ + Now this is tricky, in particular because I want to support PowerPC, and these systems + never had a compiler version released that could target old versions on PowerPC. + +

+ + I started by simply targeting Leopard, since it was the easiest. I just bundled together + the compilers from mesopotamian-era Xcode, and built Schism with + + a custom version of SDL 2 patched for Leopard. It worked, and I was satisfied, until + I had an actual user that wanted to run Schism on Tiger. + +

+ + Since the only machine I had on hand was running Panther, I decided to target it instead + of Tiger. Because the compiler version was simply too new, I had to specifically link + against the Leopard libgcc_s instead of the Panther one, and put the newer one in the + application bundle. And + it worked. + \ No newline at end of file