A set of patches for GCC has been presented, allowing the generation of executable files in the Ape (Actually Portable Executable) format. These patches enable the creation of universal assemblies of applications that can be launched in different operating systems when connected with the standard Cosmopolitan Cosmopolitan. The APE format executable file is not tied to individual platforms and can be launched in Linux, FreeBSD, MacOS, OpenBSD, NETBSD, and Windows.
The GCC 11.2 now includes a new flag “-fportcosmo” introduced by the patches, which simplifies the translation of programs written in the SI language to use the Cosmopolitan library. The proposed code changes have been published under the ISC license, a simplified version of MIT/BSD, and can be found on GitHub. Examples of programs that can be collected with the Cosmopolitan library for simultaneous execution in different operating systems include Bash, Curl, Git, Ninja, Lua, Cpython, and GCC.