FPC cannot use the gold linker. Gold requires that the linker script have the --script flag passed, but doing so will break FreePascal (the flags causes the internal linker to be bypassed). Since DragonFly switches linkers through the environment and it's not clear how to set that, I've hardcoded the linker path for DragonFly for now. Also, we must avoid using Gold for the bootstrap compiler (which has not been hardcoded) so passing LDVER=ld.bfd during the bootstrap stage is necessary to guarantee this. FreeBSD doesn't use this variable so its harmless on that OPSYS. The other major fix was fixing the dirent record which differs on DragonFly. This is why unit searching has always failed. All patches will be submitted upstream. This should be a no-op for FreeBSD, thus no bump.
23 lines
842 B
ObjectPascal
23 lines
842 B
ObjectPascal
--- compiler/systems/t_bsd.pas.orig 2015-11-13 21:15:29 UTC
|
|
+++ compiler/systems/t_bsd.pas
|
|
@@ -192,6 +192,8 @@ begin
|
|
DynamicLinker:='/usr/libexec/ld.so'
|
|
else if target_info.system in systems_netbsd then
|
|
DynamicLinker:='/usr/libexec/ld.elf_so'
|
|
+ else if target_info.system=system_x86_64_dragonfly then
|
|
+ DynamicLinker:='/libexec/ld-elf.so.2'
|
|
else
|
|
DynamicLinker:='';
|
|
end;
|
|
@@ -718,7 +720,10 @@ begin
|
|
Replace(cmdstr,'$DYNLINK',DynLinkStr);
|
|
if (target_info.system in systems_darwin) then
|
|
Replace(cmdstr,'$PRTOBJ',GetDarwinPrtobjName(false));
|
|
- BinStr:=FindUtil(utilsprefix+BinStr);
|
|
+ if target_info.system=system_x86_64_dragonfly then
|
|
+ BinStr:='/usr/libexec/binutils225/elf/ld.bfd'
|
|
+ else
|
|
+ BinStr:=FindUtil(utilsprefix+BinStr);
|
|
|
|
{ create dsym file? }
|
|
extdbgbinstr:='';
|