annotate _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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
100
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
1 ---
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
2 layout: post
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
3 author: Paper
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
4 title: 'GitHub Actions and ancient toolchains'
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
5 nowplaying: 'Panchiko - Sodium Chloride'
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
6 ---
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
7 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
8 CI is wonderful. I use it basically everywhere, and it's nice to get almost immediate
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
9 feedback for whether a commit I made was bogus or not.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
10 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
11 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
12 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
13 That being said, it's fun to be able to make builds for weird esoteric platforms no
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
14 one except me (and maybe
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
15 <a class="prettylink" href="https://repellantmold.neocities.org/">Jade</a>)
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
16 care about.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
17 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
18 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
19 <h3><strong><u>Building for ancient Windows</u></strong></h3>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
20 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
21 MinGW-w64 (the new, modern toolchain for Windows) does not support anything below XP
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
22 or systems without SSE2, which means we have to use an older toolchain. Fortunately,
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
23 the original MinGW is still very much available, so we can just use its toolchain.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
24 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
25 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
26 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
27 This poses a problem though, how are we supposed to compile for subsystems that are
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
28 unavailable in the older toolchain? Well, by making a "franken-toolchain" of course! :)
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
29 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
30 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
31 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
32 What I did was add a configure flag to allow custom CFLAGS during the compilation
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
33 of files that need these new headers, and added the new MinGW-w64 headers during that
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
34 step. Et voila, it works, and now Schism can be run on as low as Windows 95 or NT 4!
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
35 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
36 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
37 <h3><strong><u>Building for ancient Mac OS X</u></strong></h3>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
38 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
39 Now this is tricky, in particular because I want to support PowerPC, and these systems
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
40 never had a compiler version released that could target old versions on PowerPC.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
41 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
42 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
43 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
44 I started by simply targeting Leopard, since it was the easiest. I just bundled together
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
45 the compilers from mesopotamian-era Xcode, and built Schism with
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
46 <a class="prettylink" href="https://gist.github.com/miniupnp/a8f474c504eaa3ad9135">
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
47 a custom version of SDL 2 patched for Leopard</a>. It worked, and I was satisfied, until
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
48 I had an actual user that wanted to run Schism on Tiger.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
49 </span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
50 <br><br>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
51 <span>
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
52 Since the only machine I had on hand was running Panther, I decided to target it instead
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
53 of Tiger. Because the compiler version was simply too new, I had to specifically link
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
54 against the Leopard libgcc_s instead of the Panther one, and put the newer one in the
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
55 application bundle. And <a class="prettylink" href="/media/cheese/macosx-panther-schism.jpg">
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
56 it worked</a>.
f638780ffe2f blog: add github actions post
Paper <paper@tflc.us>
parents:
diff changeset
57 </span>