| 1 |
--- compiler/systems/t_bsd.pas 2020-10-03 17:54:31.715884000 -0500 |
| 2 |
+++ compiler/systems/t_bsd.pas 2020-10-03 18:18:40.577288000 -0500 |
| 3 |
@@ -155,6 +155,8 @@ |
| 4 |
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib',true) |
| 5 |
else if target_info.system in systems_openbsd then |
| 6 |
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=$OPENBSD_X11BASE/lib;=$OPENBSD_LOCALBASE/lib',true) |
| 7 |
+ else if target_info.system in systems_freebsd then |
| 8 |
+ LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib;=$FREEBSD_LOCALBASE/lib',true) |
| 9 |
else |
| 10 |
LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib;=/usr/lib;=/usr/X11R6/lib',true); |
| 11 |
end; |
| 12 |
@@ -167,6 +169,12 @@ |
| 13 |
var |
| 14 |
LdProgram: string='ld'; |
| 15 |
begin |
| 16 |
+ if target_info.system in systems_freebsd then |
| 17 |
+ begin |
| 18 |
+ LdProgram:=GetEnvPChar('FPC_LDPATH'); |
| 19 |
+ if not FileExists(LdProgram,True) then |
| 20 |
+ LdProgram:=GetEnvPChar('LOCALBASE')+'/bin/ld.bfd'; |
| 21 |
+ end; |
| 22 |
if target_info.system in (systems_openbsd+[system_x86_64_dragonfly]) then |
| 23 |
LdProgram:='ld.bfd'; |
| 24 |
LibrarySuffix:=' '; |