Difference between revisions of "Target Darwin"
(→More: Updated) |
(→Universal binaries: Updated for ARM64) |
||
Line 27: | Line 27: | ||
== Universal binaries == | == Universal binaries == | ||
− | Normally for each processor - operating system combination there is one executable, but in | + | Normally for each processor - operating system combination there is one executable, but in macOS you can combine an aarch64 (ARM64) binary and an x86_64 binary into a so-called "universal binary" or "multi-architecture binary" that will run on both Apple ARM64 processors and Intel 64 bit processors. To do this the ARM64 and x86_64 executables have to be compiled separately and then combined using the <code>lipo</code> command line utility. |
− | + | It is also possible to combine a PowerPC binaries and an x86 binaries into a single combined binary using the <code>lipo</code> command line tool. You would need to first [https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/ download the PowerPC cross-compiler] so you only need to use <code>ppcppc</code> instead of <code>fpc</code> to build your project to generate the PowerPC binary. If you have a PowerPC computer, then the simplest solution is to build the x86 binary on a different computer with x86 architecture. | |
== More == | == More == |
Revision as of 06:57, 14 April 2021
This article applies to macOS only.
See also: Multiplatform Programming Guide
This article applies to iOS only.
See also: Multiplatform Programming Guide
│ English (en) │
Introduction
Darwin is the target for macOS and iOS, both PowerPC, ARM, i386 and X86_64. Programs may also be run on a machine with only Darwin installed.
Installation
See Installing Lazarus on macOS.
Usage
1) Lazarus IDE
Lazarus is a Delphi-style RAD environment
A free IDE in the classic Mac style
3) Any Editor (AlphaX, BBedit, ...) and command line (fpc your_pascal_program.pas)
Universal binaries
Normally for each processor - operating system combination there is one executable, but in macOS you can combine an aarch64 (ARM64) binary and an x86_64 binary into a so-called "universal binary" or "multi-architecture binary" that will run on both Apple ARM64 processors and Intel 64 bit processors. To do this the ARM64 and x86_64 executables have to be compiled separately and then combined using the lipo
command line utility.
It is also possible to combine a PowerPC binaries and an x86 binaries into a single combined binary using the lipo
command line tool. You would need to first download the PowerPC cross-compiler so you only need to use ppcppc
instead of fpc
to build your project to generate the PowerPC binary. If you have a PowerPC computer, then the simplest solution is to build the x86 binary on a different computer with x86 architecture.
More
See the Wiki's Mac Portal.