./trunk/gcc420/vcs_diff_compiler.patch 2026-11-10-02:37
> uname -a Linux cfarm420 7.2.14-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 30 Oct 2026 14:32:40 +0000 x86_64 GNU/Linux
diff --git a/compiler/options.pas b/compiler/options.pas
index 3c8b893087..c6b52f7f1d 100644
--- a/compiler/options.pas
+++ b/compiler/options.pas
@@ -197,7 +197,7 @@ implementation
suppported_targets_x_smallr = systems_linux + systems_solaris + systems_android
- + systems_openbsd
+ + systems_openbsd + systems_freebsd
+ [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 a2bcfe9c40..9845fb18ae 100644
--- a/compiler/systems/t_bsd.pas
+++ b/compiler/systems/t_bsd.pas
@@ -430,7 +430,14 @@ procedure TLinkerBSD.InitSysInitUnitName;
LinkRes.Add('-lgcc');
if linkdynamic and (Info.DynamicLinker<>'') and
not(target_info.system in systems_openbsd) then
- LinkRes.AddFileName(Info.DynamicLinker);
+ begin
+ if (sysrootpath<>'') and not(cs_link_on_target in current_settings.globalswitches) then
+ LinkRes.AddFileName(sysrootpath+Info.DynamicLinker)
+ else if (rlinkpath<>'') and not(cs_link_on_target in current_settings.globalswitches) then
+ LinkRes.AddFileName(rlinkpath+Info.DynamicLinker)
+ else
+ LinkRes.AddFileName(Info.DynamicLinker);
+ end;
if not LdSupportsNoResponseFile then
LinkRes.Add(')');
end;