trunk/gcc420/vcs_diff_compiler.patch results

File details

./trunk/gcc420/vcs_diff_compiler.patch 2026-09-15-11:47

Used binaries

   

Binaries version

> uname -a
Linux cfarm420 7.2.4-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 08 Sep 2026 10:22:31 +0000 x86_64 GNU/Linux

Full file content

 
diff --git a/compiler/options.pas b/compiler/options.pas
index 283ec8833f..c069d63799 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;