diff options
Diffstat (limited to 'compiler/systems/t_bsd.pas')
-rw-r--r-- | compiler/systems/t_bsd.pas | 6 |
1 files changed, 4 insertions, 2 deletions
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' |