From d29154ba904dfa0d1284d1b4d5dcd486100ecd91 Mon Sep 17 00:00:00 2001 From: pierre Date: Sun, 18 Apr 2021 15:41:11 +0000 Subject: Add systems_openbsd to suppported_targets_x_smallr and modify GenerateExecutable in t_bsd unit accordingly git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@49229 3ad0048d-3df7-0310-abae-a5850022a9f2 --- compiler/options.pas | 1 + compiler/systems/t_bsd.pas | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'compiler') 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' -- cgit v1.2.1