Support for 32-bit CPUs

I have done my armhf-linux swift toolchain and building doc.
You can find here:
https://forums.swift.org/t/introducing-my-armhf-swift-5-9-toolchiain/69524/3

1 Like

@CmST0us thanks for all this hard work. I saw your repo and reproduced the results locally, and got Swift 5.9 working on my Raspberry Pi 4 running Ubuntu 22.04 armhf. I was even able to copy over some of your stuff to @ColemanCDA's swift-armv7 repo and got it to build as well for our armv7 platform (based on an Atmel SAMA5, no neon instructions, etc).

So, I guess our next steps are figuring out how to create a build on the community CI for all this. @Finagolfin and @kubamracek I am willing to put this together since I was able to get it working. How do I get started creating a build on the CI server?

3 Likes

There are two different CI options and you've now referenced both of them in this thread, so I'm unsure which one you have in mind. The first is easy and mentioned at the end of the CI page: a "community" CI you host yourself. The second is an official CI hosted by Apple, and adding your platform to this page. That requires core team approval, which I thought you were discussing with them a couple months ago.

In either case, rather than running a CI on a weak 32-bit board, my suggestion is to rent out an AArch64 server, install the 32-bit armv7 environment available in many linux distros, and run the armv7 test suite in AArch32 mode on that 64-bit CPU.

2 Likes

Thank you for putting this together @CmST0us! It's great that we have an up-to-date Swift 5.9 version now for armv7 and hopefully it will be easy to update it to Swift 5.10 and main as well.

@mishal_shah: When we talked earlier, I understood that you could possibly help out here and set something up. Either a full official CI (eventually), or perhaps something that may not be fully there yet, but is at least a starting point that we can improve upon. The current status is that it compiles (and runs), but there are no tests executed. In what state do you need this to be in order to start setting something up? Would a CI set-up that just builds the runtime/stdlib, without executing any tests, be acceptable as a starting point for the time being? Or should we first make the test suite execute properly? If you think it's too early and we should start out with a community CI, then we could have a look at that as well.

@xtremekforever: There are still a couple of patches required to make this build work. I guess one of the first things we could have a look at is creating proper fixes for these and upstream them. At least the patches to make the Ubuntu build run properly, and I think we could also have a look at improving the situation for selecting a specific processor and FPU, like we need for our Cortex-A5 build.

Sorry about the confusion there. When you sent me the official Swift CI repo I mistook it for the community CI, and with me not knowing the setup of things it didn't click that it was the official CI. So, my goal is to start with a community CI to find the issues and work out the kinks, and then once everything is in place start pull requesting to Apple to see if we can add an official CI.

It would be nice to be able to rent some powerful AArch64 hardware. Would you happen to know where that would be available?

@orobio of course, we need to look at those patches and make sure they'll work across the board. Let me know if there's anything I can do to help with that.

I have never rented out such an AArch64 server myself, but here are some well-known options that I've heard of: Hetzner, Equinix, AWS EC2, and Azure.

1 Like