summaryrefslogtreecommitdiff
path: root/compiler/systems/t_bsd.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/systems/t_bsd.pas')
-rw-r--r--compiler/systems/t_bsd.pas27
1 files changed, 8 insertions, 19 deletions
diff --git a/compiler/systems/t_bsd.pas b/compiler/systems/t_bsd.pas
index b581bdc781..91017c1d43 100644
--- a/compiler/systems/t_bsd.pas
+++ b/compiler/systems/t_bsd.pas
@@ -295,9 +295,13 @@ var
startupfile: TCmdStr;
begin
startupfile:=GetDarwinCrt1ObjName(isdll);
- if (startupfile<>'') and
- not librarysearchpath.FindFile(startupfile,false,result) then
- result:='/usr/lib/'+startupfile;
+ if startupfile<>'' then
+ begin
+ if not librarysearchpath.FindFile(startupfile,false,result) then
+ result:='/usr/lib/'+startupfile
+ end
+ else
+ result:='';
result:=maybequoted(result);
end;
@@ -879,29 +883,23 @@ end;
*****************************************************************************}
initialization
+ RegisterLinker(ld_bsd,TLinkerBSD);
{$ifdef x86_64}
- RegisterExternalLinker(system_x86_64_FreeBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_freebsd,timportlibbsd);
RegisterExport(system_x86_64_freebsd,texportlibbsd);
RegisterTarget(system_x86_64_freebsd_info);
- RegisterExternalLinker(system_x86_64_OpenBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_openbsd,timportlibbsd);
RegisterExport(system_x86_64_openbsd,texportlibbsd);
RegisterTarget(system_x86_64_openbsd_info);
- RegisterExternalLinker(system_x86_64_NetBSD_info,TLinkerBSD);
RegisterImport(system_x86_64_netbsd,timportlibbsd);
RegisterExport(system_x86_64_netbsd,texportlibbsd);
RegisterTarget(system_x86_64_netbsd_info);
- RegisterExternalLinker(system_x86_64_darwin_info,TLinkerBSD);
RegisterImport(system_x86_64_darwin,timportlibdarwin);
RegisterExport(system_x86_64_darwin,texportlibdarwin);
RegisterTarget(system_x86_64_darwin_info);
{$endif}
{$ifdef i386}
- RegisterExternalLinker(system_i386_FreeBSD_info,TLinkerBSD);
- RegisterExternalLinker(system_i386_NetBSD_info,TLinkerBSD);
- RegisterExternalLinker(system_i386_OpenBSD_info,TLinkerBSD);
RegisterImport(system_i386_freebsd,timportlibbsd);
RegisterExport(system_i386_freebsd,texportlibbsd);
RegisterTarget(system_i386_freebsd_info);
@@ -911,42 +909,33 @@ initialization
RegisterImport(system_i386_openbsd,timportlibbsd);
RegisterExport(system_i386_openbsd,texportlibbsd);
RegisterTarget(system_i386_openbsd_info);
- RegisterExternalLinker(system_i386_darwin_info,TLinkerBSD);
RegisterImport(system_i386_darwin,timportlibdarwin);
RegisterExport(system_i386_darwin,texportlibdarwin);
RegisterTarget(system_i386_darwin_info);
- RegisterExternalLinker(system_i386_iphonesim_info,TLinkerBSD);
RegisterImport(system_i386_iphonesim,timportlibdarwin);
RegisterExport(system_i386_iphonesim,texportlibdarwin);
RegisterTarget(system_i386_iphonesim_info);
{$endif i386}
{$ifdef m68k}
-// RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
- RegisterExternalLinker(system_m68k_NetBSD_info,TLinkerBSD);
RegisterImport(system_m68k_netbsd,timportlibbsd);
RegisterExport(system_m68k_netbsd,texportlibbsd);
RegisterTarget(system_m68k_netbsd_info);
{$endif m68k}
{$ifdef powerpc}
-// RegisterExternalLinker(system_m68k_FreeBSD_info,TLinkerBSD);
- RegisterExternalLinker(system_powerpc_darwin_info,TLinkerBSD);
RegisterImport(system_powerpc_darwin,timportlibdarwin);
RegisterExport(system_powerpc_darwin,texportlibdarwin);
RegisterTarget(system_powerpc_darwin_info);
- RegisterExternalLinker(system_powerpc_netbsd_info,TLinkerBSD);
RegisterImport(system_powerpc_netbsd,timportlibbsd);
RegisterExport(system_powerpc_netbsd,texportlibbsd);
RegisterTarget(system_powerpc_netbsd_info);
{$endif powerpc}
{$ifdef powerpc64}
- RegisterExternalLinker(system_powerpc64_darwin_info,TLinkerBSD);
RegisterImport(system_powerpc64_darwin,timportlibdarwin);
RegisterExport(system_powerpc64_darwin,texportlibdarwin);
RegisterTarget(system_powerpc64_darwin_info);
{$endif powerpc64}
{$ifdef arm}
- RegisterExternalLinker(system_arm_darwin_info,TLinkerBSD);
RegisterImport(system_arm_darwin,timportlibdarwin);
RegisterExport(system_arm_darwin,texportlibdarwin);
RegisterTarget(system_arm_darwin_info);