Wiki - https://fedoraproject.org/wiki/Changes/Free_Pascal_cross-compilers Discussion thread - https://discussion.fedoraproject.org/t/f43-change-proposal-free-pascal-cross-compilers-self-contained/157263
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. == Summary == Add cross-compilation support to the Free Pascal Compiler (FPC) offered in Fedora. == Owner == * Name: [[User:suve| Artur Frenszek-Iwicki]] * Email: <fed...@svgames.pl> == 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. == 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. == 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. == 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. == How To Test == The proposed packages can be installed from a COPR repo: `[https://copr.fedorainfracloud.org/coprs/suve/fpcross/ 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`. == 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. == Dependencies == Changes to `fpc` are not dependent on any other packages. The following packages depend on a working `fpc`: * [https://src.fedoraproject.org/rpms/ccdciel ccdciel] (CCD capture software) * [https://src.fedoraproject.org/rpms/colorful colorful] (side-view shooter game) * [https://src.fedoraproject.org/rpms/cqrlog cqrlog] (amateur radio contact logging program) * [https://src.fedoraproject.org/rpms/diffoscope diffoscope] (in-depth comparison of files, archives, and directories) * [https://src.fedoraproject.org/rpms/doublecmd doublecmd] (file manager with two panels) * [https://src.fedoraproject.org/rpms/fpc fpc] (Free Pascal Compiler) * [https://src.fedoraproject.org/rpms/gearhead1 gearhead1] (roguelike mecha role-playing game) * [https://src.fedoraproject.org/rpms/gearhead2 gearhead2] (roguelike mecha role-playing game in space) * [https://src.fedoraproject.org/rpms/goverlay goverlay] (graphical UI to help manage Linux overlays) * [https://src.fedoraproject.org/rpms/hedgewars hedgewars] (turn-based artillery game featuring fighting Hedgehogs) * [https://src.fedoraproject.org/rpms/indistarter indistarter] (GUI to start, stop and control an INDI server) * [https://src.fedoraproject.org/rpms/lazarus lazarus] (Lazarus Component Library and IDE for Free Pascal) * [https://src.fedoraproject.org/rpms/lazpaint lazpaint] (simple image editor) * [https://src.fedoraproject.org/rpms/nbc nbc] (simple language and compiler to program the LEGO NXT brick) * [https://src.fedoraproject.org/rpms/pasdoc pasdoc] (documentation tool for Pascal and Object Pascal source code) * [https://src.fedoraproject.org/rpms/skychart skychart] (planetarium software for the advanced amateur astronomer) == 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 == Documentation == Free Pascal wiki pages: * [https://wiki.freepascal.org/Binutils Binutils] * [https://wiki.freepascal.org/Cross_compiling Cross compiling] * [https://wiki.freepascal.org/Free_Pascal_supported_targets Free Pascal supported targets] == 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 appropriate `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. -- Aoife Moloney Fedora Operations Architect Fedora Project Matrix: @amoloney:fedora.im IRC: amoloney -- _______________________________________________ devel-announce mailing list -- devel-annou...@lists.fedoraproject.org To unsubscribe send an email to devel-announce-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel-annou...@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue -- _______________________________________________ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue