From 70760208bbc0574bd170e3acd7e8baad3cd90cf2 Mon Sep 17 00:00:00 2001 From: pierre Date: Sun, 18 Apr 2021 15:41:11 +0000 Subject: [PATCH] Add systems_openbsd to suppported_targets_x_smallr and modify GenerateExecutable in t_bsd unit accordingly git-svn-id: trunk@49229 - --- compiler/options.pas | 1 + compiler/systems/t_bsd.pas | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/options.pas b/compiler/options.pas index d10709ed21..ba299ca140 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -140,6 +140,7 @@ const suppported_targets_x_smallr = systems_linux + systems_solaris + systems_android + + systems_openbsd + [system_i386_haiku,system_x86_64_haiku] + [system_i386_beos] + [system_m68k_amiga]; diff --git a/compiler/systems/t_bsd.pas b/compiler/systems/t_bsd.pas index 915e57be82..99a4b8ca97 100644 --- a/compiler/systems/t_bsd.pas +++ b/compiler/systems/t_bsd.pas @@ -482,12 +482,14 @@ begin (tf_smartlink_sections in target_info.flags) then GCSectionsStr:='--gc-sections'; - if(cs_profile in current_settings.moduleswitches) or + if (cs_profile in current_settings.moduleswitches) or ((Info.DynamicLinker<>'') and ((not SharedLibFiles.Empty) or (target_info.system in systems_openbsd))) then - DynLinkStr:='-dynamic-linker='+Info.DynamicLinker; + DynLinkStr:='-dynamic-linker='+Info.DynamicLinker; + if rlinkpath<>'' then + DynLinkStr:=DynLinkStr+' --rpath-link '+rlinkpath; if CShared Then begin DynLinKStr:=DynLinkStr+' --shared'