F43 Change Proposal: Free Pascal cross-compilers (self-contained)

Free Pascal cross-compilers

This is a proposed Change for Fedora Linux.
This document represents a proposed Change. As part of the Changes process, proposals are publicly announced in order to receive community feedback. This proposal will only be implemented if approved by the Fedora Engineering Steering Committee.

Wiki
Announced

:link: Summary

Add cross-compilation support to the Free Pascal Compiler (FPC) offered in Fedora.

:link: Owner

:link: Detailed Description

The Free Pascal Compiler supports targeting many processor architectures and operating systems, but so far only native targets were supported in Fedora. This Change proposes adding several new packages to the distribution (all built from the same fpc source package), which can then be used for cross-compilation.

Two groups of packages will be introduced:

  • fpc-cross-$CPU, where $CPU is the name of the target processor architecture - e.g. fpc-cross-aarch64. These packages will provide system-agnostic cross-compilers.
  • fpc-units-$CPU-$OS, where $CPU is the name of the target processor architecture, and $OS is the name of the target operating system - e.g. fpc-units-i386-win32. These packages will provide system-specific pre-compiled Pascal unit files (needed to build actual working programs).

Units for the native target were already moved to a fpc-units-$CPU-$OS package as part of Changes/F38-FPC-repackaging, so this naming convention should fit the status quo.

:link: Benefit to Fedora

Free Pascal users needing to cross-compile their programs will be able to use distribution-provided packages, instead of having the build the compiler on their own.

:link: Scope

  • Proposal owners: Make necessary changes to fpc.spec and build the package in Rawhide.

  • Other developers: None. Dependent packages should not require any changes.

  • Release engineering: None.

  • Policies and guidelines: N/A (not needed for this Change)

  • Trademark approval: N/A (not needed for this Change)

  • Alignment with the Fedora Strategy: Better integration of the Free Pascal development stack.

:link: Upgrade/compatibility impact

For regular Free Pascal users who have not dealt with cross-compilation, nothing should change.

Users who have rolled out their own cross-compilation setup and installed it inside /usr/lib/fpc or /usr/lib64/fpc will need to manually solve file conflicts, should they elect to install the new packages.

:link: How To Test

The proposed packages can be installed from a COPR repo: suve/fpcross

Testers can install support for a target by using dnf install fpc-units-$CPU-$OS, e.g. fpc-units-aarch64-linux or fpc-units-x86_64-win64. The units package should pull in the appropriate binutils-$CPU-linux-gnu and fpc-cross-$CPU packages, if necessary. Once the cross-compiler and units are installed, one can try compiling some test programs by using fpc -P${CPU} -T${OS} ${FILE}.pas.

:link: User Experience

No changes should be noticeable for users consuming FPC-compiled programs, as well as developers using FPC for building native programs.

Developers interested in using Free Pascal cross-compilers will be able to install those from the repository, instead of building the compiler on their own. There may be some extra work required for building Pascal programs using external libraries.

:link: Dependencies

Changes to fpc are not dependent on any other packages.

The following packages depend on a working fpc:

  • ccdciel (CCD capture software)
  • colorful (side-view shooter game)
  • cqrlog (amateur radio contact logging program)
  • diffoscope (in-depth comparison of files, archives, and directories)
  • doublecmd (file manager with two panels)
  • fpc (Free Pascal Compiler)
  • gearhead1 (roguelike mecha role-playing game)
  • gearhead2 (roguelike mecha role-playing game in space)
  • goverlay (graphical UI to help manage Linux overlays)
  • hedgewars (turn-based artillery game featuring fighting Hedgehogs)
  • indistarter (GUI to start, stop and control an INDI server)
  • lazarus (Lazarus Component Library and IDE for Free Pascal)
  • lazpaint (simple image editor)
  • nbc (simple language and compiler to program the LEGO NXT brick)
  • pasdoc (documentation tool for Pascal and Object Pascal source code)
  • skychart (planetarium software for the advanced amateur astronomer)

:link: Contingency Plan

  • Contingency mechanism: Revert to last working version of fpc.spec and rebuild the package.
  • Contingency deadline: Before the Beta Freeze.
  • Blocks release? No

:link: Documentation

Free Pascal wiki pages:

:link: Release Notes

Fedora Linux 43 ships with cross-compilation support for the Free Pascal Compiler, through several new packages. Users interested in cross-compiling for MS Windows should install the fpc-units-x86_64-win64 or fpc-units-i386-win32 packages. For cross-compiling for Linux to other architectures, install the appropraite fpc-units-$ARCH-linux package. Note that you may need to perform some extra steps if you want your cross-compiled Pascal programs to link against external libraries.

Last edited by @amoloney 2025-07-03T19:11:58Z

Last edited by @amoloney 2025-07-03T19:11:58Z

How do you feel about the proposal as written?

  • Strongly in favor
  • In favor, with reservations
  • Neutral
  • Opposed, but could be convinced
  • Strongly opposed
0 voters

If you are in favor but have reservations, or are opposed but something could change your mind, please explain in a reply.

We want everyone to be heard, but many posts repeating the same thing actually makes that harder. If you have something new to say, please say it. If, instead, you find someone has already covered what you’d like to express, please simply give that post a :heart: instead of reiterating. You can even do this by email, by replying with the heart emoji or just “+1”. This will make long topics easier to follow.

Please note that this is an advisory “straw poll” meant to gauge sentiment. It isn’t a vote or a scientific survey. See About the Change Proposals category for more about the Change Process and moderation policy.

This change proposal has now been submitted to FESCo with ticket #3444 for voting.

To find out more, please visit our Changes Policy documentation.