From: Peter Michael Green Date: Mon, 4 Sep 2023 20:43:35 +0000 (+0100) Subject: Use ld.bfd explicitly X-Git-Tag: archive/raspbian/3.2.2+dfsg-32+rpi1~1^2^2~33 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a481182b2ff062b1bc6229f59f025782165a8b48;p=fpc.git Use ld.bfd explicitly Bug-Debian: http://bugs.debian.org/620815 Bug-Debian: http://bugs.debian.org/624525 Bug-Debian: http://bugs.debian.org/717651 Freepascal is broken with ld.gold, previously we conflicted with binutils-gold but that makes us uninstallable with the new binutils. So instead we take the approach of patching fpc to use ld.bfd directly Gbp-Pq: Name use-bfd-explicitly.diff --- diff --git a/fpcsrc/compiler/systems/t_linux.pas b/fpcsrc/compiler/systems/t_linux.pas index ac7c74d8..b5089bbc 100644 --- a/fpcsrc/compiler/systems/t_linux.pas +++ b/fpcsrc/compiler/systems/t_linux.pas @@ -1409,7 +1409,7 @@ begin if HasExports then cmdstr:=cmdstr+' -E'; - success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false); + success:=DoExec(FindUtil(utilsprefix+BinStr)+'.bfd',CmdStr,true,false); { Create external .dbg file with debuginfo } if success and (cs_link_separate_dbg_file in current_settings.globalswitches) then @@ -1477,7 +1477,7 @@ begin Replace(cmdstr,'$SONAME',SoNameStr); Replace(cmdstr,'$MAP',mapstr); Replace(cmdstr,'$GCSECTIONS',GCSectionsStr); - success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false); + success:=DoExec(FindUtil(utilsprefix+binstr)+'.bfd',cmdstr,true,false); { Strip the library ? } if success and (cs_link_strip in current_settings.globalswitches) then