diff --git a/compiler/Makefile.fpc b/compiler/Makefile.fpc index c3d1c0b042..60a62b5f87 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),) +ifeq ($(findstring $(OS_TARGET),darwin iphonesim linux openbsd),) $(error The $(OS_TARGET) target OS is not (yet) supported by the FPC/LLVM code generator) endif diff --git a/compiler/llvm/agllvm.pas b/compiler/llvm/agllvm.pas index 713f5fb091..f1b0d5f91c 100644 --- a/compiler/llvm/agllvm.pas +++ b/compiler/llvm/agllvm.pas @@ -1789,7 +1789,7 @@ implementation idtxt : 'CLANG-LLVM'; asmbin : 'clang'; asmcmd: '-x ir $OPT -target $TRIPLET -c -o $OBJ $ASM $EXTRAOPT'; - supported_targets : [system_x86_64_linux,system_aarch64_linux,system_arm_linux]; + supported_targets : [system_x86_64_linux,system_aarch64_linux,system_arm_linux,system_x86_64_openbsd]; flags : [af_smartlink_sections,af_llvm]; labelprefix : '.L'; labelmaxlen : -1; diff --git a/compiler/systems/i_bsd.pas b/compiler/systems/i_bsd.pas index 99e92809fd..29d48a93fe 100644 --- a/compiler/systems/i_bsd.pas +++ b/compiler/systems/i_bsd.pas @@ -466,7 +466,10 @@ unit i_bsd; flags : [tf_needs_symbol_size,tf_needs_dwarf_cfi,tf_library_needs_pic,tf_needs_symbol_type, tf_files_case_sensitive, tf_under_development, tf_dwarf_only_local_labels, tf_pic_default, - { tf_pic_uses_got,}tf_smartlink_sections,tf_has_winlike_resources,tf_supports_hidden_symbols]; +{$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'; extradefines : 'UNIX;HASUNIX;BSD';