diff _posts/2024-12-27-github-actions-and-ancient-toolchains.html @ 100:f638780ffe2f

blog: add github actions post
author Paper <paper@tflc.us>
date Fri, 27 Dec 2024 17:07:10 -0500
parents
children d9223d9ab9ba
line wrap: on
line diff
--- /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'
+---
+<span>
+	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.
+</span>
+<br><br>
+<span>
+	That being said, it's fun to be able to make builds for weird esoteric platforms no
+	one except me (and maybe
+	<a class="prettylink" href="https://repellantmold.neocities.org/">Jade</a>)
+	care about.
+</span>
+<br><br>
+<h3><strong><u>Building for ancient Windows</u></strong></h3>
+<span>
+	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.
+</span>
+<br><br>
+<span>
+	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! :)
+</span>
+<br><br>
+<span>
+	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!
+</span>
+<br><br>
+<h3><strong><u>Building for ancient Mac OS X</u></strong></h3>
+<span>
+	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.
+</span>
+<br><br>
+<span>
+	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 class="prettylink" href="https://gist.github.com/miniupnp/a8f474c504eaa3ad9135">
+	a custom version of SDL 2 patched for Leopard</a>. It worked, and I was satisfied, until
+	I had an actual user that wanted to run Schism on Tiger.
+</span>
+<br><br>
+<span>
+	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 <a class="prettylink" href="/media/cheese/macosx-panther-schism.jpg">
+	it worked</a>.
+</span>
\ No newline at end of file