./trunk/gcc430/vcs_diff_compiler.patch 2026-04-15-11:50
> uname -a FreeBSD cfarm430.jing.rocks 16.0-CURRENT FreeBSD 16.0-CURRENT main-n284960-87bea33a67ca GENERIC amd64
diff --git a/compiler/Makefile b/compiler/Makefile
index 2868f2be73..694612374e 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -655,7 +655,7 @@ ifdef LLVM
ifeq ($(findstring $(PPC_TARGET),x86_64 aarch64 arm),)
$(error The $(PPC_TARGET) architecture is not (yet) supported by the FPC/LLVM code generator)
endif
-ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux openbsd),)
+ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux openbsd freebsd),)
$(error The $(OS_TARGET) target OS is not (yet) supported by the FPC/LLVM code generator)
endif
override LOCALOPT+=-dllvm -Fullvm
diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc
index 756a8a7806..89d96ee413 100644
--- a/compiler/Makefile.fpc
+++ b/compiler/Makefile.fpc
@@ -386,7 +386,7 @@ ifeq ($(findstring $(PPC_TARGET),x86_64 aarch64 arm),)
$(error The $(PPC_TARGET) architecture is not (yet) supported by the FPC/LLVM code generator)
endif
-ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux openbsd),)
+ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux openbsd freebsd),)
$(error The $(OS_TARGET) target OS is not (yet) supported by the FPC/LLVM code generator)
endif
diff --git a/compiler/systems/i_bsd.pas b/compiler/systems/i_bsd.pas
index 44b2398da2..706b6cebcd 100644
--- a/compiler/systems/i_bsd.pas
+++ b/compiler/systems/i_bsd.pas
@@ -118,6 +118,9 @@
{$ifdef tls_threadvars}
tf_section_threadvars,
{$endif tls_threadvars}
+{$ifdef llvm}
+ tf_use_psabieh,
+{$endif llvm}
tf_needs_symbol_type,tf_needs_symbol_size
,tf_smartlink_sections,tf_has_winlike_resources
,tf_supports_hidden_symbols];
@@ -258,6 +261,9 @@
flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type,
tf_files_case_sensitive,
tf_dwarf_only_local_labels,
+{$ifdef llvm}
+ tf_use_psabieh,
+{$endif llvm}
{tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols];
cpu : cpu_x86_64;
unit_env : 'BSDUNITS';