
| Mac transition to Intel processors |
|---|
Theuniversal binary format is a format forexecutable files that run natively either on bothPowerPC-based andx86-basedMacs or on bothIntel 64-based andARM64-based Macs. The format originated onNeXTStep as "Multi-Architecture Binaries", and the concept is more generally known as afat binary, as seen onPower Macintosh.
With the release ofMac OS X Snow Leopard, and before that, since the move to64-bit architectures in general, some software publishers such asMozilla[1] have used the term "universal" to refer to a fat binary that includes builds for both i386 (32-bit Intel) and x86_64 systems. The same mechanism that is used to select between the PowerPC or Intel builds of an application is also used to select between the 32-bit or 64-bit builds of either PowerPC or Intel architectures.
Apple, however, continued to require native compatibility with both PowerPC and Intel in order to grant third-party software publishers permission to use Apple's trademarks related to universal binaries.[2] Apple does not specify whether or not such third-party software publishers must (or should) bundle separate builds for all architectures.
Universal binaries were introduced into Mac OS at the 2005Apple Worldwide Developers Conference as a means to ease the transition from the existing PowerPC architecture to systems based on Intel processors, which began shipping in 2006. Universal binaries typically include both PowerPC andx86 versions of a compiled application. Theoperating system detects a universal binary by its header, and executes the appropriate section for the architecture in use. This allows the application to run natively on any supported architecture, with no negative performance impact beyond an increase in the storage space taken up by the larger binary.
Starting with Mac OS X Snow Leopard, only Intel-based Macs are supported, so software that specifically depends upon capabilities present only in Mac OS X 10.6 or newer will only run on Intel-based Macs and therefore does not require Intel/PPC fat binaries. Additionally, starting withOS X Lion, only 64-bit Intel Macs are supported, so software that specifically depends on new features in OS X 10.7 or newer will only run on 64-bit processors and therefore does not require 32-bit/64-bit fat binaries.[3][4] Fat binaries would only be necessary for software that is designed to havebackward compatibility with older versions ofMac OS X running on older hardware.
The newUniversal 2 binary format was introduced at the 2020 Worldwide Developers Conference.[5] Universal 2 allows applications to run on bothIntelx86-64-based andARM64-basedMacintosh computers, to enable thetransition to Apple silicon.
There are two general alternative solutions. The first is to simply provide two separate binaries, one compiled for the x86 architecture and one for the PowerPC architecture. However, this can be confusing to software users unfamiliar with the difference between the two, although the confusion can be remedied through improved documentation, or the use ofhybrid CDs. The other alternative is to rely onemulation of one architecture by a system running the other architecture. This approach results in lower performance, and is generally regarded an interim solution to be used only until universal binaries or specifically compiled binaries are available as withRosetta.
Universal binaries are larger than single-platform binaries, because multiple copies of the compiled code must be stored. However, because some non-executable resources are shared by the two architectures, the size of the resulting universal binary can be, and usually is, smaller than the combined sizes of two individual binaries. They also do not require extraRAM because only one of those two copies is loaded for execution.
The concept of a universal binary originated with "Multi-Architecture Binaries" inNeXTSTEP, the main architectural foundation ofMac OS X. NeXTSTEP supports universal binaries so that one executable image can run on multiple architectures, includingMotorola'sm68k,Intel'sx86,Sun Microsystems'sSPARC, andHewlett-Packard'sPA-RISC. NeXTSTEP and macOS useMach-O archive as the binary format underlying the universal binary.
Apple previously used a similar technique during the transition from68k processors to PowerPC in the mid-1990s. These dual-platform executables are calledfat binaries, referring to their larger file size.
Apple'sXcode 2.1 supports the creation of these files, a new feature in that release. A simple application developed withprocessor-independence in mind might require very few changes to compile as a universal binary, but a complex application designed to take advantage of architecture-specific features might require substantial modification. Applications originally built using other development tools might require additional modification. These reasons have been given for the delay between the introduction of Intel-based Macintosh computers and the availability of third-party applications in universal binary format. Apple's delivery of Intel-based computers several months ahead of their previously announced schedule is another factor in this gap.
Apple'sXcode 2.4 takes the concept of universal binaries even further, by allowing four-architecture binaries to be created (32- and 64-bit for both Intel and PowerPC), therefore allowing a single executable to take full advantage of the CPU capabilities of anyMac OS X machine.
Many software developers have provided universal binary updates for their products since the 2005 WWDC. As of December 2008, Apple's website listed more than 7,500 Universal applications.[6]
On April 16, 2007,Adobe Systems announced the release ofAdobe Creative Suite 3, the first version of the application suite in the Universal Binary format.[7]
From 2006 to 2010, many Mac OS X applications were ported to Universal Binary format, includingQuarkXPress, Apple's ownFinal Cut Studio,Adobe Creative Suite,Microsoft Office 2008, andShockwave Player with version 11 - after that time most were made Intel-only apps. Non-Universal 32-bit PowerPC programs will run on Intel Macs running Mac OS X 10.4, 10.5, and 10.6 (in most cases), but with non-optimal performance, since they must be translated on-the-fly byRosetta; they will not run on Mac OS X 10.7 Lion and later as Rosetta is no longer part of the OS.
Apple has used the same binary format as Universal Binaries foriOS applications by default on multiple occasions of architectural co-existence: around 2010 during the armv6-armv7-armv7s transition and around 2016 during the armv7-arm64 transition. TheApp Store automatically thins the binaries. No trade names were derived for this practice, as it is only a concern of the developer.[8]
| Mac transition to Apple silicon |
|---|
On June 22, 2020, Apple announced a two-year permanent transition fromIntelx86-64-based processors toARM64-basedApple silicon beginning withmacOS Big Sur in late 2020.[9] To aid in this transition, a new Universal 2 binary was introduced to enable applications to be run on eitherx86-64-based processors or ARM64-based processors.[5]
The main tool for handling (creating or splitting) universal binaries is thelipo command found inXcode. Thefile command on macOS and several otherUnix-like systems can identify Mach-O universal binaries and report architecture support.[10]Snow Leopard'sSystem Profiler provides this information on theApplications tab.