git: 2654dbb2d0ce - main - lang/fpc-wasip1-devel: fix build on powerpc64le

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 21 Oct 2026 11:02:21 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2654dbb2d0ce9d272c22c6c40b9262f49a76b830

commit 2654dbb2d0ce9d272c22c6c40b9262f49a76b830
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-19 13:45:16 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-21 11:02:06 +0000

    lang/fpc-wasip1-devel: fix build on powerpc64le
    
    fpc only marks a FreeBSD/powerpc64 host as little endian when building
    the native compiler. The wasm32 cross compiler misses that, thinks it's
    cross-endian and wants llvm-mc. Test the CPU define instead, like the
    Linux target does.
---
 lang/fpc-wasip1-devel/files/patch-compiler_systems_i__bsd.pas | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lang/fpc-wasip1-devel/files/patch-compiler_systems_i__bsd.pas b/lang/fpc-wasip1-devel/files/patch-compiler_systems_i__bsd.pas
new file mode 100644
index 000000000000..25e880a7c3be
--- /dev/null
+++ b/lang/fpc-wasip1-devel/files/patch-compiler_systems_i__bsd.pas
@@ -0,0 +1,11 @@
+--- compiler/systems/i_bsd.pas.orig	2026-10-18 22:31:32 UTC
++++ compiler/systems/i_bsd.pas
+@@ -224,7 +224,7 @@
+             res          : res_elf;
+             dbg          : dbg_dwarf2;
+             script       : script_unix;
+-{$if defined(FreeBSD) and (defined(powerpc64le) or (defined(POWERPC64) and defined(FPC_LITTLE_ENDIAN)))}
++{$if defined(FreeBSD) and (defined(powerpc64le) or (defined(CPUPOWERPC64) and defined(FPC_LITTLE_ENDIAN)))}
+             { on a FreeBSD little endian powerpc64 platform -> use little endian as default }
+ 	    endian       : endian_little;
+ {$else}