I have been working on patches for compiling Swift 5.6 for PPC32 with Buildroot. First I compiled the patched compiler (swift, llvm-project and swift-core-tools-support) and then use Buildroot with patched compiler to cross compile the Swift Stdlib. I have gotten to the point where I can successfully compile libdispatch, the Swift StdLib and runtime's .c, .cpp and .swift files for PPC32, but the demo executable crashes with qemu.
@benrimmington That PR is based on main and is missing some additional changes needed.
I'll open a new PR with those changes, and update for the String internals.
Note: I am not even able to run a Pure C hello world compiled with SwiftPM, so not sure why event that is crashing. I tried calling clang manually to build a main.c file specifying the triple, and that also crashes.
@benrimmington TBH, there is no immediate need to patch SmallString, that change is purely an optimization and there has been no testing done to suggest it improves performance on PPC32, although it's very likely it helps. My goal is to get a working compiler and runtime.