I plan to have some time in January 2022 to revisit this. This was the second pass. I think I identified the main pitfalls that need to be solved. There are 3 themes that ideally should be done first, but once done, the port should be "easy" and clean.
1. Missing WUT stuff - A handful of WUT headers look less battle-hardened or are missing; these are candidates for moving retroarch code into WUT. Ex. WUT is missing some AX sound api bindings, that retroarch has. GX2 shader headers in retroarch are more type-safe and readable than those in WUT, but are different enough they are incompatible with WUT. Merging these updates into WUT first would address a big part of the breaking changes, and benefit all WiiU homebrew developers going forward
2. Missing HBL stuff - A few WUT dependencies are ahead of core Homebrew dependencies; these dependencies should be modernized first. Ex. Retroarch imports HBL stubs to launch apps. These HBL stubs are copied directly from the HBL project. These asm stubs are different than those shipped w/ WUT - it may be as simple are the symbol names have changed, or maybe we need to update WUT with more symbols, testing required. Retroarch also has extra stubs for exception handling. Need to get input whether these error handling symbols are appropriate to add into WUT stubs.
3. Middle ground - Some system and os libraries are different in between Retroarch and DKP/WUT, but I think these are best handled by typedefs in Retroarch. Ex. there are 3 close-but-different networking libs/headers in play: Retroarch, Devkitpro and WUT packages. Retroarch snarfed file system libraries from some other project in an unclean way. Memory and most GX2 libraries in DKP/WUT are good enough that we should probably just typedef the difference. In total, several nights work if 1 and 2 were addressed.
The remaining work is just makefile cleanup.
I've never interfaced with the Devkitpro teams, so I don't know how feasible 1 & 2 are.
Here is a pastbin of the git diff from my second pass. Pastebin dot com slash jEZtxvby (no URLs allowed for noobs like me)
You'll see I moved most of the overlapping dependencies out of the way, then hand picked a few missing files and crafted some shim headers. These headers are little more than typedefs to bridge the breaking changes between 2017 and 2021 Devkitpro.