It is always an exciting time to see freshly minted ARM based silicon arriving in the form of Apple’s massive shift to the ARM based M1. This of course means work for Collabora’s LibreOffice team too. The code needs to be prepared for M1, step by step. Here we update you on the status of the work, and what needs to be done.
With the launch of the new Apple devices nearing, it is important that suitable software arrives around the same time as new hardware. Apple ensures this by a translation layer, so that software for Intel Macs can be used, using Rosetta translation.
Nevertheless, given the code size of LibreOffice, for the best performance it makes most sense to have a pre-optimized native binary. As such Collabora joined the Universal App Quickstart Programme back in July and has been doing work on enabling LibreOffice for M1 since then.
This effort is made possible by the kind support of those who buy LibreOffice Vanilla in the Mac app store. Thank you! And thanks too to Tor Lillqvist for his patience and hard work here.
The status of the work
All of these changes are in master, or in the gerrit queue getting past our CI automation:
- Configuration changes (mostly there). It should now possible to configure and build a native LibreOffice on a Apple Silicon, as well as cross-compiling to x86_64.
- Patching and fixing of lots of bundled libraries to make them build cleanly.
- Then there is a first attempt at a new C++/UNO ABI bridge – we need to match Apple’s ABI by tweaking Linux’s ARM64 support to match. This allows UNO scripting to work (in theory).
- We still have some failing unit tests, that need investigation, as well as some other bits, described below.
Update: as of 2021-02 we have working native M1 binaries in the Apple app-store for users.
What’s next .. want to get involved?
Post-launch, if you can get an M1 Mac, then help is always most welcome! We have several missing pieces that will require further work, with some unusual low-level bits.
- The new C++/UNO ABI bridge requires more testing, to ensure the UNO scripting support works smoothly.
- Enabling bits we didn’t compile in yet: Firebird, Java (when there is a JDK).
- Scripts to combine builds for arm64 and x86_64 into one universal app (i.e. one where binaries are “fat,” consisting of separate parts for each architecture)
- Adaptation to whatever new checks are added for universal apps in the App Store. This is an ongoing unpredictable part of our work: adapting 8 million lines of code to the latest updated rules, keeping our builds compiling and signing with the latest tool chains.